From bd67ac4d6f95581c8d965dd6e925f51d5e406f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Tue, 18 Nov 2025 19:01:13 +0100 Subject: [PATCH 1/4] Migrate some examples to variants --- examples/admob/admob.json | 3865 ++- .../advanced-projectile.json | 5776 ++-- .../boids-flocking-simulation.json | 6814 +++-- examples/buttons/buttons.json | 8989 +++++- .../crazygames-sdk-demo.json | 6161 ++-- .../draggable-physics/draggable-physics.json | 6858 +++-- examples/face-forward/face-forward.json | 3331 ++- examples/fire-bullet/fire-bullet.json | 10193 ++++--- examples/firing-patterns/firing-patterns.json | 2739 +- examples/in-app-purchase/in-app-purchase.json | 2646 +- .../marching-squares-island-generator.json | 4711 +-- examples/music jukebox/music jukebox.json | 4388 +-- examples/object-slicer/object-slicer.json | 6308 ++-- .../orbiting-objects/orbiting-objects.json | 23770 +++++++++------- examples/tween-test/tween-test.json | 8295 ++++-- .../assets/rotate-screen-icon.png | Bin 881 -> 1165 bytes .../wave-defense-shooter.json | 2933 +- 17 files changed, 68330 insertions(+), 39447 deletions(-) diff --git a/examples/admob/admob.json b/examples/admob/admob.json index 15320cc1f..628921ebb 100644 --- a/examples/admob/admob.json +++ b/examples/admob/admob.json @@ -1,7 +1,7 @@ { "firstLayout": "Home", "gdVersion": { - "build": 224, + "build": 245, "major": 5, "minor": 5, "revision": 0 @@ -81,7 +81,9 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [ { "extension": "AdMob", @@ -336,8 +338,7 @@ "name": "Green Button_Pressed.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -361,13 +362,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -557,6 +561,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -599,6 +604,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -606,6 +612,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "StopInitialization", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -615,9 +622,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Stop Auto Initialization" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -671,6 +692,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -689,7 +711,9 @@ { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Initialize", + "persistentUuid": "e63398c1-bfc1-4c2a-a35d-eceac9390d09", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -699,9 +723,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Initialize manually" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -755,6 +793,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -774,6 +813,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToAppOpens", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -783,9 +823,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go To App Opens" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -839,6 +893,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -1110,6 +1165,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -1181,13 +1237,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -1440,6 +1499,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -1482,6 +1542,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -1489,6 +1550,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadPortait", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1498,9 +1560,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load Portait" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -1526,7 +1602,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Load Portait", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -1549,11 +1625,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Load Portait", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -1573,6 +1650,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadLandscape", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1582,9 +1660,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load Landscape" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -1610,7 +1702,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Load Landscape", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -1633,11 +1725,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Load Landscape", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -1657,6 +1750,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Display", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1666,9 +1760,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Display" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -1694,7 +1802,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Display", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -1717,11 +1825,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Display", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -1741,6 +1850,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadAndDisplayPortait", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1750,9 +1860,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load And Display Portait" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -1778,7 +1902,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Load And Display Portait", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -1801,11 +1925,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Load And Display Portait", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -1825,6 +1950,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadAndDisplayLandscape", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1834,9 +1960,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load And Display Landscape" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -1862,7 +2002,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Load And Display Landscape", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -1885,11 +2025,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Load And Display Landscape", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -1909,6 +2050,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToBanners", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1918,9 +2060,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go To Banners" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -1946,7 +2102,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Go To Banners", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -1969,11 +2125,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Go To Banners", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -1993,6 +2150,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToRewardedInterstitials", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2002,9 +2160,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go To Rewarded Interstitials" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -2030,7 +2202,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Go To Rewarded Interstitials", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -2053,11 +2225,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Go To Rewarded Interstitials", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -2507,6 +2680,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -2532,7 +2706,36 @@ "effects": [] } ], - "behaviorsSharedData": [] + "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" + } + ] }, { "b": 30, @@ -2549,13 +2752,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -2607,21 +2813,6 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "ButtonText", - "persistentUuid": "afa11973-535b-4313-8122-014a2a083083", - "width": 0, - "x": 580, - "y": 420, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, @@ -2809,6 +3000,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -2851,6 +3043,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -2858,6 +3051,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "ConfigureTop", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2867,9 +3061,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Configure top" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -2923,6 +3131,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -2942,6 +3151,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Show", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2951,9 +3161,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Show" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -3007,6 +3231,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -3026,6 +3251,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "ConfigureBottom", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3035,9 +3261,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Configure bottom" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -3063,7 +3303,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Configure bottom", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -3086,11 +3326,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Configure bottom", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -3110,6 +3351,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Hide", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3119,9 +3361,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Hide" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -3147,7 +3403,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Hide", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -3170,11 +3426,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Hide", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -3194,6 +3451,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToInterstitials", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3203,9 +3461,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to Interstitials" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -3231,7 +3503,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Go to Interstitials", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -3254,11 +3526,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Go to Interstitials", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -3278,6 +3551,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToAppOpens", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3287,9 +3561,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to App Opens" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -3315,7 +3603,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Go to App Opens", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -3338,11 +3626,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Go to App Opens", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -3750,6 +4039,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -3775,7 +4065,36 @@ "effects": [] } ], - "behaviorsSharedData": [] + "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" + } + ] }, { "b": 30, @@ -3792,13 +4111,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -4021,6 +4343,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -4063,6 +4386,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -4070,6 +4394,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Load", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4079,9 +4404,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -4107,7 +4446,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Load", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -4130,11 +4469,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Load", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -4154,6 +4494,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Display", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4163,9 +4504,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Display" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -4191,7 +4546,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Display", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -4214,11 +4569,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Display", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -4238,6 +4594,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadAndDisplay", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4247,9 +4604,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load And Display" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -4275,7 +4646,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Load And Display", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -4298,11 +4669,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Load And Display", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -4322,6 +4694,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToBanners", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4331,9 +4704,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go To Banners" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -4359,7 +4746,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Go To Banners", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -4382,11 +4769,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Go To Banners", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -4406,6 +4794,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToRewardedVideos", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4415,9 +4804,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go To Rewarded Videos" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -4443,7 +4846,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Go To Rewarded Videos", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -4466,11 +4869,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Go To Rewarded Videos", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -4847,6 +5251,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -4872,7 +5277,36 @@ "effects": [] } ], - "behaviorsSharedData": [] + "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" + } + ] }, { "b": 30, @@ -4889,13 +5323,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -5138,6 +5575,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -5180,6 +5618,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -5187,6 +5626,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Load", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5196,9 +5636,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -5224,7 +5678,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Load", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -5247,11 +5701,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Load", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -5271,6 +5726,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Display", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5280,9 +5736,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Display" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -5308,7 +5778,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Display", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -5331,11 +5801,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Display", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -5355,6 +5826,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadAndDisplay", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5364,9 +5836,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load And Display" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -5392,7 +5878,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Load And Display", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -5415,11 +5901,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Load And Display", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -5439,6 +5926,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "ClaimReward", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5448,9 +5936,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Claim Reward" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -5476,7 +5978,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Claim Reward", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -5499,11 +6001,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Claim Reward", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -5523,6 +6026,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToRewardedInterstitials", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5532,9 +6036,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to Rewarded Interstitials" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -5560,7 +6078,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Go to Rewarded Interstitials", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -5583,11 +6101,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Go to Rewarded Interstitials", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -5607,6 +6126,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToInterstitials", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5616,9 +6136,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to Interstitials" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -5644,7 +6178,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Go to Interstitials", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -5667,11 +6201,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Go to Interstitials", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -6123,6 +6658,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -6148,7 +6684,36 @@ "effects": [] } ], - "behaviorsSharedData": [] + "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" + } + ] }, { "b": 30, @@ -6165,13 +6730,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -6414,6 +6982,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -6456,6 +7025,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -6463,6 +7033,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Load", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6472,9 +7043,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -6500,7 +7085,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Load", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -6523,11 +7108,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Load", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -6547,6 +7133,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Display", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6556,9 +7143,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Display" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -6584,7 +7185,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Display", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -6607,11 +7208,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Display", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -6631,6 +7233,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadAndDisplay", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6640,9 +7243,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load And Display" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -6668,7 +7285,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Load And Display", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -6691,11 +7308,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Load And Display", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -6715,6 +7333,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "ClaimReward", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6724,11 +7343,25 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Claim Reward" }, "childrenContent": { - "Hovered": { - "bottomMargin": 32, + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, + "Hovered": { + "bottomMargin": 32, "height": 106, "leftMargin": 16, "rightMargin": 16, @@ -6752,7 +7385,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Claim Reward", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -6775,11 +7408,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Claim Reward", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -6799,6 +7433,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToAppOpens", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6808,9 +7443,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to App Opens" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -6836,7 +7485,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Go to App Opens", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -6859,11 +7508,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Go to App Opens", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -6883,6 +7533,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToRewardedVideos", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6892,9 +7543,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to Rewarded Videos" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -6920,7 +7585,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Go to Rewarded Videos", + "string": "", "font": "", "textAlignment": "center", "characterSize": 20, @@ -6943,11 +7608,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Go to Rewarded Videos", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "62;99;29" } }, @@ -7399,6 +8065,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -7424,7 +8091,36 @@ "effects": [] } ], - "behaviorsSharedData": [] + "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" + } + ] } ], "externalEvents": [], @@ -7434,14 +8130,15 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", - "helpPath": "", + "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.2", + "version": "2.1.1", "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.", + "A button that can be used for menus and most labelled buttons of a game. 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)." ], @@ -7456,10 +8153,39 @@ "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": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -7475,61 +8201,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "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\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -7543,509 +8235,406 @@ "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" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ] - } - ], - "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": [ - "" + "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", + "" + ] + } ] } ], - "actions": [ + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "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": [], - "subInstructions": [ + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "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": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "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\"" - ] - } - ] + "parameters": [] }, { - "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" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Hovered\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" ] } ] @@ -8056,49 +8645,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "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": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -8128,22 +8856,60 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "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": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -8178,11 +8944,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -8227,11 +8992,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -8276,11 +9040,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8325,11 +9088,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8351,11 +9113,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -8400,11 +9161,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -8449,11 +9209,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -8502,7 +9261,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -8533,8 +9292,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -8542,14 +9299,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -8558,9 +9328,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -8568,9 +9335,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -8578,9 +9342,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -8588,9 +9349,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -8600,7 +9358,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -8609,95 +9367,312 @@ "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": [ - { - "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -8708,7 +9683,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", @@ -8720,7 +9695,7 @@ }, "parameters": [ "", - "Label", + "Hovered", "0", "0", "" @@ -8728,35 +9703,88 @@ }, { "type": { - "value": "ChangePlan" + "value": "Create" }, "parameters": [ - "Label", - "=", - "2" + "", + "Pressed", + "0", + "0", + "" ] }, { "type": { - "value": "TextObject::SetWrapping" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "Label", - "yes" + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "Object", - "" + "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": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] + } + ], "parameters": [ { "description": "Object", @@ -8790,18 +9818,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": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -8863,12 +9920,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8903,10 +9961,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -8915,7 +9973,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -8923,7 +9981,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -8934,10 +9992,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -8961,10 +10019,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -8981,10 +10040,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -9013,12 +10073,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -9058,10 +10119,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -9090,12 +10152,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -9147,12 +10210,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -9184,126 +10248,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": [ @@ -9314,22 +10258,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -9551,6 +10480,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -9559,21 +10489,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -9587,18 +10509,18 @@ "type": "object" }, { - "description": "", - "name": "LabelText", + "description": "Text", + "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": [ { @@ -9607,18 +10529,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -9630,12 +10552,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", @@ -9643,17 +10564,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -9666,91 +10587,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": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "actions": [ + "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -9762,126 +10655,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" + "Labels", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -9900,227 +10790,700 @@ ], "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", - "extraInformation": [ - "Label" + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.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": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Green 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": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 29, + "g": 99, + "r": 62 + }, + "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": 20, + "lineHeight": 0, + "color": "62;99;29" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Green 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": "Green 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": "Green 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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - "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" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [], - "behaviors": [ + "layers": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] - }, - { - "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": 80, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "114155f3-90e9-461e-a4cd-6c7b231b4c88", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ] + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "" + } }, { - "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": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", + "assetStoreOriginalName": "Green Button", + "name": "Green 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": 29, + "g": 99, + "r": 62 + }, + "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, + "lineHeight": 0, + "color": "62;99;29" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Green 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": "Green 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": "Green 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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - { - "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" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [] + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": "114155f3-90e9-461e-a4cd-6c7b231b4c88", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } - ], - "instances": [] + ] } ] } diff --git a/examples/advanced-projectile/advanced-projectile.json b/examples/advanced-projectile/advanced-projectile.json index 68dc6c018..b9d811ece 100644 --- a/examples/advanced-projectile/advanced-projectile.json +++ b/examples/advanced-projectile/advanced-projectile.json @@ -1,13 +1,15 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "landscape", "packageName": "com.example.gamename", @@ -16,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Advanced Projectile", "description": "Control how a projectile object moves including speed, acceleration, distance, and lifetime.", @@ -77,10 +78,18 @@ "placement": "bottom-left", "showWatermark": true }, - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], - "authorUsernames": ["VictrisGames"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "authorUsernames": [ + "VictrisGames" + ], "categories": [], - "playableDevices": ["keyboard", "mobile"], + "playableDevices": [ + "keyboard", + "mobile", + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -92,7 +101,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Tank Bullet (3).png2.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -101,7 +109,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Idle.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -110,7 +117,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Idle2.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -119,7 +125,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Idle3.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -128,7 +133,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Idle4.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -137,7 +141,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Border.png", "kind": "image", "metadata": "", @@ -150,7 +153,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Fill Bar.png", "kind": "image", "metadata": "", @@ -163,7 +165,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Thumb.png", "kind": "image", "metadata": "", @@ -187,7 +188,6 @@ } }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -195,10 +195,12 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -217,13 +219,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.6040838749988867, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -480,9 +485,9 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "0d91b7b0a2a8562a0172b4d5e9bf3d80340f866a030aa7a5f3baf6157840f1c3", "name": "RedHero", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -604,9 +609,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "6c6ee5f9ebae939cbfe344fda8ffc30171127457e4dd03f0054f6ab5a38295d2", "name": "Projectile", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -681,8 +686,8 @@ { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MaxSpeed_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -729,6 +734,28 @@ "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" } }, "Thumb": { @@ -746,8 +773,8 @@ { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MaxDistance_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -793,6 +820,28 @@ "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" } }, "Thumb": { @@ -810,8 +859,8 @@ { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "Lifetime_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -858,6 +907,28 @@ "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" } }, "Thumb": { @@ -875,8 +946,8 @@ { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MinSpeed_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -921,6 +992,28 @@ "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" } }, "Thumb": { @@ -938,8 +1031,8 @@ { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "StartSpeed_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -985,6 +1078,28 @@ "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" } }, "Thumb": { @@ -1002,8 +1117,8 @@ { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "Acceleration_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1051,6 +1166,28 @@ "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" } }, "Thumb": { @@ -1071,7 +1208,6 @@ "italic": false, "name": "MaxSpeed_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1085,6 +1221,28 @@ "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": "Max Speed", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1093,7 +1251,6 @@ "italic": false, "name": "MinSpeed_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1107,6 +1264,28 @@ "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": "Min Speed", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1115,7 +1294,6 @@ "italic": false, "name": "StartSpeed_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1129,6 +1307,28 @@ "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": "Start Speed", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1137,7 +1337,6 @@ "italic": false, "name": "Acceleration_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1151,6 +1350,28 @@ "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": "Acceleration", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1159,7 +1380,6 @@ "italic": false, "name": "Lifetime_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1173,6 +1393,28 @@ "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": "Lifetime", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1181,7 +1423,6 @@ "italic": false, "name": "LifetimeExpired_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1200,6 +1441,28 @@ "b": 28, "g": 231, "r": 248 + }, + "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": "Lifetime\nExpired", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "248;231;28" } }, { @@ -1208,7 +1471,6 @@ "italic": false, "name": "MaxDistanceExceeded_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1227,6 +1489,28 @@ "b": 224, "g": 16, "r": 189 + }, + "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": "Max Distance\nExceeded", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "189;16;224" } }, { @@ -1235,7 +1519,6 @@ "italic": false, "name": "MaxDistanceFromStart_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1249,6 +1532,28 @@ "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": "Max Distance\nFrom Start", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1257,7 +1562,6 @@ "italic": false, "name": "LifetimeValue_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1271,6 +1575,28 @@ "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": "12345", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1279,7 +1605,6 @@ "italic": false, "name": "Instructions_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1293,6 +1618,28 @@ "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": "Click anywhere to shoot", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1301,7 +1648,6 @@ "italic": false, "name": "Title_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1315,9 +1661,93 @@ "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": "Extension: Advanced Projectile", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "255;255;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "RedHero" + }, + { + "objectName": "Projectile" + }, + { + "objectName": "MaxSpeed_Slider" + }, + { + "objectName": "MaxDistance_Slider" + }, + { + "objectName": "Lifetime_Slider" + }, + { + "objectName": "MinSpeed_Slider" + }, + { + "objectName": "StartSpeed_Slider" + }, + { + "objectName": "Acceleration_Slider" + }, + { + "objectName": "MaxSpeed_Text" + }, + { + "objectName": "MinSpeed_Text" + }, + { + "objectName": "StartSpeed_Text" + }, + { + "objectName": "Acceleration_Text" + }, + { + "objectName": "Lifetime_Text" + }, + { + "objectName": "LifetimeExpired_Text" + }, + { + "objectName": "MaxDistanceExceeded_Text" + }, + { + "objectName": "MaxDistanceFromStart_Text" + }, + { + "objectName": "LifetimeValue_Text" + }, + { + "objectName": "Instructions_Text" + }, + { + "objectName": "Title_Text" + } + ] + }, "events": [ { "colorB": 228, @@ -1335,7 +1765,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [], @@ -1434,7 +1866,13 @@ "type": { "value": "RotateTowardPosition" }, - "parameters": ["RedHero", "CursorX()", "CursorY()", "600", ""] + "parameters": [ + "RedHero", + "CursorX()", + "CursorY()", + "600", + "" + ] } ] }, @@ -1445,7 +1883,10 @@ "type": { "value": "MouseButtonPressed" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] } ], "actions": [ @@ -1576,7 +2017,11 @@ "type": { "value": "AdvancedProjectile::AdvancedProjectile::IsLifetimeExceeded" }, - "parameters": ["Projectile", "AdvancedProjectile", ""] + "parameters": [ + "Projectile", + "AdvancedProjectile", + "" + ] } ], "actions": [ @@ -1627,7 +2072,11 @@ "type": { "value": "AdvancedProjectile::AdvancedProjectile::IsMaxDistanceExceeded" }, - "parameters": ["Projectile", "AdvancedProjectile", ""] + "parameters": [ + "Projectile", + "AdvancedProjectile", + "" + ] } ], "actions": [ @@ -1680,9 +2129,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 9117784, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -1722,12 +2178,13 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Advanced projectile", - "helpPath": "", + "gdevelopVersion": ">=5.5.222", + "helpPath": "/extensions/advanced-projectile/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWRlY2lzaW9uLWF1dG8iIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsNUg5TDEzLDFMMTcsNUgxNFY5LjQzQzEzLjI1LDkuODkgMTIuNTgsMTAuNDYgMTIsMTEuMTJWNU0xMC40LDE1SDguNUw3LjgsMTNINC42TDMuOSwxNUgyTDUuMiw2SDcuMkwxMC40LDE1TTcuMzUsMTEuNjVMNi4yLDhMNS4wNSwxMS42NUg3LjM1TTIzLDExTDE5LDdWMTBDMTUuMzksOS44NSAxMi4zMSwxMi41NyAxMiwxNi4xN0MxMC40NCwxNi43MiA5LjYyLDE4LjQ0IDEwLjE3LDIwQzEwLjcyLDIxLjU2IDEyLjQ0LDIyLjM4IDE0LDIxLjgzQzE1LjU2LDIxLjI3IDE2LjM4LDE5LjU2IDE1LjgzLDE4QzE1LjUzLDE3LjE0IDE0Ljg1LDE2LjQ3IDE0LDE2LjE3QzE0LjQ3LDEyLjE3IDE4LjQ3LDExLjk3IDE4Ljk1LDExLjk3VjE0Ljk3TDIzLDExWiIgLz48L3N2Zz4=", "name": "AdvancedProjectile", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/4ab6bb9f91ea1110c0c2aabd7fe17e320c1d0ebbb44f56d01885307d7d2e723b_arrow-decision-auto.svg", "shortDescription": "Control how a projectile moves including speed, acceleration, distance, and lifetime.", - "version": "1.0.0", + "version": "1.1.0", "description": [ "Control how a projectile moves including speed, acceleration, distance, and lifetime.", "", @@ -1738,9 +2195,23 @@ "- If the object is moving, acceleration will be in the direction the object is moving", "" ], - "tags": ["projectile", "movement", "acceleration", "speed", "distance"], - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], + "origin": { + "identifier": "AdvancedProjectile", + "name": "gdevelop-extension-store" + }, + "tags": [ + "projectile", + "movement", + "acceleration", + "speed", + "distance" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -1801,8 +2272,7 @@ "textG": 0, "textR": 0 }, - "comment": "Record starting position so Max distance can be calculated", - "comment2": "" + "comment": "Record starting position so Max distance can be calculated" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1812,7 +2282,11 @@ "type": { "value": "AdvancedProjectile::AdvancedProjectile::SetStartingPositionToCurrentPosition" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] }, @@ -1826,17 +2300,20 @@ "textG": 0, "textR": 0 }, - "comment": "Apply starting speed", - "comment2": "" + "comment": "Apply starting speed" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyStartingSpeed" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "StartingSpeed", + "!=", + "0" + ] } ], "actions": [], @@ -1851,8 +2328,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save the speed and angle the object is moving (and then stop the object)", - "comment2": "" + "comment": "Save the speed and angle the object is moving (and then stop the object)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1884,7 +2360,9 @@ "type": { "value": "Arreter" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] } ] }, @@ -1898,8 +2376,7 @@ "textG": 0, "textR": 0 }, - "comment": "If stopped, move in direction the object is facing", - "comment2": "" + "comment": "If stopped, move in direction the object is facing" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1924,7 +2401,7 @@ "parameters": [ "Object", "Object.Angle()", - "Object.Behavior::PropertyStartingSpeed()", + "StartingSpeed", "1" ] } @@ -1940,8 +2417,7 @@ "textG": 0, "textR": 0 }, - "comment": "If moving, move in direction the object is facing", - "comment2": "" + "comment": "If moving, move in direction the object is facing" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1966,7 +2442,7 @@ "parameters": [ "Object", "Object.Variable(__AdvancedProjectile.InitialForceAngle)", - "Object.Behavior::PropertyStartingSpeed()", + "StartingSpeed", "1" ] } @@ -1984,8 +2460,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start Lifetime timer", - "comment2": "" + "comment": "Start Lifetime timer" }, { "type": "BuiltinCommonInstructions::Standard", @@ -2023,13 +2498,21 @@ "type": { "value": "AdvancedProjectile::AdvancedProjectile::DeleteWhenLifetimeExceeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "AdvancedProjectile::AdvancedProjectile::IsLifetimeExceeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -2037,7 +2520,10 @@ "type": { "value": "Delete" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] }, @@ -2048,13 +2534,21 @@ "type": { "value": "AdvancedProjectile::AdvancedProjectile::DeleteWhenDistanceExceeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "AdvancedProjectile::AdvancedProjectile::IsMaxDistanceExceeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -2062,7 +2556,10 @@ "type": { "value": "Delete" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -2083,9 +2580,13 @@ "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyAcceleration" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "Acceleration", + "!=", + "0" + ] } ], "actions": [], @@ -2100,8 +2601,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save the speed the object is moving", - "comment2": "" + "comment": "Save the speed the object is moving" }, { "type": "BuiltinCommonInstructions::Standard", @@ -2130,8 +2630,7 @@ "textG": 0, "textR": 0 }, - "comment": "If stopped, move in direction the object is facing", - "comment2": "" + "comment": "If stopped, move in direction the object is facing" }, { "type": "BuiltinCommonInstructions::Standard", @@ -2156,7 +2655,7 @@ "parameters": [ "Object", "Object.Angle()", - "TimeDelta() * Object.Behavior::PropertyAcceleration()", + "TimeDelta() * Acceleration", "1" ] } @@ -2172,8 +2671,7 @@ "textG": 0, "textR": 0 }, - "comment": "If moving, move in direction the object is facin", - "comment2": "" + "comment": "If moving, move in direction the object is facin" }, { "type": "BuiltinCommonInstructions::Standard", @@ -2198,7 +2696,7 @@ "parameters": [ "Object", "Object.ForceAngle()", - "TimeDelta() * Object.Behavior::PropertyAcceleration()", + "TimeDelta() * Acceleration", "1" ] } @@ -2214,8 +2712,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop the object if it is moving away from object angle. Required for min speed to work.", - "comment2": "" + "comment": "Stop the object if it is moving away from object angle. Required for min speed to work." }, { "type": "BuiltinCommonInstructions::Standard", @@ -2236,7 +2733,9 @@ "type": { "value": "Arreter" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] } ] } @@ -2259,9 +2758,13 @@ "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyMinSpeed" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "MinSpeed", + "!=", + "0" + ] }, { "type": { @@ -2270,7 +2773,7 @@ "parameters": [ "Object", "<", - "Object.Behavior::PropertyMinSpeed()" + "MinSpeed" ] } ], @@ -2290,7 +2793,9 @@ "type": { "value": "Arreter" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] }, { "type": { @@ -2299,7 +2804,7 @@ "parameters": [ "Object", "Object.Angle()", - "Object.Behavior::PropertyMinSpeed()", + "MinSpeed", "1" ] } @@ -2310,9 +2815,13 @@ "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyMaxSpeed" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "MaxSpeed", + "!=", + "0" + ] }, { "type": { @@ -2321,7 +2830,7 @@ "parameters": [ "Object", ">", - "Object.Behavior::PropertyMaxSpeed()" + "MaxSpeed" ] } ], @@ -2341,7 +2850,9 @@ "type": { "value": "Arreter" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] }, { "type": { @@ -2350,7 +2861,7 @@ "parameters": [ "Object", "Object.Variable(__AdvancedProjectile.CurrentForceAngle)", - "Object.Behavior::PropertyMaxSpeed()", + "MaxSpeed", "1" ] } @@ -2397,9 +2908,13 @@ }, { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyMaxDistanceFromStartingPosition" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "MaxDistanceFromStartingPosition", + ">", + "0" + ] }, { "type": { @@ -2408,7 +2923,7 @@ "parameters": [ "DistanceBetweenPositions(Object.Variable(__AdvancedProjectile.StartingX), Object.Variable(__AdvancedProjectile.StartingY), Object.X(), Object.Y())", ">", - "Object.Behavior::PropertyMaxDistanceFromStartingPosition()" + "MaxDistanceFromStartingPosition" ] } ], @@ -2417,7 +2932,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2459,9 +2976,13 @@ }, { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyMaxLifetime" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "MaxLifetime", + ">", + "0" + ] }, { "type": { @@ -2471,7 +2992,7 @@ "Object", "\"__AdvancedProjectile.Lifetime\"", ">", - "Object.Behavior::PropertyMaxLifetime()" + "MaxLifetime" ] } ], @@ -2480,7 +3001,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2516,7 +3039,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxLifetime()"] + "parameters": [ + "MaxLifetime" + ] } ] } @@ -2552,13 +3077,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyMaxLifetime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxLifetime", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -2635,7 +3159,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxDistanceFromStartingPosition()" + "MaxDistanceFromStartingPosition" ] } ] @@ -2672,13 +3196,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyMaxDistanceFromStartingPosition" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxDistanceFromStartingPosition", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -2767,7 +3290,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxSpeed()"] + "parameters": [ + "MaxSpeed" + ] } ] } @@ -2803,13 +3328,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyMaxSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxSpeed", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -2846,7 +3370,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMinSpeed()"] + "parameters": [ + "MinSpeed" + ] } ] } @@ -2882,13 +3408,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyMinSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinSpeed", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -2925,7 +3450,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyAcceleration()"] + "parameters": [ + "Acceleration" + ] } ] } @@ -2961,13 +3488,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyAcceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Acceleration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -3004,7 +3530,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyStartingSpeed()"] + "parameters": [ + "StartingSpeed" + ] } ] } @@ -3040,13 +3568,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyStartingSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StartingSpeed", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -3068,21 +3595,25 @@ "objectGroups": [] }, { - "description": "Check if delete object when lifetime is exceeded.", - "fullName": "Delete object when lifetime is exceeded", + "description": "Check if automatic deletion is enabled when lifetime is exceeded.", + "fullName": "Automatic deletion is enabled when lifetime is exceeded", "functionType": "Condition", "group": "Advanced projectile configuration", "name": "DeleteWhenLifetimeExceeded", - "sentence": "_PARAM0_ delete object when lifetime is exceeded", + "sentence": "Automatic deletion is enabled when lifetime is exceeded on _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyDeleteWhenLifetimeExceeded" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "DeleteWhenLifetimeExceeded", + "True", + "" + ] } ], "actions": [ @@ -3090,7 +3621,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3111,12 +3644,12 @@ "objectGroups": [] }, { - "description": "Change if delete object when lifetime is exceeded.", - "fullName": "Delete object when lifetime is exceeded", + "description": "Change automatic deletion of object when lifetime is exceeded.", + "fullName": "Change automatic deletion when lifetime is exceeded", "functionType": "Action", "group": "Advanced projectile configuration", "name": "SetDeleteWhenLifetimeExceeded", - "sentence": "_PARAM0_ delete object when lifetime is exceeded: _PARAM2_", + "sentence": "Enable automatic deletion of _PARAM0_ when lifetime is exceeded: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3124,17 +3657,25 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyDeleteWhenLifetimeExceeded" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "DeleteWhenLifetimeExceeded", + "False", + "" + ] } ] }, @@ -3143,17 +3684,25 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyDeleteWhenLifetimeExceeded" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "DeleteWhenLifetimeExceeded", + "True", + "" + ] } ] } @@ -3181,21 +3730,25 @@ "objectGroups": [] }, { - "description": "Check if delete object when distance (from starting position) is exceeded.", - "fullName": "Delete object when distance (from starting position) is exceeded", + "description": "Check if automatic deletion is enabled when distance from starting position is exceeded.", + "fullName": "Automatic deletion is enabled when distance from starting position is exceeded", "functionType": "Condition", "group": "Advanced projectile configuration", "name": "DeleteWhenDistanceExceeded", - "sentence": "_PARAM0_ delete object when distance (from starting position) is exceeded", + "sentence": "Automatic deletion is enabled when distance from starting position is exceeded on _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyDeleteWhenDistanceExceeded" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "DeleteWhenDistanceExceeded", + "True", + "" + ] } ], "actions": [ @@ -3203,7 +3756,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3224,12 +3779,12 @@ "objectGroups": [] }, { - "description": "Change if delete object when distance (from starting position) is exceeded.", - "fullName": "Delete object when distance (from starting position) is exceeded", + "description": "Change automatic deletion when distance from starting position is exceeded.", + "fullName": "Change automatic deletion when distance from starting position is exceeded", "functionType": "Action", "group": "Advanced projectile configuration", "name": "SetDeleteWhenDistanceExceeded", - "sentence": "_PARAM0_ delete object when distance (from starting position) is exceeded: _PARAM2_", + "sentence": "Enable automatic deletion of _PARAM0_ when distance from starting position is exceeded: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3237,17 +3792,25 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyDeleteWhenDistanceExceeded" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "DeleteWhenDistanceExceeded", + "False", + "" + ] } ] }, @@ -3256,17 +3819,25 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyDeleteWhenDistanceExceeded" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "DeleteWhenDistanceExceeded", + "True", + "" + ] } ] } @@ -3301,9 +3872,6 @@ "unit": "Second", "label": "Lifetime", "description": "Use \"0\" to ignore this property.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxLifetime" }, { @@ -3312,9 +3880,6 @@ "unit": "Pixel", "label": "Max distance from starting position", "description": "Use \"0\" to ignore this property.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxDistanceFromStartingPosition" }, { @@ -3323,9 +3888,6 @@ "unit": "PixelSpeed", "label": "Max speed", "description": "Speed from object forces will not exceed this value. Use \"0\" to ignore this property.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxSpeed" }, { @@ -3334,9 +3896,6 @@ "unit": "PixelSpeed", "label": "", "description": "Speed from object forces will not go below this value. Use \"0\" to ignore this property.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinSpeed" }, { @@ -3345,9 +3904,6 @@ "unit": "PixelAcceleration", "label": "Acceleration", "description": "Negative acceleration can be used to stop a projectile.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Acceleration" }, { @@ -3356,29 +3912,18 @@ "unit": "PixelSpeed", "label": "Starting speed", "description": "Object will move in the direction it is facing when it is created. Use \"0\" to ignore this property.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StartingSpeed" }, { "value": "true", "type": "Boolean", - "label": "Delete object when lifetime is exceeded", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, + "label": "Delete when lifetime is exceeded", "name": "DeleteWhenLifetimeExceeded" }, { "value": "true", "type": "Boolean", - "label": "Delete object when distance (from starting position) is exceeded", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, + "label": "Delete when distance from starting position is exceeded", "name": "DeleteWhenDistanceExceeded" } ], @@ -3392,12 +3937,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -3407,13 +3953,49 @@ "identifier": "PanelSpriteSlider", "name": "gdevelop-extension-store" }, - "tags": ["draggable", "slider", "ui", "widget"], + "tags": [ + "draggable", + "slider", + "ui", + "widget" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders 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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -3437,7 +4019,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValue()"] + "parameters": [ + "CurrentValue" + ] } ] } @@ -3472,21 +4056,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "StepSize", + "=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -3496,21 +4083,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "StepSize", + "!=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -3547,7 +4137,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMinValue()"] + "parameters": [ + "MinValue" + ] } ] } @@ -3583,13 +4175,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -3638,7 +4229,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxValue()"] + "parameters": [ + "MaxValue" + ] } ] } @@ -3674,13 +4267,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -3769,7 +4361,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyStepSize()"] + "parameters": [ + "StepSize" + ] } ] } @@ -3805,13 +4399,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -3850,40 +4443,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Value" + "name": "CurrentValue" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -3903,57 +4480,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -3967,463 +4514,406 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ] }, { - "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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } + ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], - "actions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": ["Object", "Behavior", "=", "0"] + "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::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], - "events": [ + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "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": [], - "subInstructions": [ + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Hovered\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" ] } ] @@ -4434,49 +4924,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "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": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -4506,15 +5135,23 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -4546,9 +5183,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -4556,7 +5197,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4588,9 +5231,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -4598,7 +5245,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4630,9 +5279,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -4640,7 +5293,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4672,9 +5327,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -4682,7 +5341,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -4691,11 +5352,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -4706,7 +5366,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4738,11 +5400,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -4753,7 +5414,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4785,11 +5448,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -4800,7 +5462,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4835,7 +5499,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -4865,8 +5531,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -4874,14 +5538,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -4890,9 +5567,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -4900,9 +5574,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -4910,9 +5581,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -4920,9 +5588,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -4932,98 +5597,355 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", - "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": "This allows to detect a change of \"intial value\" on hot reload.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" - }, - "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create the child-object instances.", - "comment2": "" + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "Create" + "value": "PanelSpriteSlider::IsInGameEdition" }, - "parameters": ["", "Background", "0", "0", ""] - }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ { "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "FillBar", "0", "0", ""] - }, + "parameters": [ + "Thumb", + "Draggable", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "Thumb", "0", "0", ""] + "parameters": [ + "FillBar", + "Anchor", + "" + ] }, { "type": { - "value": "ChangePlan" + "value": "ActivateBehavior" }, - "parameters": ["Background", "=", "1"] + "parameters": [ + "Thumb", + "Anchor", + "" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["FillBar", "=", "2"] + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - FillBar.Width()" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Thumb", "=", "3"] + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - FillBar.Height()" + ] } ] }, @@ -5037,8 +5959,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the label that is displayed over the thumb.", - "comment2": "" + "comment": "This allows to detect a change of \"intial value\" on hot reload." }, { "type": "BuiltinCommonInstructions::Standard", @@ -5046,27 +5967,51 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": ["", "Label", "0", "0", ""] - }, - { - "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Label", "=", "4"] - }, + "parameters": [ + "PreviousInitialValue", + "=", + "InitialValue" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create the label that is displayed over the thumb." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "TextObject::SetWrapping" + "value": "Create" }, - "parameters": ["Label", "no"] + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -5080,8 +6025,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass the configuration to the behavior.", - "comment2": "" + "comment": "Pass the configuration to the behavior." }, { "type": "BuiltinCommonInstructions::Standard", @@ -5091,7 +6035,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -5100,7 +6047,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -5114,19 +6061,28 @@ "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Thumb", ""] + "parameters": [ + "Thumb", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["FillBar", ""] + "parameters": [ + "FillBar", + "" + ] } ] } @@ -5151,17 +6107,14 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] }, @@ -5170,24 +6123,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -5197,7 +6150,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -5221,137 +6174,323 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": ["Background", "ButtonFSM"] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" - }, - "parameters": ["Thumb", "Draggable"] - }, + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" + "value": "BehaviorActivated" }, - "parameters": ["Thumb", "Draggable"] - }, + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "inverted": true, + "value": "DraggableBehavior::Dragged" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Thumb", + "Draggable" + ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "inverted": true, + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "DraggableBehavior::Dragged" }, - "parameters": ["Object"] + "parameters": [ + "Thumb", + "Draggable" + ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["Label", ""] - }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { "value": "ResetObjectTimer" }, - "parameters": ["Label", "\"HideBack\""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] } ], "actions": [ @@ -5359,250 +6498,61 @@ "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": ["Object"] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": ["Label", ""] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": ["Label"] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - } - ] - } - ], - "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 parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } ] } ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": ["Object", "=", "1"] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": ["Object", ""] + } + ], + "parameters": [] } ] } @@ -5638,19 +6588,30 @@ "type": { "value": "DraggableBehavior::Dragged" }, - "parameters": ["Thumb", "Draggable"] + "parameters": [ + "Thumb", + "Draggable" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressed" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] } ] } @@ -5660,7 +6621,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5690,7 +6653,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::Value()"] + "parameters": [ + "FillBar.Slider::Value()" + ] } ] } @@ -5727,7 +6692,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -5735,7 +6700,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -5772,7 +6740,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MinValue()"] + "parameters": [ + "FillBar.Slider::MinValue()" + ] } ] } @@ -5809,21 +6779,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -5860,7 +6827,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MaxValue()"] + "parameters": [ + "FillBar.Slider::MaxValue()" + ] } ] } @@ -5897,21 +6866,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -5948,7 +6914,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::StepSize()"] + "parameters": [ + "FillBar.Slider::StepSize()" + ] } ] } @@ -5985,7 +6953,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -6021,9 +6989,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] } ], "actions": [ @@ -6031,7 +7003,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -6060,23 +7034,33 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "ShowLabelAtChanges", + "False", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -6085,23 +7069,34 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] } ] } @@ -6121,53 +7116,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -6183,7 +7131,13 @@ "type": { "value": "PanelSpriteSlider::Slider::Size" }, - "parameters": ["FillBar", "Slider", ">", "0", ""] + "parameters": [ + "FillBar", + "Slider", + ">", + "0", + "" + ] } ], "actions": [], @@ -6194,10 +7148,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -6215,14 +7170,18 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { "type": { "value": "SetCenterY" }, - "parameters": ["Thumb", "=", "FillBar.CenterY()"] + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] } ] }, @@ -6232,10 +7191,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -6244,7 +7204,11 @@ "type": { "value": "SetCenterX" }, - "parameters": ["Label", "=", "Thumb.CenterX()"] + "parameters": [ + "Label", + "=", + "Thumb.CenterX()" + ] }, { "type": { @@ -6253,14 +7217,18 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, - "parameters": ["Label", "=", "-Object.Angle()"] + "parameters": [ + "Label", + "=", + "-Object.Angle()" + ] } ] } @@ -6277,74 +7245,6 @@ ], "objectGroups": [] }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.PropertyBarLeftPadding()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "fullName": "", "functionType": "Expression", @@ -6361,7 +7261,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -6398,8 +7298,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass configuration to the behavior and update children.", - "comment2": "" + "comment": "Pass configuration to the behavior and update children." }, { "type": "BuiltinCommonInstructions::Standard", @@ -6412,9 +7311,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -6424,7 +7322,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -6435,7 +7333,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -6464,9 +7362,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -6474,13 +7376,21 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "yes"] + "parameters": [ + "Thumb", + "Draggable", + "yes" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "yes"] + "parameters": [ + "Background", + "ButtonFSM", + "yes" + ] } ] }, @@ -6490,9 +7400,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -6500,19 +7414,29 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "no"] + "parameters": [ + "Thumb", + "Draggable", + "no" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "no"] + "parameters": [ + "Background", + "ButtonFSM", + "no" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] } @@ -6546,7 +7470,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Background", "ButtonFSM"] + "parameters": [ + "Background", + "ButtonFSM" + ] } ], "actions": [ @@ -6554,7 +7481,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -6575,100 +7504,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -6676,8 +7604,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -6686,8 +7612,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -6696,121 +7624,308 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["FillBar"], + "extraInformation": [ + "FillBar" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, { "value": "", - "type": "Boolean", - "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Label"], - "hidden": true, - "name": "ShowLabel" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } + "type": "Boolean", + "label": "", + "description": "Only used by the scene editor.", + "extraInformation": [ + "Label" + ], + "choices": [], + "hidden": true, + "name": "ShowLabel" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" + } + ], + "variants": [ + { + "areaMaxX": 215, + "areaMaxY": 18, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", + "assetStoreOriginalName": "Square Blue Slider", + "name": "Square Blue Slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 16, + "color": { + "b": 221, + "g": 221, + "r": 221 + }, + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "221;221;221" + } + }, + { + "assetStoreId": "", + "bottomMargin": 3, + "height": 21, + "leftMargin": 3, + "name": "Thumb", + "rightMargin": 3, + "texture": "Square Blue Slider Thumb.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 21, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 1, + "height": 11, + "leftMargin": 1, + "name": "FillBar", + "rightMargin": 1, + "texture": "Square Blue Slider Fill Bar.png", + "tiled": false, + "topMargin": 1, + "type": "PanelSpriteObject::PanelSprite", + "width": 209, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 4, + "height": 18, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square Blue Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 215, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] } - ] + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 11, + "keepRatio": true, + "layer": "", + "name": "FillBar", + "persistentUuid": "92813097-aee7-4422-8421-125e3ed61986", + "width": 209, + "x": 3, + "y": 3, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Thumb", + "persistentUuid": "ac167400-9a98-4f22-a0a2-8b28626074a6", + "width": 0, + "x": 194, + "y": -2, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -6821,39 +7936,30 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Fire bullets", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", - "shortDescription": "Fire bullets, manage ammo, reloading, and overheating.", - "version": "0.6.1", + "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", + "version": "0.9.1", "description": [ - "Fire bullets, manage ammo, reloading, and overheating.", + "This extension allows objects to fire bullets. To use it, add the behavior to the object that will shoot, then use the provided action to launch another object as the bullet.", "", - "Firing bullets:", - "- Cooldown: Time between shots (seconds)", - "- Bullet Quantity: Number of bullets created each time Fire Bullet action is used. ", - "- Firing Arc: Range of angles (in degrees) that bullets will shoot. Bullets are evenly spread within this range.", - "- Rotate bullet: Change the angle of each bullet to match the direction it is travelling (enabled by default)", - "- Angle Variance: Each bullet trajectory will be adjusted by a random value within this range (degrees)", - "- Bullet speed variance: Each bullet speed will be adjusted by a random value within this range (pixels/second)", + "The properties of the behavior can be used to customize:", + "- Cooldown between shots", + "- Firing multiple bullets at a time ([open the project online](https://editor.gdevelop.io/?project=example://fire-bullet))", + "- Ammo management", + "- Overheat", "", - " Ammo:", - "- Starting ammo", - "- Max ammo", - "- Shots per reload. Use 0 to disable reloading", - "- Reload duration", - "- Automatic reloading is enabled by default, but it can also be done manually.", + "The speed can be specified when using the actions to fire the bullets.", + "The bullets are automatically given a permanent force to make them move (no need to use a linear movement or move them with another behavior).", "", - "Overheat:", - "- Heat increase per shot. Object is Overheated when Heat reaches 1.", - "- Cooling rate per second", - "- When overheated, the object cannot fire any bullets", + "It can be used for:", + "- Twin-stick shooters ([open the project online](https://editor.gdevelop.io/?project=example://conviction-of-gun-dude-desktop))", + "- Shoot'em up ([open the project online](https://editor.gdevelop.io/?project=example://space-shooter))", "", - "Statistics:", - "- Total bullets created", - "- Total shots taken", - "- Total reloads completed" + "A simple example shows how to make firing patterns ([open the project online](https://editor.gdevelop.io/?project=example://firing-patterns))." ], "origin": { "identifier": "FireBullet", @@ -6877,10 +7983,12 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "Fire bullets, manage ammo, reloading, and overheating.", + "description": "Fire bullets, manage ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior action in your events to fire another object as a bullet. This action will also make the bullet move (using a permanent force) at the speed specified in the action.", "fullName": "Fire bullets", "name": "FireBullet", "objectType": "", @@ -6906,24 +8014,22 @@ }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "Object.Behavior::PropertyStartingAmmo()" + "StartingAmmo" ] }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -6969,154 +8075,151 @@ "textG": 0, "textR": 0 }, - "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\".", - "comment2": "" + "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\"." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "HasJustFired", + "True", + "" + ] } ], - "actions": [], - "events": [ + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Reset firing cooldown", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Object", - "\"__FireBullet.FiringCooldown\"" - ] - } - ] - } - ], - "parameters": [] + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "False", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.FiringCooldown\"" + ] }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TotalShotsFired", + "+", + "1" + ] + } + ], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Update ammo", + "name": "Ammo", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Subtract 1 from ammo (if not unlimited ammo)", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, - "value": "FireBullet::FireBullet::PropertyUnlimitedAmmo" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "UnlimitedAmmo", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "-", "1"] + "parameters": [ + "AmmoQuantity", + "=", + "max(0, AmmoQuantity - 1)" + ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update reloading counter", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsPerReload" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "ShotsPerReload", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "-", "1"] + "parameters": [ + "ShotsBeforeNextReload", + "-", + "1" + ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Automatically reload gun when needed", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "AutomaticReloading", + "True", + "" + ] }, { "type": { "value": "FireBullet::FireBullet::IsReloadNeeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsReloadInProgress" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -7124,7 +8227,11 @@ "type": { "value": "FireBullet::FireBullet::ReloadAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -7136,70 +8243,46 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Update Overheat", + "name": "Overheat", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Increase heat (if needed)", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHeatIncreasePerShot" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "HeatIncreasePerShot", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "+", - "Object.Behavior::PropertyHeatIncreasePerShot()" + "HeatIncreasePerShot" ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if this caused overheat", - "comment2": "" - }, + } + ], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyOverheatDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OverheatDuration", ">", "0" ] @@ -7208,7 +8291,11 @@ "type": { "value": "FireBullet::FireBullet::IsOverheated" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -7227,54 +8314,6 @@ } ], "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update statistics", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalShotsFired" - }, - "parameters": ["Object", "Behavior", "+", "1"] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Reset firing detection", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::SetPropertyHasJustFired" - }, - "parameters": ["Object", "Behavior", "="] - } - ] - } - ], - "parameters": [] } ] } @@ -7286,7 +8325,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Reload gun when needed", + "name": "Reload", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -7300,8 +8339,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect when reload is completed", - "comment2": "" + "comment": "Detect when reload is completed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7310,7 +8348,11 @@ "type": { "value": "FireBullet::FireBullet::IsReloadInProgress" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { @@ -7320,22 +8362,30 @@ "Object", "\"__FireBullet.ReloadingTimer\"", ">=", - "Object.Behavior::PropertyReloadDuration()" + "ReloadDuration" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalReloadsCompleted" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "+", "1"] + "parameters": [ + "TotalReloadsCompleted", + "+", + "1" + ] }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadInProgress" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "ReloadInProgress", + "False", + "" + ] } ], "events": [ @@ -7346,19 +8396,22 @@ "type": { "value": "FireBullet::FireBullet::IsUnlimitedAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -7373,8 +8426,7 @@ "textG": 0, "textR": 0 }, - "comment": "Only reload the amount of ammo available", - "comment2": "" + "comment": "Only reload the amount of ammo available" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7384,19 +8436,22 @@ "inverted": true, "value": "FireBullet::FireBullet::IsUnlimitedAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "min(Object.Behavior::PropertyShotsPerReload(), Object.Behavior::PropertyAmmoQuantity())" + "min(ShotsPerReload, AmmoQuantity)" ] } ] @@ -7411,7 +8466,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Reduce heat level (based on cooling rate)", + "name": "Cooling", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -7423,7 +8478,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object.Behavior::HeatLevel()", + "HeatLevel", ">", "0" ] @@ -7436,21 +8491,24 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyExponentialCoolingRate" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "ExponentialCoolingRate", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "=", - "max(0, Object.Behavior::PropertyHeatLevel() - TimeDelta() * Object.Behavior::PropertyExponentialCoolingRate() * Object.Behavior::PropertyHeatLevel())" + "max(0, HeatLevel - TimeDelta() * ExponentialCoolingRate * HeatLevel)" ] } ] @@ -7460,21 +8518,24 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyLinearCoolingRate" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "LinearCoolingRate", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "=", - "max(0, Object.Behavior::PropertyHeatLevel() - TimeDelta() * Object.Behavior::PropertyLinearCoolingRate())" + "max(0, HeatLevel - TimeDelta() * LinearCoolingRate)" ] } ] @@ -7501,44 +8562,101 @@ "objectGroups": [] }, { - "description": "Fire bullets toward a position.", + "description": "Fire bullets toward an object at a specified speed.", + "fullName": "Fire bullets toward an object", + "functionType": "Action", + "name": "FireTowardObject", + "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward _PARAM5_ with speed _PARAM6_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "Object.AngleToObject(TargetObject)", + "Speed", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "X position, where to create the bullet", + "name": "XPosition", + "type": "expression" + }, + { + "description": "Y position, where to create the bullet", + "name": "YPosition", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "Target object", + "name": "TargetObject", + "type": "objectList" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Fire bullets toward a position at a specified speed.", "fullName": "Fire bullets toward a position", "functionType": "Action", "name": "FireTowardPosition", "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward position _PARAM5_;_PARAM6_ with speed _PARAM7_ px/s", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Calculate the trajectory angle and use the \"Fire bullets\" action", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::Fire" - }, - "parameters": [ - "Object", - "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "Object.AngleToPosition(GetArgumentAsNumber(\"TargetXPosition\"),GetArgumentAsNumber(\"TargetYPosition\"))", - "GetArgumentAsNumber(\"Speed\")", - "" - ] - } + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "Object.AngleToPosition(TargetXPosition, TargetYPosition)", + "Speed", + "" ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -7566,7 +8684,7 @@ { "description": "The bullet object", "name": "Bullet", - "type": "objectList" + "type": "objectListOrEmptyIfJustDeclared" }, { "description": "Target X position", @@ -7587,135 +8705,170 @@ "objectGroups": [] }, { - "description": "Fire bullets in the direction of a given angle.", + "description": "Fire bullets in the direction of a given angle at a specified speed.", "fullName": "Fire bullets toward an angle", "functionType": "Action", "name": "Fire", "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward angle _PARAM5_ and speed _PARAM6_ px/s", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check if ready to shoot", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::IsReadyToShoot" + "value": "BuiltinCommonInstructions::CompareNumbers" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "BulletQuantity", + "=", + "1" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHasJustFired" + "value": "FireBullet::FireBullet::FireSingleBullet" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "Angle", + "Speed", + "" + ] } - ], - "events": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Single bullet", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PropertyBulletQuantity()", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::FireSingleBullet" - }, - "parameters": [ - "Object", - "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "GetArgumentAsNumber(\"Angle\")", - "GetArgumentAsNumber(\"Speed\")", - "" - ] - } - ] - } - ], - "parameters": [] - }, + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "BulletQuantity", + ">", + "1" + ] + } + ], + "actions": [], + "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Multiple bullets", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "BulletQuantity", + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PropertyBulletQuantity()", - ">", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::FiringArc" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "360", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "MultiShotAngle", + "=", + "Angle + lerp(-FiringArc / 2, FiringArc / 2, BulletIndex / (BulletQuantity - 1)) " + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "ModVarObjet" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "__FireBullet.CurrentBulletAngle", - "=", - "GetArgumentAsNumber(\"Angle\") - Object.Behavior::PropertyFiringArc()/2" - ] + "comment": "When firing in a full circle, prevent first and last bullet from using the same angle" }, { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.BatchOrderID", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::FiringArc" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "360", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "MultiShotAngle", + "=", + "Angle + lerp(-FiringArc / 2, FiringArc / 2, BulletIndex / BulletQuantity) " + ] + } ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Object.Behavior::PropertyBulletQuantity()", + "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { @@ -7725,55 +8878,22 @@ "parameters": [ "Object", "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", + "XPosition", + "YPosition", "Bullet", - "Object.Variable(__FireBullet.CurrentBulletAngle) + RandomInRange(-Object.Behavior::PropertyAngleVariance(),Object.Behavior::PropertyAngleVariance())", - "GetArgumentAsNumber(\"Speed\")", + "MultiShotAngle", + "Speed", "" ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move temp variable to the next angle a bullet will be sent", - "comment2": "" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.CurrentBulletAngle", - "+", - "Object.Behavior::PropertyFiringArc() / (Object.Behavior::PropertyBulletQuantity() - 1)" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.BatchOrderID", - "+", - "1" - ] - } + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BulletIndex", + "+", + "1" ] } ] @@ -7781,12 +8901,23 @@ ] } ], - "parameters": [] + "variables": [ + { + "folded": true, + "name": "MultiShotAngle", + "type": "number", + "value": 0 + }, + { + "name": "BulletIndex", + "type": "number", + "value": 0 + } + ] } ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -7814,7 +8945,7 @@ { "description": "The bullet object", "name": "Bullet", - "type": "objectList" + "type": "objectListOrEmptyIfJustDeclared" }, { "description": "Angle of the bullet, in degrees", @@ -7857,8 +8988,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create bullet", - "comment2": "" + "comment": "Create bullet" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7871,9 +9001,9 @@ "parameters": [ "", "Bullet", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Object.Behavior::PropertyBulletLayer()" + "XPosition", + "YPosition", + "BulletLayer" ] } ], @@ -7888,8 +9018,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move bullet (apply angle and bullet speed variances)", - "comment2": "" + "comment": "Move bullet (apply angle and bullet speed variances)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7897,13 +9026,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRandomizedAngle" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RandomizedAngle", "=", - "GetArgumentAsNumber(\"Angle\") + RandomInRange(-Object.Behavior::PropertyAngleVariance(), Object.Behavior::PropertyAngleVariance())" + "Angle + RandomInRange(-AngleVariance, AngleVariance)" ] }, { @@ -7912,8 +9040,8 @@ }, "parameters": [ "Bullet", - "Object.Behavior::PropertyRandomizedAngle()", - "GetArgumentAsNumber(\"Speed\") + RandomInRange(-Object.Behavior::PropertyBulletSpeedVariance(), Object.Behavior::PropertyBulletSpeedVariance())", + "RandomizedAngle", + "Speed + RandomInRange(-BulletSpeedVariance, BulletSpeedVariance)", "1" ] } @@ -7929,70 +9057,21 @@ "textG": 0, "textR": 0 }, - "comment": "Add identifier variables (to enable advanced picking by users)", - "comment2": "" + "comment": "Rotate newly created bullet, if needed" }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Bullet", - "__FireBullet.BulletID", - "=", - "Object.Behavior::PropertyTotalBulletsCreated()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Bullet", - "__FireBullet.BatchID", - "=", - "Object.Behavior::PropertyTotalShotsFired()" - ] - }, + "conditions": [ { "type": { - "value": "ModVarObjet" + "value": "BooleanVariable" }, "parameters": [ - "Bullet", - "__FireBullet.BatchOrderID", - "=", - "0" + "RotateBullet", + "True", + "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Rotate newly created bullet, if needed", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "FireBullet::FireBullet::PropertyRotateBullet" - }, - "parameters": ["Object", "Behavior"] - } ], "actions": [ { @@ -8002,7 +9081,7 @@ "parameters": [ "Bullet", "=", - "Object.Behavior::PropertyRandomizedAngle()" + "RandomizedAngle" ] } ] @@ -8019,8 +9098,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update statistics", - "comment2": "" + "comment": "Update statistics" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8028,9 +9106,13 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalBulletsCreated" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "+", "1"] + "parameters": [ + "TotalBulletsCreated", + "+", + "1" + ] } ] } @@ -8063,7 +9145,7 @@ { "description": "The bullet object", "name": "Bullet", - "type": "objectList" + "type": "objectListOrEmptyIfJustDeclared" }, { "description": "Angle of the bullet, in degrees", @@ -8093,15 +9175,23 @@ "inverted": true, "value": "FireBullet::FireBullet::IsOutOfAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadInProgress" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "ReloadInProgress", + "True", + "" + ] }, { "type": { @@ -8138,26 +9228,18 @@ "name": "HasJustFired", "sentence": "_PARAM0_ has just fired", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["False"] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "HasJustFired", + "True", + "" + ] } ], "actions": [ @@ -8165,7 +9247,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -8198,9 +9282,13 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyRotateBullet" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "RotateBullet", + "True", + "" + ] } ], "actions": [ @@ -8208,7 +9296,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -8244,7 +9334,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyFiringArc()"] + "parameters": [ + "FiringArc" + ] } ] } @@ -8280,13 +9372,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyFiringArc" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FiringArc", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8333,7 +9424,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -8376,7 +9467,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyAngleVariance()"] + "parameters": [ + "AngleVariance" + ] } ] } @@ -8412,13 +9505,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAngleVariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AngleVariance", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8465,7 +9557,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -8509,7 +9601,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyBulletSpeedVariance()" + "BulletSpeedVariance" ] } ] @@ -8546,13 +9638,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletSpeedVariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletSpeedVariance", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8599,7 +9690,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -8643,7 +9734,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyBulletQuantity()" + "BulletQuantity" ] } ] @@ -8680,13 +9771,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletQuantity", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8733,7 +9823,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -8774,13 +9864,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletLayer" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletLayer", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8820,17 +9909,25 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"RotateBullet\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRotateBullet" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "RotateBullet", + "False", + "" + ] } ] }, @@ -8839,17 +9936,25 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"RotateBullet\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRotateBullet" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "RotateBullet", + "True", + "" + ] } ] } @@ -8869,7 +9974,7 @@ { "defaultValue": "yes", "description": "Rotate bullet to match trajetory", - "name": "RotateBullet", + "name": "Value", "optional": true, "type": "yesorno" } @@ -8890,17 +9995,25 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"UnlimitedAmmo\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyUnlimitedAmmo" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "UnlimitedAmmo", + "False", + "" + ] } ] }, @@ -8909,17 +10022,25 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"UnlimitedAmmo\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyUnlimitedAmmo" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "UnlimitedAmmo", + "True", + "" + ] } ] } @@ -8939,7 +10060,7 @@ { "defaultValue": "yes", "description": "Unlimited ammo", - "name": "UnlimitedAmmo", + "name": "Value", "optional": true, "type": "yesorno" } @@ -8962,7 +10083,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyFireCooldown()"] + "parameters": [ + "FireCooldown" + ] } ] } @@ -8998,13 +10121,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyFireCooldown" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FireCooldown", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9051,7 +10173,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"NewCooldown\")", + "Value", "" ] } @@ -9072,7 +10194,7 @@ }, { "description": "Cooldown in seconds", - "name": "NewCooldown", + "name": "Value", "type": "expression" } ], @@ -9095,7 +10217,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyReloadDuration()" + "ReloadDuration" ] } ] @@ -9132,13 +10254,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ReloadDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9185,7 +10306,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -9229,7 +10350,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyOverheatDuration()" + "OverheatDuration" ] } ] @@ -9266,13 +10387,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyOverheatDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OverheatDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9319,7 +10439,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -9362,7 +10482,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyAmmoQuantity()"] + "parameters": [ + "AmmoQuantity" + ] } ] } @@ -9398,13 +10520,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "GetArgumentAsNumber(\"Value\")" + "max(0, Value)" ] } ] @@ -9451,7 +10572,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "max(0, Value)", "" ] } @@ -9495,7 +10616,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyHeatIncreasePerShot()" + "HeatIncreasePerShot" ] } ] @@ -9532,13 +10653,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatIncreasePerShot" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatIncreasePerShot", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9585,7 +10705,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -9628,7 +10748,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxAmmo()"] + "parameters": [ + "MaxAmmo" + ] } ] } @@ -9664,13 +10786,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyMaxAmmo" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxAmmo", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9680,21 +10801,24 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyMaxAmmo" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "MaxAmmo", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "min(Object.Behavior::MaxAmmo(),Object.Behavior::AmmoQuantity())" + "min(MaxAmmo, AmmoQuantity)" ] } ] @@ -9741,7 +10865,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -9782,9 +10906,13 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalShotsFired" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TotalShotsFired", + "=", + "0" + ] } ] } @@ -9818,9 +10946,13 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalBulletsCreated" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TotalBulletsCreated", + "=", + "0" + ] } ] } @@ -9854,9 +10986,13 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalReloadsCompleted" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TotalReloadsCompleted", + "=", + "0" + ] } ] } @@ -9893,7 +11029,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -9930,13 +11066,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsPerReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsPerReload", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9946,26 +11081,24 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsBeforeNextReload" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", ">", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -10012,7 +11145,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -10053,9 +11186,13 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAutomaticReloading" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "="] + "parameters": [ + "AutomaticReloading", + "False", + "" + ] } ] }, @@ -10064,17 +11201,25 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAutomaticReloading" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "AutomaticReloading", + "True", + "" + ] } ] } @@ -10118,7 +11263,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyLinearCoolingRate()" + "LinearCoolingRate" ] } ] @@ -10155,13 +11300,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyLinearCoolingRate" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LinearCoolingRate", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -10208,7 +11352,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -10252,7 +11396,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyExponentialCoolingRate()" + "ExponentialCoolingRate" ] } ] @@ -10289,13 +11433,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyExponentialCoolingRate" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ExponentialCoolingRate", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -10343,7 +11486,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -10384,13 +11527,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "+", - "GetArgumentAsNumber(\"AmmoGained\")" + "AmmoGained" ] } ] @@ -10405,29 +11547,31 @@ "textG": 0, "textR": 0 }, - "comment": "If Max Ammo is set, do not exceed the value", - "comment2": "" + "comment": "If Max Ammo is set, do not exceed the value" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyMaxAmmo" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "MaxAmmo", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "min(Object.Behavior::MaxAmmo(),Object.Behavior::AmmoQuantity())" + "min(MaxAmmo, AmmoQuantity)" ] } ] @@ -10439,13 +11583,21 @@ "type": { "value": "FireBullet::FireBullet::IsReloadNeeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "AutomaticReloading", + "True", + "" + ] } ], "actions": [ @@ -10453,7 +11605,11 @@ "type": { "value": "FireBullet::FireBullet::ReloadAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -10494,7 +11650,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyBulletLayer()"] + "parameters": [ + "BulletLayer" + ] } ] } @@ -10534,7 +11692,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "min(1,Object.Behavior::PropertyHeatLevel())" + "min(1, HeatLevel)" ] } ] @@ -10575,7 +11733,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalShotsFired()" + "TotalShotsFired" ] } ] @@ -10616,7 +11774,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalBulletsCreated()" + "TotalBulletsCreated" ] } ] @@ -10657,7 +11815,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalReloadsCompleted()" + "TotalReloadsCompleted" ] } ] @@ -10698,7 +11856,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyShotsBeforeNextReload()" + "ShotsBeforeNextReload" ] } ] @@ -10739,7 +11897,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "max(0,Object.Behavior::Cooldown() - Object.ObjectTimerElapsedTime(\"__FireBullet.FiringCooldown\"))" + "max(0, FireCooldown - Object.ObjectTimerElapsedTime(\"__FireBullet.FiringCooldown\"))" ] } ] @@ -10792,7 +11950,60 @@ "value": "SetReturnNumber" }, "parameters": [ - "max(0, Object.Behavior::PropertyOverheatDuration() - Object.ObjectTimerElapsedTime(\"__FireBullet.OverheatDuration\"))" + "max(0, OverheatDuration - Object.ObjectTimerElapsedTime(\"__FireBullet.OverheatDuration\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the remaining duration before the reload finishes, in seconds.", + "fullName": "Duration before the reload finishes", + "functionType": "ExpressionAndCondition", + "group": "Reload", + "name": "ReloadTimeLeft", + "sentence": "the remaining duration before the reload finishes", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.ReloadingTimer\"", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0, ReloadDuration - Object.ObjectTimerElapsedTime(\"__FireBullet.ReloadingTimer\"))" ] } ] @@ -10832,7 +12043,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -10841,9 +12054,13 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyReloadInProgress" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "ReloadInProgress", + "True", + "" + ] } ], "actions": [ @@ -10851,7 +12068,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -10887,7 +12106,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -10902,9 +12123,13 @@ "subInstructions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "HasJustFired", + "True", + "" + ] }, { "type": { @@ -10916,42 +12141,65 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsOutOfAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsReloadNeeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsReloadInProgress" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsFiringCooldownActive" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsOverheated" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -10963,7 +12211,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -10999,7 +12249,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11008,9 +12260,13 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "AutomaticReloading", + "True", + "" + ] } ], "actions": [ @@ -11018,7 +12274,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11054,7 +12312,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11063,9 +12323,13 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyUnlimitedAmmo" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "UnlimitedAmmo", + "True", + "" + ] } ], "actions": [ @@ -11073,7 +12337,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11109,7 +12375,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11121,13 +12389,21 @@ "inverted": true, "value": "FireBullet::FireBullet::IsUnlimitedAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { - "value": "FireBullet::FireBullet::PropertyAmmoQuantity" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "AmmoQuantity", + "<=", + "0" + ] } ], "actions": [ @@ -11135,7 +12411,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11171,7 +12449,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11185,23 +12465,30 @@ "textG": 0, "textR": 0 }, - "comment": "Shots per reload must not be \"0\"", - "comment2": "" + "comment": "Shots per reload must not be \"0\"" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsPerReload" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "ShotsPerReload", + ">", + "0" + ] }, { "type": { - "value": "FireBullet::FireBullet::PropertyShotsBeforeNextReload" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "ShotsBeforeNextReload", + "=", + "0" + ] } ], "actions": [ @@ -11209,7 +12496,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11245,7 +12534,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11260,9 +12551,13 @@ "subInstructions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHeatLevel" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">=", "1"] + "parameters": [ + "HeatLevel", + ">=", + "1" + ] }, { "type": { @@ -11282,7 +12577,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11318,7 +12615,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11341,7 +12640,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11368,22 +12669,22 @@ "type": "Number", "unit": "Second", "label": "Firing cooldown", - "description": "Objects cannot shoot while firing cooldown is active", - "group": "", - "extraInformation": [], - "hidden": false, + "description": "Objects cannot shoot while firing cooldown is active.", "name": "FireCooldown" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustFired" }, + { + "value": "true", + "type": "Boolean", + "label": "Rotate bullets to match their trajectory", + "name": "RotateBullet" + }, { "value": "45", "type": "Number", @@ -11391,18 +12692,14 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], - "hidden": false, "name": "FiringArc" }, { "value": "1", "type": "Number", - "label": "Number of bullets created at once (Multi-Fire)", + "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], - "hidden": false, "name": "BulletQuantity" }, { @@ -11410,29 +12707,25 @@ "type": "Number", "unit": "DegreeAngle", "label": "Angle variance", - "description": "Make imperfect aim (Range: 0 to 180 degrees)", + "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "AngleVariance" }, { - "value": "true", - "type": "Boolean", - "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "RotateBullet" + "value": "0", + "type": "Number", + "unit": "PixelSpeed", + "label": "Bullet speed variance", + "description": "Bullet speed will be adjusted by a random value within this range.", + "group": "Firing variance", + "advanced": true, + "name": "BulletSpeedVariance" }, { "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -11440,10 +12733,9 @@ "value": "0", "type": "Number", "label": "Shots per reload ", - "description": "Use 0 to disable reloading", + "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "ShotsPerReload" }, { @@ -11451,29 +12743,23 @@ "type": "Number", "unit": "Second", "label": "Reloading duration", - "description": "Objects cannot shoot while reloading is in progress", + "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "ReloadDuration" }, { "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "MaxAmmo" }, { "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -11482,8 +12768,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" }, @@ -11491,9 +12775,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -11501,19 +12782,14 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "StartingAmmo" }, { "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, @@ -11521,39 +12797,30 @@ "value": "true", "type": "Boolean", "label": "Unlimited ammo", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "UnlimitedAmmo" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ReloadInProgress" }, { "value": "0", "type": "Number", - "label": "Heat increase per shot (Range: 0 to 1)", - "description": " Object is overheated when Heat reaches 1", + "label": "Heat increase per shot (between 0 and 1)", + "description": " Object is overheated when Heat reaches 1.", "group": "Overheat", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "HeatIncreasePerShot" }, { "value": "0", "type": "Number", "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeatLevel" }, @@ -11561,10 +12828,8 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "AutomaticReloading" }, { @@ -11572,39 +12837,39 @@ "type": "Number", "unit": "Second", "label": "Overheat duration", - "description": "Object cannot shoot while overheat duration is active", + "description": "Object cannot shoot while overheat duration is active.", "group": "Overheat", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "OverheatDuration" }, { "value": "0.1", "type": "Number", "label": "Linear cooling rate (per second)", - "description": "", "group": "Overheat", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "LinearCoolingRate" }, { "value": "0.3", "type": "Number", "label": "Exponential cooling rate (per second)", - "description": "Happens faster when heat is high and slower when heat is low", + "description": "Happens faster when heat is high and slower when heat is low.", "group": "Overheat", - "extraInformation": ["Linear", "Exponential"], - "hidden": false, + "extraInformation": [ + "Linear", + "Exponential" + ], + "choices": [], + "advanced": true, "name": "ExponentialCoolingRate" }, { "value": "", "type": "String", "label": "Layer the bullets are created on", - "description": "Base layer by default", + "description": "Base layer by default.", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -11612,22 +12877,8 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" - }, - { - "value": "0", - "type": "Number", - "unit": "PixelSpeed", - "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" } ], "sharedPropertyDescriptors": [] @@ -11636,6 +12887,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] -} + "externalLayouts": [] +} \ No newline at end of file diff --git a/examples/boids-flocking-simulation/boids-flocking-simulation.json b/examples/boids-flocking-simulation/boids-flocking-simulation.json index 4945026cf..8d20ae43e 100644 --- a/examples/boids-flocking-simulation/boids-flocking-simulation.json +++ b/examples/boids-flocking-simulation/boids-flocking-simulation.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Boids Flocking Simulation", "description": "Learn how the settings of the boid behavior can enable a wide variety of movement styles.", @@ -79,10 +78,20 @@ "placement": "bottom-left", "showWatermark": true }, - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], - "authorUsernames": ["VictrisGames"], - "categories": ["simulation"], - "playableDevices": ["keyboard", "mobile"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "authorUsernames": [ + "VictrisGames" + ], + "categories": [ + "simulation" + ], + "playableDevices": [ + "keyboard", + "mobile", + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -94,7 +103,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Border.png", "kind": "image", "metadata": "", @@ -107,7 +115,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Fill Bar.png", "kind": "image", "metadata": "", @@ -120,7 +127,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Thumb.png", "kind": "image", "metadata": "", @@ -133,7 +139,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Toggle_Off.png", "kind": "image", "metadata": "", @@ -146,7 +151,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Toggle_On.png", "kind": "image", "metadata": "", @@ -159,7 +163,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/TargetSprite3.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -168,7 +171,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/BoidBird5.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -177,7 +179,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/background_gradient.jpg", "kind": "image", "metadata": "", @@ -186,7 +187,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/9patch_Bordered Hud Grey_all_32.png", "kind": "image", "metadata": "", @@ -199,7 +199,6 @@ } }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -207,8 +206,7 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -232,13 +230,16 @@ "gridType": "rectangular", "gridWidth": 16, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 0.3553434558816995, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -944,6 +945,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "CohesionSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1008,7 +1010,9 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1028,6 +1032,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "SeparationSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1092,7 +1097,9 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1112,6 +1119,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "AccelerationSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1177,7 +1185,9 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1197,6 +1207,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MaxSpeedSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1262,7 +1273,9 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1328,7 +1341,9 @@ "text": "Cohesion", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1382,7 +1397,9 @@ "text": "Separation", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1436,7 +1453,9 @@ "text": "Max Speed", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1490,7 +1509,9 @@ "text": "Acceleration ", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1498,6 +1519,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "AlignmentSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1562,7 +1584,9 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1628,7 +1652,9 @@ "text": "Alignment", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1636,6 +1662,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "FollowTargetSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1700,7 +1727,9 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1766,7 +1795,9 @@ "text": "Follow target", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1774,6 +1805,7 @@ "assetStoreId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", "name": "ShowTarget", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square Blue Toggle", "variables": [], "effects": [], "behaviors": [], @@ -1895,7 +1927,9 @@ "text": "Show target", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1949,7 +1983,9 @@ "text": "Sight Distance", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2003,7 +2039,9 @@ "text": "Weight", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2011,6 +2049,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "CohesionSightSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -2075,7 +2114,9 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2095,6 +2136,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "SeparationSightSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -2159,7 +2201,9 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2179,6 +2223,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "AlignmentSightSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -2243,7 +2288,9 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2309,7 +2356,9 @@ "text": "Show UI", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2317,6 +2366,7 @@ "assetStoreId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", "name": "ShowUI", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square Blue Toggle", "variables": [], "effects": [], "behaviors": [], @@ -2445,7 +2495,9 @@ "text": "FPS: ??", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 50, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2453,6 +2505,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "ObjectQty_Slider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -2518,7 +2571,9 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2584,7 +2639,9 @@ "text": "Object Quantity", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2711,7 +2768,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -2719,13 +2778,21 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["ShowTarget", "no", ""] + "parameters": [ + "ShowTarget", + "no", + "" + ] }, { "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["ShowUI", "no", ""] + "parameters": [ + "ShowUI", + "no", + "" + ] } ] } @@ -2898,7 +2965,10 @@ "type": { "value": "Delete" }, - "parameters": ["BoidBird", ""] + "parameters": [ + "BoidBird", + "" + ] } ] } @@ -2951,7 +3021,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["CohesionSlider", ""] + "parameters": [ + "CohesionSlider", + "" + ] } ], "actions": [ @@ -2975,7 +3048,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["SeparationSlider", ""] + "parameters": [ + "SeparationSlider", + "" + ] } ], "actions": [ @@ -2999,7 +3075,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["AlignmentSlider", ""] + "parameters": [ + "AlignmentSlider", + "" + ] } ], "actions": [ @@ -3023,7 +3102,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["CohesionSightSlider", ""] + "parameters": [ + "CohesionSightSlider", + "" + ] } ], "actions": [ @@ -3047,7 +3129,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["SeparationSightSlider", ""] + "parameters": [ + "SeparationSightSlider", + "" + ] } ], "actions": [ @@ -3071,7 +3156,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["AlignmentSightSlider", ""] + "parameters": [ + "AlignmentSightSlider", + "" + ] } ], "actions": [ @@ -3095,7 +3183,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["AccelerationSlider", ""] + "parameters": [ + "AccelerationSlider", + "" + ] } ], "actions": [ @@ -3119,7 +3210,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["MaxSpeedSlider", ""] + "parameters": [ + "MaxSpeedSlider", + "" + ] } ], "actions": [ @@ -3143,7 +3237,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["ShowTarget", ""] + "parameters": [ + "ShowTarget", + "" + ] }, { "type": { @@ -3157,7 +3254,10 @@ "type": { "value": "Montre" }, - "parameters": ["TargetObject", ""] + "parameters": [ + "TargetObject", + "" + ] } ] }, @@ -3169,7 +3269,10 @@ "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["ShowTarget", ""] + "parameters": [ + "ShowTarget", + "" + ] }, { "type": { @@ -3183,7 +3286,9 @@ "type": { "value": "Cache" }, - "parameters": ["TargetObject"] + "parameters": [ + "TargetObject" + ] } ] }, @@ -3194,7 +3299,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["ShowUI", ""] + "parameters": [ + "ShowUI", + "" + ] }, { "type": { @@ -3208,7 +3316,10 @@ "type": { "value": "ShowLayer" }, - "parameters": ["", "\"UI\""] + "parameters": [ + "", + "\"UI\"" + ] } ] }, @@ -3220,7 +3331,10 @@ "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["ShowUI", ""] + "parameters": [ + "ShowUI", + "" + ] }, { "type": { @@ -3234,7 +3348,10 @@ "type": { "value": "HideLayer" }, - "parameters": ["", "\"UI\""] + "parameters": [ + "", + "\"UI\"" + ] } ] } @@ -3247,6 +3364,7 @@ "ambientLightColorB": 0, "ambientLightColorG": 8042920, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -3275,6 +3393,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -3356,12 +3475,13 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Frames per second (FPS)", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMzAsM2gtMkg0SDJDMS40LDMsMSwzLjQsMSw0czAuNCwxLDEsMWgxdjE2YzAsMC42LDAuNCwxLDEsMWg5LjhsLTUuNSw2LjNjLTAuNCwwLjQtMC4zLDEsMC4xLDEuNEM4LjUsMjkuOSw4LjgsMzAsOSwzMA0KCWMwLjMsMCwwLjYtMC4xLDAuOC0wLjNsNS4yLTZWMjhjMCwwLjYsMC40LDEsMSwxczEtMC40LDEtMXYtNC4zbDUuMiw2YzAuMiwwLjIsMC41LDAuMywwLjgsMC4zYzAuMiwwLDAuNS0wLjEsMC43LTAuMg0KCWMwLjQtMC40LDAuNS0xLDAuMS0xLjRMMTguMiwyMkgyOGMwLjYsMCwxLTAuNCwxLTFWNWgxYzAuNiwwLDEtMC40LDEtMVMzMC42LDMsMzAsM3ogTTI0LjgsOC42bC00LDZjLTAuMywwLjQtMC44LDAuNi0xLjMsMC4zDQoJTDE1LjgsMTNoLTMuNGwtMy43LDMuN0M4LjUsMTYuOSw4LjMsMTcsOCwxN3MtMC41LTAuMS0wLjctMC4zYy0wLjQtMC40LTAuNC0xLDAtMS40bDQtNGMwLjItMC4yLDAuNC0wLjMsMC43LTAuM2g0DQoJYzAuMiwwLDAuMywwLDAuNCwwLjFsMy4yLDEuNmwzLjUtNS4zYzAuMy0wLjUsMC45LTAuNiwxLjQtMC4zQzI1LDcuNSwyNS4xLDguMSwyNC44LDguNnoiLz4NCjwvc3ZnPg0K", "name": "FPS", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/SEO/SEO_board_performance_profit.svg", "shortDescription": "Calculate and display the frames per second (FPS) of the game.", - "version": "1.1.0", + "version": "1.2.1", "description": [ "Provides an expression to get the current FPS and a text object behavior to display the current FPS.", "", @@ -3374,12 +3494,34 @@ "identifier": "FPS", "name": "gdevelop-extension-store" }, - "tags": ["fps", "frames", "per", "second", "performance", "speed"], + "tags": [ + "fps", + "frames", + "per", + "second", + "performance", + "speed" + ], "authorIds": [ "onPsboRtDkUHNOsx7OPr8R8G1oj2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [ + { + "folded": true, + "name": "FrameTimestamps", + "type": "array", + "children": [] + }, + { + "folded": true, + "name": "TimeElapsed", + "type": "number", + "value": 0 + } + ], "eventsFunctions": [ { "fullName": "", @@ -3393,9 +3535,12 @@ "actions": [ { "type": { - "value": "SceneVariablePushNumber" + "value": "PushNumber" }, - "parameters": ["__FPS.FrameTimestamps", "Time(\"timestamp\")"] + "parameters": [ + "FrameTimestamps", + "Time(\"timestamp\")" + ] } ] } @@ -3436,12 +3581,12 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__FPS.TimeElapsed", + "TimeElapsed", "=", - "Time(\"timestamp\") - Variable(__FPS.FrameTimestamps[0])" + "Time(\"timestamp\") - FrameTimestamps[0]" ] } ] @@ -3464,16 +3609,20 @@ "whileConditions": [ { "type": { - "value": "SceneVariableChildCount" + "value": "VariableChildCount" }, - "parameters": ["__FPS.FrameTimestamps", ">", "0"] + "parameters": [ + "FrameTimestamps", + ">", + "0" + ] }, { "type": { - "value": "VarScene" + "value": "NumberVariable" }, "parameters": [ - "__FPS.FrameTimestamps[0]", + "FrameTimestamps[0]", "<", "Time(\"timestamp\") - 1000" ] @@ -3483,9 +3632,12 @@ "actions": [ { "type": { - "value": "SceneVariableRemoveAt" + "value": "RemoveVariableAt" }, - "parameters": ["__FPS.FrameTimestamps", "0"] + "parameters": [ + "FrameTimestamps", + "0" + ] } ] }, @@ -3507,10 +3659,10 @@ "actions": [ { "type": { - "value": "SceneVariablePushNumber" + "value": "PushNumber" }, "parameters": [ - "__FPS.FrameTimestamps", + "FrameTimestamps", "Time(\"timestamp\")" ] } @@ -3539,7 +3691,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "VariableChildCount(__FPS.FrameTimestamps) / (Variable(__FPS.TimeElapsed) / 1000)" + "VariableChildCount(FrameTimestamps) / (TimeElapsed / 1000)" ] } ] @@ -3567,7 +3719,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FPS::FPS()"] + "parameters": [ + "FPS::FPS()" + ] } ] } @@ -3591,7 +3745,7 @@ "description": "Makes a text object display the current FPS.", "fullName": "FPS Displayer", "name": "FPSDisplayer", - "objectType": "TextObject::Text", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -3617,106 +3771,125 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__FPS.UnformattedFPS", + "UnformattedFPS", "=", - "ToString(roundTo(FPS::FPS(), Object.Behavior::PropertyDecimalDigits()))" + "ToString(roundTo(FPS::FPS(), DecimalDigits))" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Add trailing zeroes, if needed" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object.Behavior::PropertyDecimalDigits()", - ">", - "0" - ] + "comment": "Add trailing zeroes, if needed" }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "StrFind(VariableString(__FPS.UnformattedFPS),\".\")", - "=", - "-1" - ] - } - ], - "actions": [], - "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "DecimalDigits", + ">", + "0" + ] + }, { "type": { - "value": "ModVarSceneTxt" + "value": "BuiltinCommonInstructions::CompareNumbers" }, - "parameters": ["__FPS.UnformattedFPS", "+", "\".\""] + "parameters": [ + "StrFind(UnformattedFPS, \".\")", + "=", + "-1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "UnformattedFPS", + "+", + "\".\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "DecimalDigits", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "UnformattedFPS", + "+", + "\"0\"" + ] + } + ] } ] }, { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Object.Behavior::PropertyDecimalDigits()", + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show the formatted FPS text including the prefix" + }, + { + "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, - "parameters": ["__FPS.UnformattedFPS", "+", "\"0\""] + "parameters": [ + "Object", + "Text", + "=", + "prefix + UnformattedFPS" + ] } ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show the formatted FPS text including the prefix" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + ], + "variables": [ { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::Propertyprefix() + VariableString(__FPS.UnformattedFPS)" - ] + "folded": true, + "name": "UnformattedFPS", + "type": "string", + "value": "" } ] } @@ -3725,7 +3898,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "TextObject::Text", "type": "object" }, { @@ -3739,23 +3911,27 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Text capability", + "extraInformation": [ + "TextContainerCapability::TextContainerBehavior" + ], + "choices": [], + "name": "Text" + }, { "value": "FPS: ", "type": "String", - "label": "The prefix before the FPS count", - "description": "", - "group": "", - "extraInformation": [], + "label": "FPS counter prefix", "name": "prefix" }, { "value": "0", "type": "Number", "unit": "Dimensionless", - "label": "Number of decimal digits to display", - "description": "", - "group": "", - "extraInformation": [], + "label": "Number of decimal digits", "name": "DecimalDigits" } ], @@ -3769,12 +3945,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/toggle-switch", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", "name": "SpriteToggleSwitch", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.3.0", + "version": "2.0.2", "description": [ "Toggle switch that users can click or touch. The switch can be customized with sprites.", "", @@ -3784,13 +3961,50 @@ "identifier": "SpriteToggleSwitch", "name": "gdevelop-extension-store" }, - "tags": ["ui", "widget", "toggle", "switch", "check box"], + "tags": [ + "ui", + "widget", + "toggle", + "switch", + "check box" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Toggle switches now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing toggle switches 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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the switch object.", @@ -3811,9 +4025,13 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "WasChecked", + "False", + "" + ] } ] }, @@ -3824,15 +4042,23 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "WasChecked", + "True", + "" + ] } ] }, @@ -3843,15 +4069,23 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::TogglePropertyIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "IsChecked", + "Toggle", + "" + ] } ] } @@ -3883,9 +4117,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "IsChecked", + "True", + "" + ] } ], "actions": [ @@ -3893,7 +4131,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3925,16 +4165,24 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "IsChecked", + "True", + "" + ] }, { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "WasChecked", + "True", + "" + ] } ], "actions": [ @@ -3942,7 +4190,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3975,15 +4225,23 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "IsChecked", + "True", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "WasChecked", + "True", + "" + ] } ], "actions": [ @@ -3991,7 +4249,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4012,104 +4272,34 @@ "objectGroups": [] }, { - "description": "Check (or uncheck) the toggle switch.", - "fullName": "Check (or uncheck)", - "functionType": "Action", - "name": "SetChecked", - "sentence": "Check _PARAM0_: _PARAM2_", + "description": "Check if the toggle switch was toggled in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Avoid a started touch to interfere with a state change from events." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenChecked" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - }, - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ] - } + "parameters": [ + "Object", + "Behavior", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::ResetState" - }, - "parameters": ["Object", "ButtonFSM", ""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetReturnBoolean" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "True" + ] } ] }, @@ -4118,17 +4308,23 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenUnchecked" }, - "parameters": ["\"Value\""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetReturnBoolean" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "True" + ] } ] } @@ -4144,71 +4340,43 @@ "name": "Behavior", "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", "type": "behavior" - }, - { - "defaultValue": "yes", - "description": "IsChecked", - "name": "Value", - "optional": true, - "type": "yesorno" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "Button finite state machine", - "description": "", - "group": "", - "extraInformation": ["SpriteToggleSwitch::ButtonFSM"], - "name": "ButtonFSM" - }, - { - "value": "false", - "type": "Boolean", - "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "name": "IsChecked" }, { - "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "WasChecked" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", - "private": true, - "eventsFunctions": [ - { - "fullName": "", + "description": "Check (or uncheck) the toggle switch.", + "fullName": "Check (or uncheck)", "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", + "name": "SetChecked", + "sentence": "Check _PARAM0_: _PARAM2_", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "False", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Comment", @@ -4220,95 +4388,314 @@ "textG": 0, "textR": 0 }, - "comment": "The \"Validated\" state only last one frame." + "comment": "Avoid a started touch to interfere with a state change from events." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, "parameters": [ "Object", "Behavior", - "=", - "\"Validated\"" + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } + "parameters": [ + "Object", + "Behavior", + "" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" ] - }, - { + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsChecked", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "Object", + "Behavior", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "Object", + "Behavior", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button finite state machine", + "extraInformation": [ + "SpriteToggleSwitch::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "false", + "type": "Boolean", + "label": "Is checked", + "name": "IsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "PreviousIsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "WasChecked" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "name": "ButtonFSM", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -4318,393 +4705,430 @@ "textG": 0, "textR": 0 }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ] - } - ], - "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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", + "type": "BuiltinCommonInstructions::Standard", "conditions": [], - "actions": [], - "events": [ + "actions": [ { - "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": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "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": "BuiltinCommonInstructions::Or" + "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": [], - "subInstructions": [ + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "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\"" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "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": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -4713,13 +5137,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -4729,50 +5152,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -4804,7 +5328,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::ResetState" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -4837,15 +5365,23 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -4877,9 +5413,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -4887,7 +5427,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4919,9 +5461,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -4929,7 +5475,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4961,9 +5509,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -4971,7 +5523,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5003,9 +5557,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -5013,7 +5571,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -5022,11 +5582,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5037,7 +5596,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5069,11 +5630,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5084,7 +5644,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5116,11 +5678,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5131,7 +5692,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5166,7 +5729,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -5196,8 +5761,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -5205,14 +5768,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -5221,9 +5797,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -5231,9 +5804,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -5241,9 +5811,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -5251,9 +5818,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -5263,41 +5827,137 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "ToggleSwitch", "description": "A toggle switch that users can click or touch.", "fullName": "Toggle switch", + "isUsingLegacyInstancesRenderer": false, "name": "SpriteToggleSwitch", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": 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." + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ { - "type": { - "value": "Create" - }, - "parameters": ["", "State", "0", "0", ""] + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] } ] }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -5315,9 +5975,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "True", + "" + ] } ], "actions": [ @@ -5325,13 +5989,22 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "", ""] + "parameters": [ + "State", + "SwitchFSM", + "", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ] }, @@ -5340,10 +6013,13 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "False", + "" + ] } ], "actions": [ @@ -5351,13 +6027,22 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "no", ""] + "parameters": [ + "State", + "SwitchFSM", + "no", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", ""] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ] }, @@ -5369,7 +6054,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -5420,16 +6108,23 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "True", + "" + ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "SwitchFSM", ""] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ], "actions": [ @@ -5437,13 +6132,21 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["Object", "yes", "no"] + "parameters": [ + "Object", + "yes", + "no" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ] }, @@ -5452,16 +6155,23 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "False", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "SwitchFSM", ""] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ], "actions": [ @@ -5469,13 +6179,21 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["Object", "SwitchFSM", "no"] + "parameters": [ + "Object", + "SwitchFSM", + "no" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ] } @@ -5504,7 +6222,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -5533,7 +6254,11 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "parameters": ["State", "SwitchFSM", ""] + "parameters": [ + "State", + "SwitchFSM", + "" + ] } ], "actions": [ @@ -5541,7 +6266,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5570,7 +6297,11 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenChecked" }, - "parameters": ["State", "SwitchFSM", ""] + "parameters": [ + "State", + "SwitchFSM", + "" + ] } ], "actions": [ @@ -5578,7 +6309,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5607,7 +6340,54 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenUnchecked" }, - "parameters": ["State", "SwitchFSM", ""] + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was checked or unchecked in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenToggled" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] } ], "actions": [ @@ -5615,7 +6395,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5643,9 +6425,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ @@ -5653,7 +6439,12 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "no", ""] + "parameters": [ + "State", + "SwitchFSM", + "no", + "" + ] } ] }, @@ -5662,9 +6453,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ @@ -5672,7 +6467,12 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "yes", ""] + "parameters": [ + "State", + "SwitchFSM", + "yes", + "" + ] } ] } @@ -5695,21 +6495,59 @@ "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "private": true, - "sentence": "_PARAM0_ is idle", + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsIdle" + "value": "SpriteToggleSwitch::SwitchFSM::ToggleChecked" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "private": true, + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsIdle" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -5717,7 +6555,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5747,7 +6587,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -5755,7 +6599,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5784,7 +6630,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsHovered" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -5792,7 +6642,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5822,7 +6674,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsFocused" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -5830,7 +6686,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5850,7 +6708,6 @@ "fullName": "Is pressed", "functionType": "Condition", "name": "IsPressed", - "private": true, "sentence": "_PARAM0_ is pressed", "events": [ { @@ -5860,7 +6717,54 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsPressed" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "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": "SpriteToggleSwitch::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -5868,7 +6772,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5898,13 +6804,20 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { "value": "AnimationName" }, - "parameters": ["State", "\"Unchecked\""] + "parameters": [ + "State", + "\"Unchecked\"" + ] } ], "actions": [ @@ -5912,13 +6825,18 @@ "type": { "value": "SetAnimationName" }, - "parameters": ["State", "\"Checked\""] + "parameters": [ + "State", + "\"Checked\"" + ] }, { "type": { "value": "PlayAnimation" }, - "parameters": ["State"] + "parameters": [ + "State" + ] } ] }, @@ -5930,13 +6848,20 @@ "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { "value": "AnimationName" }, - "parameters": ["State", "\"Checked\""] + "parameters": [ + "State", + "\"Checked\"" + ] } ], "actions": [ @@ -5944,13 +6869,18 @@ "type": { "value": "SetAnimationName" }, - "parameters": ["State", "\"Unchecked\""] + "parameters": [ + "State", + "\"Unchecked\"" + ] }, { "type": { "value": "PlayAnimation" }, - "parameters": ["State"] + "parameters": [ + "State" + ] } ] } @@ -5977,9 +6907,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -5987,7 +6921,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["State", "ButtonFSM", "yes"] + "parameters": [ + "State", + "ButtonFSM", + "yes" + ] } ] }, @@ -5997,9 +6935,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -6007,7 +6949,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["State", "ButtonFSM", "no"] + "parameters": [ + "State", + "ButtonFSM", + "no" + ] } ] } @@ -6041,7 +6987,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["State", "ButtonFSM"] + "parameters": [ + "State", + "ButtonFSM" + ] } ], "actions": [ @@ -6049,7 +6998,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -6070,9 +7021,6 @@ "value": "true", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], "name": "IsChecked" }, { @@ -6080,74 +7028,172 @@ "type": "Boolean", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousIsChecked" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "State", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false - } - ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "variants": [ + { + "areaMaxX": 25, + "areaMaxY": 26, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", + "assetStoreOriginalName": "Square Blue Toggle", + "name": "Square Blue Toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ + ], + "animations": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square Blue Toggle_Off.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square Blue Toggle_On.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } ] } - ] + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "State" - } - ] - } + ] } ] }, @@ -6156,12 +7202,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -6171,27 +7218,63 @@ "identifier": "PanelSpriteSlider", "name": "gdevelop-extension-store" }, - "tags": ["draggable", "slider", "ui", "widget"], + "tags": [ + "draggable", + "slider", + "ui", + "widget" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders 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": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ { - "description": "Represent a value on a slider.", - "fullName": "Slider", - "name": "Slider", - "objectType": "", + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", "private": true, - "eventsFunctions": [ + "sentence": "Events are running for the editor", + "events": [ { - "description": "the value of the object.", - "fullName": "Value", - "functionType": "ExpressionAndCondition", - "name": "Value", - "sentence": "the value", + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Represent a value on a slider.", + "fullName": "Slider", + "name": "Slider", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "description": "the value of the object.", + "fullName": "Value", + "functionType": "ExpressionAndCondition", + "name": "Value", + "sentence": "the value", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -6201,7 +7284,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValue()"] + "parameters": [ + "CurrentValue" + ] } ] } @@ -6236,21 +7321,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "StepSize", + "=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -6260,21 +7348,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "StepSize", + "!=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -6311,7 +7402,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMinValue()"] + "parameters": [ + "MinValue" + ] } ] } @@ -6347,13 +7440,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -6402,7 +7494,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxValue()"] + "parameters": [ + "MaxValue" + ] } ] } @@ -6438,13 +7532,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -6533,7 +7626,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyStepSize()"] + "parameters": [ + "StepSize" + ] } ] } @@ -6569,13 +7664,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -6590,426 +7684,124 @@ "" ] } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteSlider::Slider", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "name": "Value" - }, - { - "value": "0", - "type": "Number", - "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "name": "MinValue" - }, - { - "value": "1", - "type": "Number", - "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "name": "MaxValue" - }, - { - "value": "0", - "type": "Number", - "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "name": "StepSize" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", - "private": true, - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "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": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "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": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "Value", + "name": "CurrentValue" + }, + { + "value": "0", + "type": "Number", + "label": "Minimum value", + "name": "MinValue" + }, + { + "value": "1", + "type": "Number", + "label": "Maximum value", + "name": "MaxValue" + }, + { + "value": "0", + "type": "Number", + "label": "Step size", + "name": "StepSize" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "name": "ButtonFSM", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Apply position changes", + "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": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -7017,170 +7809,376 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "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 }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "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": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" + "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\"" + ] + } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ] @@ -7191,49 +8189,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "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": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -7263,15 +8400,23 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -7303,9 +8448,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -7313,7 +8462,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7345,9 +8496,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -7355,7 +8510,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7387,9 +8544,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -7397,7 +8558,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7429,9 +8592,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -7439,7 +8606,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -7448,11 +8617,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -7463,7 +8631,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7495,11 +8665,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -7510,7 +8679,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7542,11 +8713,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -7557,7 +8727,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7592,7 +8764,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -7622,8 +8796,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -7631,14 +8803,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -7647,9 +8832,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -7657,9 +8839,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -7667,9 +8846,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -7677,9 +8853,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -7689,10 +8862,267 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -7700,30 +9130,28 @@ "name": "onCreated", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "Thumb", + "Draggable", + "" ] } ] @@ -7738,7 +9166,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances." + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7746,39 +9174,71 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": ["", "Background", "0", "0", ""] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "FillBar", "0", "0", ""] + "parameters": [ + "FillBar", + "Anchor", + "" + ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "Thumb", "0", "0", ""] + "parameters": [ + "Thumb", + "Anchor", + "" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Background", "=", "1"] + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - FillBar.Width()" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["FillBar", "=", "2"] - }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - FillBar.Height()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Thumb", "=", "3"] + "parameters": [ + "PreviousInitialValue", + "=", + "InitialValue" + ] } ] }, @@ -7802,25 +9262,21 @@ "type": { "value": "Create" }, - "parameters": ["", "Label", "0", "0", ""] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": ["Label", "=", "4"] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": ["Label", "no"] + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -7844,7 +9300,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -7853,7 +9312,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -7867,19 +9326,28 @@ "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Thumb", ""] + "parameters": [ + "Thumb", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["FillBar", ""] + "parameters": [ + "FillBar", + "" + ] } ] } @@ -7904,17 +9372,14 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] }, @@ -7923,24 +9388,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -7950,7 +9415,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -7974,86 +9439,323 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": ["Background", "ButtonFSM"] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" + "value": "BehaviorActivated" }, - "parameters": ["Thumb", "Draggable"] + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] }, { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ] }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "value": "DraggableBehavior::Dropped" }, - "parameters": ["Background", "ButtonFSM", ""] - }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "value": "ResetObjectTimer" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" }, - "parameters": ["Object"] + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] } ], "actions": [ @@ -8061,299 +9763,61 @@ "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "ResetObjectTimer" }, - "parameters": ["Label", "\"HideBack\""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "CompareObjectTimer" }, - "parameters": ["Object"] + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": ["Object"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": ["Label", ""] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": ["Label"] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - } - ] - } - ], - "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 parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\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(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": ["Object", "=", "1"] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": ["Object", ""] + } + ], + "parameters": [] } ] } @@ -8389,19 +9853,30 @@ "type": { "value": "DraggableBehavior::Dragged" }, - "parameters": ["Thumb", "Draggable"] + "parameters": [ + "Thumb", + "Draggable" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressed" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] } ] } @@ -8411,7 +9886,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -8441,7 +9918,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::Value()"] + "parameters": [ + "FillBar.Slider::Value()" + ] } ] } @@ -8478,7 +9957,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -8486,7 +9965,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -8523,7 +10005,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MinValue()"] + "parameters": [ + "FillBar.Slider::MinValue()" + ] } ] } @@ -8560,21 +10044,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -8611,7 +10092,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MaxValue()"] + "parameters": [ + "FillBar.Slider::MaxValue()" + ] } ] } @@ -8648,21 +10131,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -8699,7 +10179,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::StepSize()"] + "parameters": [ + "FillBar.Slider::StepSize()" + ] } ] } @@ -8736,7 +10218,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -8772,9 +10254,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] } ], "actions": [ @@ -8782,7 +10268,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -8811,23 +10299,33 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "ShowLabelAtChanges", + "False", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -8836,23 +10334,34 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] } ] } @@ -8872,53 +10381,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -8934,7 +10396,13 @@ "type": { "value": "PanelSpriteSlider::Slider::Size" }, - "parameters": ["FillBar", "Slider", ">", "0", ""] + "parameters": [ + "FillBar", + "Slider", + ">", + "0", + "" + ] } ], "actions": [], @@ -8945,10 +10413,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -8966,14 +10435,18 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { "type": { "value": "SetCenterY" }, - "parameters": ["Thumb", "=", "FillBar.CenterY()"] + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] } ] }, @@ -8983,10 +10456,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -8995,7 +10469,11 @@ "type": { "value": "SetCenterX" }, - "parameters": ["Label", "=", "Thumb.CenterX()"] + "parameters": [ + "Label", + "=", + "Thumb.CenterX()" + ] }, { "type": { @@ -9004,14 +10482,18 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, - "parameters": ["Label", "=", "-Object.Angle()"] + "parameters": [ + "Label", + "=", + "-Object.Angle()" + ] } ] } @@ -9028,74 +10510,6 @@ ], "objectGroups": [] }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.PropertyBarLeftPadding()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "fullName": "", "functionType": "Expression", @@ -9112,7 +10526,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -9162,9 +10576,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -9174,7 +10587,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -9185,7 +10598,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -9214,9 +10627,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -9224,13 +10641,21 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "yes"] + "parameters": [ + "Thumb", + "Draggable", + "yes" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "yes"] + "parameters": [ + "Background", + "ButtonFSM", + "yes" + ] } ] }, @@ -9240,9 +10665,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -9250,19 +10679,29 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "no"] + "parameters": [ + "Thumb", + "Draggable", + "no" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "no"] + "parameters": [ + "Background", + "ButtonFSM", + "no" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] } @@ -9296,7 +10735,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Background", "ButtonFSM"] + "parameters": [ + "Background", + "ButtonFSM" + ] } ], "actions": [ @@ -9304,7 +10746,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -9325,90 +10769,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], "name": "InitialValue" }, { @@ -9416,8 +10869,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -9426,166 +10877,322 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, { - "value": "Center-right", - "type": "String", + "value": "Center-right", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "extraInformation": [ + "FillBar" + ], + "choices": [], + "hidden": true, + "name": "ThumbAnchorTarget" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "Only used by the scene editor.", + "extraInformation": [ + "Label" + ], + "choices": [], + "hidden": true, + "name": "ShowLabel" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" + }, + { + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["FillBar"], "hidden": true, - "name": "ThumbAnchorTarget" + "name": "BarTopPlusBottomMargin" }, { - "value": "", - "type": "Boolean", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Label"], "hidden": true, - "name": "ShowLabel" + "name": "OldParentWidth" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "variants": [ + { + "areaMaxX": 215, + "areaMaxY": 18, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", + "assetStoreOriginalName": "Square Blue Slider", + "name": "Square Blue Slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 16, + "color": { + "b": 221, + "g": 221, + "r": 221 + }, + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "221;221;221" + } + }, + { + "assetStoreId": "", + "bottomMargin": 3, + "height": 21, + "leftMargin": 3, + "name": "Thumb", + "rightMargin": 3, + "texture": "Square Blue Slider Thumb.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 21, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 1, + "height": 11, + "leftMargin": 1, + "name": "FillBar", + "rightMargin": 1, + "texture": "Square Blue Slider Fill Bar.png", + "tiled": false, + "topMargin": 1, + "type": "PanelSpriteObject::PanelSprite", + "width": 209, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false + "assetStoreId": "", + "bottomMargin": 4, + "height": 18, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square Blue Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 215, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "instances": [ { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - } - ] + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 11, + "keepRatio": true, + "layer": "", + "name": "FillBar", + "persistentUuid": "92813097-aee7-4422-8421-125e3ed61986", + "width": 209, + "x": 3, + "y": 3, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Thumb", + "persistentUuid": "ac167400-9a98-4f22-a0a2-8b28626074a6", + "width": 0, + "x": 194, + "y": -2, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Thumb" - }, - { - "objectName": "FillBar" - }, - { - "objectName": "Background" - } - ] - } + ] } ] }, @@ -9594,12 +11201,13 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Boids movement", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/boids-movement/details/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBkPSJNMjkuMywxMC4xYy0wLjQtMC4xLTAuOCwwLTEuMSwwLjNsLTMuMiw0Yy0xLjctMi01LjktNi40LTExLTYuNGMtMC4yLDAtMC4zLDAtMC41LDBjMS40LDIuNCwyLjEsNS4xLDIuMSw4DQoJCWMwLDIuOC0wLjcsNS42LTIuMSw4YzAuMiwwLDAuMywwLDAuNSwwYzUuMSwwLDkuMy00LjMsMTEtNi40bDMuMiw0YzAuMiwwLjIsMC41LDAuNCwwLjgsMC40YzAuMSwwLDAuMiwwLDAuMy0wLjENCgkJYzAuNC0wLjEsMC43LTAuNSwwLjctMC45VjExQzMwLDEwLjYsMjkuNywxMC4yLDI5LjMsMTAuMXoiLz4NCgk8cGF0aCBkPSJNMTEuNCw4LjRjLTUuMiwxLjUtOSw2LjgtOS4yLDdjLTAuMiwwLjMtMC4yLDAuOCwwLDEuMmMwLjIsMC4zLDQsNS42LDkuMiw3YzEuNS0yLjMsMi4yLTQuOSwyLjItNy42DQoJCUMxMy42LDEzLjMsMTIuOCwxMC42LDExLjQsOC40eiBNMTAsMTZjMCwwLjYtMC40LDEtMSwxcy0xLTAuNC0xLTF2LTJjMC0wLjYsMC40LTEsMS0xczEsMC40LDEsMVYxNnoiLz4NCjwvZz4NCjwvc3ZnPg0K", "name": "BoidsMovement", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/Restaurant/Restaurant_restaurant_seafood_animal_fish.svg", "shortDescription": "Simulates flocks movement.", - "version": "0.2.1", + "version": "0.4.1", "description": [ "Simulates swarms or flocks movement following the separation, alignment, cohesion principles. The flock can be attracted to a location or avoid some obstacles.", "", @@ -9609,12 +11217,27 @@ "identifier": "BoidsMovement", "name": "gdevelop-extension-store" }, - "tags": ["flock", "swarm", "boids", "crowd", "horde"], + "tags": [ + "flock", + "swarm", + "boids", + "crowd", + "horde" + ], "authorIds": [ "rotBq28wITdtfsrE7McHQri4k2w2", "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [ + { + "folded": true, + "name": "HasAlreadyRunThisFrame", + "type": "boolean", + "value": false + } + ], "eventsFunctions": [ { "description": "Define helper classes JavaScript code.", @@ -9985,9 +11608,9 @@ " */", " constructor() {", " /**", - " * @type {Map}", + " * @type {Set}", " */", - " this.boids = new Map();", + " this.boids = new Set();", " this.boidsRBush = new rbush();", " }", "", @@ -9997,8 +11620,13 @@ " * @returns {Boid} the created Boid", " */", " add(behavior) {", - " const boid = new Boid(behavior);", - " this.boids.set(behavior.owner.id, boid);", + " if (!behavior.__boidsExtension) {", + " behavior.__boidsExtension = {", + " boid: new Boid(behavior)", + " };", + " }", + " const boid = behavior.__boidsExtension.boid;", + " this.boids.add(boid);", " this.addToRBush(boid);", " return boid;", " }", @@ -10024,9 +11652,10 @@ " * @param {gdjs.RuntimeBehavior} behavior", " */", " remove(behavior) {", - " this.boids.delete(behavior.owner.id);", + " const boid = behavior.__boidsExtension.boid;", + " this.boids.delete(boid);", "", - " this.removeFromRBush(behavior.__boidsExtension.boid);", + " this.removeFromRBush(boid);", " }", "", " /**", @@ -10041,12 +11670,14 @@ " * Move all instances.", " */", " moveAll() {", - " this.boids.forEach(boid => boid.flock());", - " this.boids.forEach(boid => {", + " for (const boid of this.boids) {", + " boid.flock();", + " }", + " for (const boid of this.boids) {", " boid.move();", " this.removeFromRBush(boid);", " this.addToRBush(boid);", - " });", + " }", " }", "", " /**", @@ -10066,6 +11697,7 @@ " searchArea.maxX = x + radius;", " searchArea.maxY = y + radius;", " // TODO The R-Tree should not allocate an array.", + " /** @type {Array} */", " const nearbys = this.boidsRBush.search(searchArea);", "", " const radiusSq = radius * radius;", @@ -10079,6 +11711,9 @@ " if (object === otherObject) {", " continue;", " }", + " if (behavior._getCollisionLayer() !== behavior._getCollisionLayer()) {", + " continue;", + " }", " const distanceSq = object.getSqDistanceToObject(otherObject);", " if (distanceSq < radiusSq) {", " foundBoids.push(behavior.__boidsExtension.boid);", @@ -10135,7 +11770,10 @@ "type": { "value": "BoidsMovement::DefineHelperClasses" }, - "parameters": ["", ""] + "parameters": [ + "", + "" + ] } ] }, @@ -10150,9 +11788,7 @@ "const object = objects[0];\r", "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\r", "const behavior = object.getBehavior(behaviorName);\r", - "behavior.__boidsExtension = behavior.__boidsExtension || {\r", - " boid: runtimeScene.__boidsExtension.boidsManager.add(behavior),\r", - "};" + "runtimeScene.__boidsExtension.boidsManager.add(behavior);" ], "parameterObjects": "Object", "useStrict": true, @@ -10197,10 +11833,11 @@ "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "__BoidsBehaviour_hasAlreadyRunThisFrame", + "HasAlreadyRunThisFrame", + "=", "" ] } @@ -10208,21 +11845,25 @@ "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__BoidsBehaviour_hasAlreadyRunThisFrame", - "True" + "HasAlreadyRunThisFrame", + "True", + "" ] } ], "events": [ { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "runtimeScene.__boidsExtension.boidsManager.moveAll();", + "inlineCode": [ + "runtimeScene.__boidsExtension.boidsManager.moveAll();\r", + "" + ], "parameterObjects": "Object", "useStrict": true, - "eventsSheetExpanded": true + "eventsSheetExpanded": false } ] } @@ -10254,11 +11895,12 @@ "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__BoidsBehaviour_hasAlreadyRunThisFrame", - "False" + "HasAlreadyRunThisFrame", + "False", + "" ] } ] @@ -10514,8 +12156,7 @@ "Behavior", "TargetedObject.CenterX()", "TargetedObject.CenterY()", - "DecisionWeight", - "GetArgumentAsNumber(\"DecisionWeight\")" + "DecisionWeight" ] } ] @@ -10571,46 +12212,15 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyTrajectoryDistance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TrajectoryDistance", "=", "(Object.Behavior::VelocityX() * (Object.CenterY() - CenterY) + Object.Behavior::VelocityY() * (CenterX - Object.CenterX())) / Object.Behavior::Speed()" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If this distance is smaller than the specified radius, the Boid must try turn in the right direction to avoid the area." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BoidsMovement::BoidsMovement::PropertyTrajectoryDistance" - }, - "parameters": ["Object", "Behavior", ">", "- Radius"] - }, - { - "type": { - "value": "BoidsMovement::BoidsMovement::PropertyTrajectoryDistance" - }, - "parameters": ["Object", "Behavior", "<", "Radius"] - } ], - "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Comment", @@ -10622,72 +12232,128 @@ "textG": 0, "textR": 0 }, - "comment": "(normalX ; normalY)" + "comment": "If this distance is smaller than the specified radius, the Boid must try turn in the right direction to avoid the area." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::PropertyTrajectoryDistance" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] - } - ], - "actions": [ + "parameters": [ + "TrajectoryDistance", + ">", + "- Radius" + ] + }, { "type": { - "value": "BoidsMovement::BoidsMovement::MoveInDirection" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", - "-(CenterY - Object.CenterY())", - "CenterX - Object.CenterX()", - "DecisionWeight", - "" + "TrajectoryDistance", + "<", + "Radius" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "(-normalX ; -normalY)" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "(normalX ; normalY)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TrajectoryDistance", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "BoidsMovement::BoidsMovement::MoveInDirection" + }, + "parameters": [ + "Object", + "Behavior", + "-(CenterY - Object.CenterY())", + "CenterX - Object.CenterX()", + "DecisionWeight", + "" + ] + } + ] + }, { - "type": { - "value": "BoidsMovement::BoidsMovement::PropertyTrajectoryDistance" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "<", "0"] - } - ], - "actions": [ + "comment": "(-normalX ; -normalY)" + }, { - "type": { - "value": "BoidsMovement::BoidsMovement::MoveInDirection" - }, - "parameters": [ - "Object", - "Behavior", - "CenterY - Object.CenterY()", - "-(CenterX - Object.CenterX())", - "DecisionWeight", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TrajectoryDistance", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "BoidsMovement::BoidsMovement::MoveInDirection" + }, + "parameters": [ + "Object", + "Behavior", + "CenterY - Object.CenterY()", + "-(CenterX - Object.CenterX())", + "DecisionWeight", + "" + ] + } ] } ] } + ], + "variables": [ + { + "folded": true, + "name": "TrajectoryDistance", + "type": "number", + "value": 0 + } ] } ], @@ -10828,8 +12494,8 @@ "objectGroups": [] }, { - "description": "Return the current vertical speed.", - "fullName": "Velocity Y", + "description": "Return the current horizontal speed.", + "fullName": "Velocity X", "functionType": "Expression", "name": "VelocityX", "sentence": "", @@ -10870,8 +12536,8 @@ "objectGroups": [] }, { - "description": "Return the current horizontal speed.", - "fullName": "Velocity X", + "description": "Return the current vertical speed.", + "fullName": "Velocity Y", "functionType": "Expression", "name": "VelocityY", "sentence": "", @@ -10912,22 +12578,35 @@ "objectGroups": [] }, { - "description": "Change the maximum speed of the object.", - "fullName": "Maximum speed", - "functionType": "Action", + "description": "Check if the object is rotated while moving on its path.", + "fullName": "Object Rotated", + "functionType": "Condition", "group": "Boids movement configuration", - "name": "SetMaxSpeed", - "sentence": "Change the maximum speed of _PARAM0_ to _PARAM2_", + "name": "ShouldRotate", + "sentence": "_PARAM0_ is rotated when moving", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldRotate", + "True", + "" + ] + } + ], "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyMaxSpeed" + "value": "SetReturnBoolean" }, - "parameters": ["Object", "Behavior", "=", "MaxSpeed"] + "parameters": [ + "True" + ] } ] } @@ -10943,22 +12622,17 @@ "name": "Behavior", "supplementaryInformation": "BoidsMovement::BoidsMovement", "type": "behavior" - }, - { - "description": "Max Speed", - "name": "MaxSpeed", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Change the maximum acceleration of the object.", - "fullName": "Maximum acceleration", - "functionType": "Action", + "description": "Return the maximum speed.", + "fullName": "Maximum speed", + "functionType": "Expression", "group": "Boids movement configuration", - "name": "SetMaxAcceleration", - "sentence": "Change the maximum acceleration of _PARAM0_ to _PARAM2_", + "name": "MaxSpeed", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -10966,13 +12640,18 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyMaxAcceleration" + "value": "SetReturnNumber" }, - "parameters": ["Object", "Behavior", "=", "SteeringForce"] + "parameters": [ + "MaxSpeed" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -10984,39 +12663,31 @@ "name": "Behavior", "supplementaryInformation": "BoidsMovement::BoidsMovement", "type": "behavior" - }, - { - "description": "Steering Force", - "name": "SteeringForce", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if the object is rotated while moving on its path.", - "fullName": "Object Rotated", - "functionType": "Condition", + "description": "Change the maximum speed of the object.", + "fullName": "Maximum speed", + "functionType": "Action", "group": "Boids movement configuration", - "name": "ShouldRotate", - "sentence": "_PARAM0_ is rotated when moving", + "name": "SetMaxSpeed", + "sentence": "Change the maximum speed of _PARAM0_ to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BoidsMovement::BoidsMovement::PropertyShouldRotate" - }, - "parameters": ["Object", "Behavior"] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, - "parameters": ["True"] + "parameters": [ + "MaxSpeed", + "=", + "Value" + ] } ] } @@ -11032,16 +12703,21 @@ "name": "Behavior", "supplementaryInformation": "BoidsMovement::BoidsMovement", "type": "behavior" + }, + { + "description": "Max Speed", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Return the maximum speed.", - "fullName": "Maximum speed", + "description": "Return the maximum acceleration.", + "fullName": "Maximum acceleration", "functionType": "Expression", "group": "Boids movement configuration", - "name": "MaxSpeed", + "name": "MaxAcceleration", "sentence": "", "events": [ { @@ -11052,7 +12728,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["MaxSpeed"] + "parameters": [ + "MaxAcceleration" + ] } ] } @@ -11076,12 +12754,12 @@ "objectGroups": [] }, { - "description": "Return the maximum acceleration.", + "description": "Change the maximum acceleration of the object.", "fullName": "Maximum acceleration", - "functionType": "Expression", + "functionType": "Action", "group": "Boids movement configuration", - "name": "MaxAcceleration", - "sentence": "", + "name": "SetMaxAcceleration", + "sentence": "Change the maximum acceleration of _PARAM0_ to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -11089,16 +12767,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetNumberVariable" }, - "parameters": ["MaxAcceleration"] + "parameters": [ + "MaxAcceleration", + "=", + "Value" + ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -11110,6 +12789,11 @@ "name": "Behavior", "supplementaryInformation": "BoidsMovement::BoidsMovement", "type": "behavior" + }, + { + "description": "Steering Force", + "name": "Value", + "type": "expression" } ], "objectGroups": [] @@ -11130,7 +12814,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["CohesionRadius"] + "parameters": [ + "CohesionRadius" + ] } ] } @@ -11167,9 +12853,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyCohesionRadius" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "CohesionRadius", + "=", + "Value" + ] } ] } @@ -11210,7 +12900,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["AlignmentRadius"] + "parameters": [ + "AlignmentRadius" + ] } ] } @@ -11247,9 +12939,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyAlignmentRadius" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "AlignmentRadius", + "=", + "Value" + ] } ] } @@ -11290,7 +12986,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["SeparationRadius"] + "parameters": [ + "SeparationRadius" + ] } ] } @@ -11327,9 +13025,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertySeparationRadius" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "SeparationRadius", + "=", + "Value" + ] } ] } @@ -11370,7 +13072,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["CohesionWeight"] + "parameters": [ + "CohesionWeight" + ] } ] } @@ -11407,9 +13111,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyCohesionWeight" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "CohesionWeight", + "=", + "Value" + ] } ] } @@ -11450,7 +13158,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["AlignmentWeight"] + "parameters": [ + "AlignmentWeight" + ] } ] } @@ -11487,9 +13197,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyAlignmentWeight" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "AlignmentWeight", + "=", + "Value" + ] } ] } @@ -11530,7 +13244,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["SeparationWeight"] + "parameters": [ + "SeparationWeight" + ] } ] } @@ -11567,9 +13283,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertySeparationWeight" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "SeparationWeight", + "=", + "Value" + ] } ] } @@ -11601,9 +13321,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Maximum speed", - "description": "", "group": "Movement", - "extraInformation": [], "name": "MaxSpeed" }, { @@ -11611,18 +13329,15 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Maximum acceleration", - "description": "", "group": "Movement", - "extraInformation": [], "name": "MaxAcceleration" }, { "value": "true", "type": "Boolean", "label": "Rotate object", - "description": "", "group": "Movement", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "ShouldRotate" }, { @@ -11630,9 +13345,8 @@ "type": "Number", "unit": "Pixel", "label": "Cohesion sight radius", - "description": "", "group": "Sight", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "CohesionRadius" }, { @@ -11640,9 +13354,8 @@ "type": "Number", "unit": "Pixel", "label": "Alignement sight radius", - "description": "", "group": "Sight", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "AlignmentRadius" }, { @@ -11650,9 +13363,8 @@ "type": "Number", "unit": "Pixel", "label": "Separation sight radius", - "description": "", "group": "Sight", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "SeparationRadius" }, { @@ -11660,9 +13372,8 @@ "type": "Number", "unit": "Dimensionless", "label": "Cohesion decision weight", - "description": "", "group": "Decision", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "CohesionWeight" }, { @@ -11670,9 +13381,8 @@ "type": "Number", "unit": "Dimensionless", "label": "Alignment decision weight", - "description": "", "group": "Decision", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "AlignmentWeight" }, { @@ -11680,20 +13390,18 @@ "type": "Number", "unit": "Dimensionless", "label": "Separation decision weight", - "description": "", "group": "Decision", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "SeparationWeight" }, { - "value": "", + "value": "0", "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TrajectoryDistance" + "unit": "Dimensionless", + "label": "Collision layer", + "advanced": true, + "quickCustomizationVisibility": "hidden", + "name": "CollisionLayer" } ], "sharedPropertyDescriptors": [] @@ -11706,6 +13414,7 @@ "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", @@ -11754,6 +13463,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -11787,13 +13498,23 @@ "type": { "value": "SineMovement::SineMovement::PropertyCenterPointX" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "SineMovement::SineMovement::PropertyCenterPointY" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] } ], "actions": [ @@ -11801,13 +13522,23 @@ "type": { "value": "SineMovement::SineMovement::SetPropertyCenterPointX" }, - "parameters": ["Object", "Behavior", "=", "Object.X()"] + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] }, { "type": { "value": "SineMovement::SineMovement::SetPropertyCenterPointY" }, - "parameters": ["Object", "Behavior", "=", "Object.Y()"] + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] } ] }, @@ -11830,7 +13561,12 @@ "type": { "value": "SineMovement::SineMovement::PropertyHorizontalDistance" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] } ], "actions": [ @@ -11853,7 +13589,12 @@ "type": { "value": "SineMovement::SineMovement::PropertyVerticalDistance" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] } ], "actions": [ @@ -11946,7 +13687,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertySineProgressY()"] + "parameters": [ + "Object.Behavior::PropertySineProgressY()" + ] } ] } @@ -11984,7 +13727,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertySineProgressX()"] + "parameters": [ + "Object.Behavior::PropertySineProgressX()" + ] } ] } @@ -12062,7 +13807,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyVerticalSpeed()"] + "parameters": [ + "Object.Behavior::PropertyVerticalSpeed()" + ] } ] } @@ -12180,7 +13927,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyCenterPointX()"] + "parameters": [ + "Object.Behavior::PropertyCenterPointX()" + ] } ] } @@ -12218,7 +13967,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyCenterPointY()"] + "parameters": [ + "Object.Behavior::PropertyCenterPointY()" + ] } ] } @@ -12526,13 +14277,23 @@ "type": { "value": "SineMovement::SineMovement::SetPropertySineProgressX" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "SineMovement::SineMovement::SetPropertySineProgressY" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] } ] } @@ -12558,63 +14319,42 @@ "value": "60", "type": "Number", "label": "Horizontal speed, in degrees per second", - "description": "", - "group": "", - "extraInformation": [], "name": "HorizontalSpeed" }, { "value": "60", "type": "Number", "label": "Vertical speed, in degrees per second", - "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": "0", "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": "SineProgressX" }, @@ -12622,9 +14362,6 @@ "value": "0", "type": "Number", "label": "Counter used to change Y position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SineProgressY" } @@ -12635,6 +14372,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] -} + "externalLayouts": [] +} \ No newline at end of file diff --git a/examples/buttons/buttons.json b/examples/buttons/buttons.json index c64de765d..e05397319 100755 --- a/examples/buttons/buttons.json +++ b/examples/buttons/buttons.json @@ -1,13 +1,15 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "landscape", "packageName": "com.example.gamename", @@ -16,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Button States", "description": "", @@ -51,7 +52,9 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -63,7 +66,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Play.png", "kind": "image", "metadata": "", @@ -76,7 +78,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Isometric Voxel Cactus_Stem.png", "kind": "image", "metadata": "", @@ -89,7 +90,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Isometric Voxel Cactus_Top.png", "kind": "image", "metadata": "", @@ -102,7 +102,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -115,7 +114,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -128,7 +126,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -151,10 +148,12 @@ "name": "Roboto-Regular.ttf" } } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -173,13 +172,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.6455105703311477, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -364,9 +366,9 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "c38dafef3b324b20cb46d73bda03ed7228f6e4600c9cfb1da8ed9269044d67a0", "name": "PlayButton", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -433,9 +435,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "8834ba7beffd0dbc7720870b67fecb748b4d36c86e46ee8d3e9016a385499035", "name": "IsometricVoxelCactus", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -529,8 +531,8 @@ { "assetStoreId": "3699f3a9dbcacb430dfb90834c239c60a0324b631635c6658396cd524c7adb0a", "name": "PanelSpriteButton", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Purple Button With Stone Frame", "variables": [], "effects": [], "behaviors": [], @@ -540,9 +542,23 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Button" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 0, "height": 102, @@ -576,6 +592,28 @@ "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": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 35, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -612,6 +650,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 255, "particleBlue2": 255, + "particleColor1": "255;255;255", + "particleColor2": "51;77;255", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 255, @@ -627,7 +667,6 @@ "rendererParam1": 10, "rendererParam2": 10, "rendererType": "Line", - "tags": "", "tank": 100, "textureParticleName": "", "type": "ParticleSystem::ParticleEmitter", @@ -642,7 +681,6 @@ "italic": false, "name": "ButtonState", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -656,6 +694,28 @@ "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": "Button State", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -664,7 +724,6 @@ "italic": false, "name": "ButtonStatesBehavior_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -678,6 +737,28 @@ "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": "Button States Behavior", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 45, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -686,7 +767,6 @@ "italic": false, "name": "PanelSpriteButton_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -700,9 +780,57 @@ "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": "Panel Sprite Button", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 45, + "lineHeight": 0, + "color": "255;255;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "PlayButton" + }, + { + "objectName": "IsometricVoxelCactus" + }, + { + "objectName": "PanelSpriteButton" + }, + { + "objectName": "ClickParticles" + }, + { + "objectName": "ButtonState" + }, + { + "objectName": "ButtonStatesBehavior_Text" + }, + { + "objectName": "PanelSpriteButton_Text" + } + ] + }, "events": [ { "colorB": 224, @@ -771,8 +899,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change size", - "comment2": "" + "comment": "Change size" }, { "type": "BuiltinCommonInstructions::Standard", @@ -851,8 +978,7 @@ "textG": 0, "textR": 0 }, - "comment": "Show white outline", - "comment2": "" + "comment": "Show white outline" }, { "type": "BuiltinCommonInstructions::Standard", @@ -949,8 +1075,7 @@ "textG": 0, "textR": 0 }, - "comment": "Darken", - "comment2": "" + "comment": "Darken" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1015,8 +1140,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change size", - "comment2": "" + "comment": "Change size" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1210,8 +1334,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create a text object above each button and create an object link between the two objects", - "comment2": "" + "comment": "Create a text object above each button and create an object link between the two objects" }, { "type": "BuiltinCommonInstructions::ForEach", @@ -1260,8 +1383,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update text based on the state of the button it is linked to", - "comment2": "" + "comment": "Update text based on the state of the button it is linked to" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1563,9 +1685,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 8071752, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -1583,10 +1712,38 @@ } ], "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" @@ -1601,14 +1758,15 @@ "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.3", + "version": "2.1.1", "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.", + "A button that can be used for menus and most labelled buttons of a game. 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)." ], @@ -1623,8 +1781,39 @@ "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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -1640,62 +1829,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -1709,496 +1863,430 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "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::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "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": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "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\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "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": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "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" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -2207,13 +2295,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -2223,50 +2310,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -2336,22 +2524,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" ] @@ -2386,11 +2572,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -2435,11 +2620,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -2484,11 +2668,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -2533,11 +2716,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -2559,11 +2741,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2608,11 +2789,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -2657,11 +2837,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2710,7 +2889,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -2741,8 +2920,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -2750,14 +2927,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -2766,9 +2956,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -2776,9 +2963,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -2786,9 +2970,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -2796,9 +2977,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -2808,29 +2986,332 @@ ], "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", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, + "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": [] + } + ], + "editionSettings": [], + "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.", - "comment2": "" + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -2842,7 +3323,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -2854,7 +3335,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -2862,14 +3343,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()" ] }, { @@ -2897,64 +3388,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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Pressed", "=", - "2" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -2993,18 +3446,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": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -3042,8 +3524,7 @@ "textG": 0, "textR": 0 }, - "comment": "Show the right background accordingly to the new state.", - "comment2": "" + "comment": "Show the right background accordingly to the new state." }, { "type": "BuiltinCommonInstructions::Standard", @@ -3067,12 +3548,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -3107,10 +3589,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -3119,7 +3601,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -3127,7 +3609,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -3138,10 +3620,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -3165,10 +3647,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -3185,10 +3668,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -3217,12 +3701,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -3262,10 +3747,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -3294,12 +3780,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -3351,12 +3838,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -3388,130 +3876,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.", - "comment2": "" - }, - { - "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": [ + } + ], + "parameters": [ { "description": "Object", "name": "Object", @@ -3519,22 +3886,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -3756,6 +4108,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -3764,21 +4117,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -3792,18 +4137,18 @@ "type": "object" }, { - "description": "", - "name": "LabelText", + "description": "Text", + "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": [ { @@ -3812,18 +4157,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -3835,12 +4180,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", @@ -3848,17 +4192,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -3870,122 +4214,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", @@ -3998,10 +4226,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -4024,10 +4254,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -4101,169 +4333,454 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "PressedLabelOffsetY" }, { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "LeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Right 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" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "RightPadding" + "objectGroups": [] }, { - "value": "0", - "type": "Number", - "label": "Top 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": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "TopPadding" + "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", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "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": [], - "hidden": false, - "name": "HoveredFadeOutDuration" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" + } + ], + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, + "variants": [ { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "3699f3a9dbcacb430dfb90834c239c60a0324b631635c6658396cd524c7adb0a", + "assetStoreOriginalName": "Purple Button With Stone Frame", + "name": "Purple Button With Stone Frame", + "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": "Roboto-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": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], - "effects": [], - "behaviors": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": [] + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "74b3bb84-0bdf-4e85-a321-8b5462c65e1e", + "width": 283, + "x": 32, + "y": 51, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + ], + "editionSettings": [] } ] } @@ -4273,27 +4790,48 @@ "author": "", "category": "User interface", "extensionNamespace": "", - "fullName": "Button States", + "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": "Track user interaction with an object including hover, press, and click.", - "version": "1.0.0", - "description": "Provides conditions that change based on how the player is interacting with the object.", + "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", - "fsm" + "button" ], "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "Track interaction with an object including hover, press, and click.", + "description": "Use objects as buttons.", "fullName": "Button states", "name": "ButtonFSM", "objectType": "", @@ -4301,7 +4839,7 @@ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -4323,19 +4861,17 @@ "textG": 0, "textR": 0 }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -4344,11 +4880,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -4374,8 +4909,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" + "comment": "Make sure the cursor position is only checked once per frame." }, { "type": "BuiltinCommonInstructions::Standard", @@ -4383,12 +4917,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -4398,11 +4932,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -4419,12 +4954,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -4439,8 +4974,7 @@ "textG": 0, "textR": 0 }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." }, { "type": "BuiltinCommonInstructions::Standard", @@ -4448,12 +4982,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -4463,11 +4997,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -4478,20 +5011,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": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -4523,11 +5056,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -4549,31 +5081,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": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -4589,22 +5120,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -4615,11 +5144,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -4634,11 +5162,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -4667,20 +5194,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -4689,36 +5216,4987 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "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", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "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" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "choices": [], + "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" + ], + "choices": [], + "name": "Animation" + }, + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "choices": [], + "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" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "choices": [], + "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", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "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": "", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "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": "", + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "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" + ], + "choices": [], + "name": "Scale" + }, + { + "value": "", + "type": "Behavior", + "label": "Button states behavior (required)", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Tween behavior (required)", + "extraInformation": [ + "Tween::TweenBehavior" + ], + "choices": [], + "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", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "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": "ButtonStates::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -4727,52 +10205,23 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "\"Focused\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "ButtonStates::ButtonColorTintTween::FadeIn" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedOutside\"" + "FocusedColorTint", + "" ] } ] @@ -4782,178 +10231,216 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousState", + "=", + "\"Pressed\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", - "\"PressedOutside\"" + "\"Focused\"" ] - } - ], - "actions": [ + }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "ButtonStates::ButtonColorTintTween::FadeOut" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedInside\"" + "FocusedColorTint", + "" ] } ] } - ], - "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": "ButtonStates::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - }, - { - "type": { - "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ButtonStates::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::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": [] + ] } ], "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" } ], "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "onDeActivate", - "sentence": "", + "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", @@ -4961,39 +10448,40 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::ResetState" + "value": "SetReturnString" }, "parameters": [ - "Object", - "Behavior", - "" + "IdleColorTint" ] } ] } ], + "expressionType": { + "type": "color" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "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_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleColorTint", + "name": "SetIdleColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5001,24 +10489,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - }, - { - "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", - "0" + "Value" ] } ] @@ -5028,268 +10504,408 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "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", + "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": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "FocusedColorTint" ] } ] } ], + "expressionType": { + "type": "color" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "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", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedColorTint", + "name": "SetFocusedColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", - "\"Validated\"" + "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": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "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": "PressedColorTint", + "name": "SetPressedColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", - "\"Hovered\"" + "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": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "FadeInDuration" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "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": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "\"Hovered\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "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": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "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": [ + "conditions": [], + "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "\"PressedOutside\"" + "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": "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", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "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": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "FadeInEasing", + "=", + "Value" ] } ] @@ -5299,72 +10915,67 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "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 color tint tween", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ButtonStates::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", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "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", @@ -5372,28 +10983,28 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetStringVariable" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "FadeOutEasing", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], @@ -5402,70 +11013,365 @@ ], "propertyDescriptors": [ { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" }, { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", + "value": "", + "type": "Behavior", + "label": "Tween", "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "Tween::TweenBehavior" ], - "hidden": true, - "name": "State" + "choices": [], + "name": "Tween" }, { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" + "value": "255;255;255", + "type": "Color", + "label": "Idle state color tint", + "group": "Color", + "name": "IdleColorTint" }, { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" + "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": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" + "value": "64;64;64", + "type": "Color", + "label": "Pressed state color tint", + "group": "Color", + "name": "PressedColorTint" }, { - "value": "", + "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": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [], + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } + ], "hidden": true, - "name": "Index" + "name": "PreviousState" } ], "sharedPropertyDescriptors": [] @@ -5474,6 +11380,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json index ff6c3a0d1..b8a2ec3e4 100644 --- a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json +++ b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 224, + "build": 245, "major": 5, "minor": 5, "revision": 0 @@ -56,7 +56,9 @@ "Bouh" ], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -202,14 +204,14 @@ "name": "Yellow Button_Pressed.png" } } - ], - "resourceFolders": [] + ] }, "objects": [ { "assetStoreId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", "name": "Back_button", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Red Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -219,9 +221,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -275,6 +291,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -317,13 +334,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.6854852482256868, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -461,6 +481,7 @@ "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "VideoAds", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -470,9 +491,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "VideoAds" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -526,6 +561,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 60, + "lineHeight": 0, "color": "139;87;42" } }, @@ -580,6 +616,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -647,6 +684,7 @@ "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "Game", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -656,9 +694,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Game" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -712,6 +764,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 60, + "lineHeight": 0, "color": "139;87;42" } }, @@ -731,6 +784,7 @@ "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "Banners", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -740,9 +794,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Banners" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -796,6 +864,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 60, + "lineHeight": 0, "color": "139;87;42" } }, @@ -815,6 +884,7 @@ "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "User", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -824,9 +894,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "User" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -880,6 +964,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 60, + "lineHeight": 0, "color": "139;87;42" } }, @@ -899,6 +984,7 @@ "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "Data", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -908,9 +994,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Data" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -964,6 +1064,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 60, + "lineHeight": 0, "color": "139;87;42" } }, @@ -983,6 +1084,7 @@ "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "In_game_purchases", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -992,9 +1094,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "In-game purchases" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -1048,6 +1164,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 60, + "lineHeight": 0, "color": "139;87;42" } }, @@ -1280,6 +1397,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1367,13 +1485,16 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 53, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.7130377630690402, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -1556,6 +1677,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Show_midgame_ad", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1565,9 +1687,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Show midgame ad" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -1621,6 +1757,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -1639,7 +1776,9 @@ { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Show_rewarded_ad", + "persistentUuid": "e0bfaf2a-055f-4b40-817b-a56b37958c96", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1649,9 +1788,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Show rewarded ad" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -1705,6 +1858,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -1724,6 +1878,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Check_adblock", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1733,9 +1888,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Check adblock" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -1789,6 +1958,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -1843,6 +2013,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1945,6 +2116,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1987,6 +2159,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2029,6 +2202,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2071,6 +2245,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2113,6 +2288,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } } @@ -2556,6 +2732,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -2643,13 +2820,16 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 53, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.7130377630690402, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -2756,6 +2936,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Request_banners", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2765,9 +2946,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Request banners" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -2821,6 +3016,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -2840,6 +3036,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Hide_all_banners", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2849,9 +3046,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Hide all banners" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -2905,6 +3116,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -3019,6 +3231,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -3061,6 +3274,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } } @@ -3199,6 +3413,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -3286,13 +3501,16 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 53, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.6897782140104503, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -3603,6 +3821,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Happy_time", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3612,9 +3831,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Happy time" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -3668,6 +3901,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -3687,6 +3921,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Gameplay_start", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3696,81 +3931,15 @@ "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": "Gameplay start", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Gameplay start", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Gameplay start" } }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Gameplay_stop", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3780,9 +3949,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Gameplay stop" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -3808,7 +3991,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Gameplay stop", + "string": "", "font": "", "textAlignment": "center", "characterSize": 30, @@ -3831,11 +4014,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Gameplay stop", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -3855,6 +4039,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Generate_invite_link", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3864,9 +4049,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Generate invite link" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -3892,7 +4091,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Generate invite link", + "string": "", "font": "", "textAlignment": "center", "characterSize": 30, @@ -3915,11 +4114,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Generate invite link", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -3939,6 +4139,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Get_room_id", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3948,9 +4149,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Get room id" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -4004,6 +4219,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -4058,6 +4274,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4160,6 +4377,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4202,6 +4420,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4244,6 +4463,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4286,6 +4506,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4316,6 +4537,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Open_invite_button", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4325,9 +4547,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Open invite button" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -4381,6 +4617,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -4400,6 +4637,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Hide_invite_button", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4409,9 +4647,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Hide invite button" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -4465,6 +4717,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -4484,6 +4737,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Loading_start", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4493,9 +4747,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Game loading start" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -4549,6 +4817,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -4568,6 +4837,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Loading_stop", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4577,9 +4847,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Game loading stop" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -4633,6 +4917,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -4687,6 +4972,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4729,6 +5015,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } } @@ -5167,6 +5454,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5522,6 +5810,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Sign_In", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -5587,6 +5876,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -5606,6 +5896,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "AccountLinking", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -5671,6 +5962,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -5690,6 +5982,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "User_Token", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -5755,6 +6048,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -5809,6 +6103,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -5851,6 +6146,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -5953,6 +6249,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -5995,6 +6292,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -6037,6 +6335,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -6079,6 +6378,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -6204,6 +6504,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -6246,6 +6547,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -6288,6 +6590,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } } @@ -6725,6 +7028,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -6812,13 +7116,16 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 53, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.7130377630690402, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -6955,6 +7262,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Save_user_data", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6964,9 +7272,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Save session data" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -7020,6 +7342,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -7039,6 +7362,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Load_user_data", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -7048,9 +7372,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load session data" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -7076,7 +7414,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Load session data", + "string": "", "font": "", "textAlignment": "center", "characterSize": 30, @@ -7099,11 +7437,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Load session data", + "text": "", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -7218,6 +7557,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -7260,6 +7600,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -7325,6 +7666,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } } @@ -7469,6 +7811,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -7556,13 +7899,16 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 53, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.6897782140104501, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -7669,6 +8015,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Xolla_Token", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -7678,9 +8025,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Generate Ingame purchase token" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -7734,6 +8095,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -7848,6 +8210,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -7913,6 +8276,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } } @@ -8033,6 +8397,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -8146,6 +8511,7 @@ "category": "General", "extensionNamespace": "", "fullName": "Load images from a URL", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZpbGUtZG93bmxvYWQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTQsMkg2QzQuODksMiA0LDIuODkgNCw0VjIwQzQsMjEuMTEgNC44OSwyMiA2LDIySDE4QzE5LjExLDIyIDIwLDIxLjExIDIwLDIwVjhMMTQsMk0xMiwxOUw4LDE1SDEwLjVWMTJIMTMuNVYxNUgxNkwxMiwxOU0xMyw5VjMuNUwxOC41LDlIMTNaIiAvPjwvc3ZnPg==", "name": "LoadImageFromURL", @@ -8273,6 +8639,7 @@ "category": "Ads", "extensionNamespace": "", "fullName": "CrazyGames SDK v3", + "gdevelopVersion": "", "helpPath": "/extensions/crazy-games-ad-api/details", "iconUrl": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODkiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgODkgMTAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTg0LjkwMzQgMjUuODkyOUM4NS4wNzI3IDE4LjY4MjQgODQuNjQ5NCA2LjExNjk0IDgwLjA3NzYgMC44NzQ4NTlDNzcuNTcyOSAtMS45OTY2NCA3MS42MTgzIDIuODA4MDEgNjcuNzY2MSA2LjUxOTA5QzYxLjM4MSAzLjQwNzcxIDUzLjUzNTUgMS44NzY3MSA0My45OTY4IDEuODc2NzFDMzQuNDU4IDEuODc2NzEgMjYuNjE5NiAzLjQxNDc2IDIwLjI0MTYgNi41MTkwOUMxNi4zODI0IDIuODA4MDEgMTAuNDM0OCAtMS45ODk1OSA3LjkzMDE0IDAuODgxOTE1QzMuMzY1MzcgNi4xMTY5NCAyLjkzNSAxOC42NDAxIDMuMTA0MzIgMjUuODU3NkMxLjA1MTIzIDMxLjUwMTkgMCAzOC4wOTE1IDAgNDUuNjEyNUMwIDYxLjQzMDQgNC41Mjk1IDczLjE0MjIgMTMuNDU0NCA4MC40NzI3QzE5LjQ2NTYgODUuMzk3MyAyNy4zMTgxIDg4LjIzMzUgMzcuMzIyNSA4OS4wODcyQzM2Ljg2MDcgODkuMzE4MSAzNi4zOTIzIDg5LjU0NjggMzUuOTE3NyA4OS43Nzg1TDM1LjkxNjMgODkuNzc5MkwzNS45MTU5IDg5Ljc3OTRDMzUuMTg3NSA5MC4xMzUgMzQuNDQ0NyA5MC40OTc3IDMzLjY4OSA5MC44ODYzTDMwLjA2MjYgOTIuNjY0MkwyOC4wMDI1IDkzLjY3MzFDMjcuNDEwMiA5My45ODI5IDI2LjgxMjMgOTQuMjgyIDI2LjIwNjUgOTQuNTg1MkwyNi4yMDYyIDk0LjU4NTRDMjQuNzY5NyA5NS4zMDQyIDIzLjI4ODQgOTYuMDQ1NSAyMS43MzAzIDk3LjAwMzJMMjEuMTg3IDk3LjI5MjVDMjEuMDMxOCA5Ny40MDU0IDIwLjg4MzcgOTcuNTk1OSAyMC44NTU0IDk3LjgwNzVDMjAuNzg0OSA5OC4yMDk3IDIxLjA2MDEgOTguNTkwNyAyMS40NjIyIDk4LjY0NzFDMjIuMDU4NyA5OC43MzY4IDIyLjY1MzMgOTguODM0NSAyMy4yNDggOTguOTMyMkwyMy4yNDgzIDk4LjkzMjJDMjQuNjY1IDk5LjE2NSAyNi4wODE2IDk5LjM5NzcgMjcuNTIyNyA5OS41MjE5TDI5LjA0NjYgOTkuNjkxM0MyOS41NDc2IDk5Ljc0NzcgMzAuMDU1NSA5OS43OSAzMC41NzA2IDk5LjgxODNMMzMuNjMyNiA5OS45ODc2QzM3LjczMTcgMTAwLjA1OCA0MS44NTkxIDk5LjgzMjQgNDUuOTUxMSA5OS4xOTAzQzUwLjAzNjEgOTguNTc2NSA1NC4wNTA2IDk3LjQzMzYgNTcuOTA5OCA5NS44NDYxQzYxLjc1NSA5NC4yNTg3IDY1LjQyMzcgOTIuMTkxNSA2OC43NDY4IDg5LjY3MjhDNzUuMzM2NCA4NC41NTc3IDgwLjUxNSA3Ny42NzE3IDgzLjU5ODEgNjkuOTk1NkM4NC43MjcgNjcuMjE1OCA4NS41NjY2IDY0LjMzMDIgODYuMTczMyA2MS40MDIyQzg3LjM5MzkgNTYuNzAzNCA4OC4wMTQ4IDUxLjQ0MDEgODguMDE0OCA0NS42MTI1Qzg4LjAxNDggMzguMTEyNyA4Ni45NzA2IDMxLjUzNzIgODQuOTI0NSAyNS45TDg0LjkwMzQgMjUuODkyOVpNNDMuOTg5NyA3My41MjMyQzI3LjEyNzYgNzMuNTIzMiAxNS45MDI2IDY4Ljc4MiAxNS45MDI2IDQ1LjYwNTRDMTUuOTAyNiAzNC42NzY4IDE4LjQwNzMgMjcuMjc1OCAyMy41NzE3IDIzLjAyODVDMjcuOTMxOSAxOS40MzAzIDM0LjYyMDMgMTcuNjg3NiA0My45ODk3IDE3LjY4NzZDNTMuMzU5MiAxNy42ODc2IDYwLjA0NzYgMTkuNDQ0NCA2NC40MDc4IDIzLjAyODVDNjkuNTU4MSAyNy4yNjg3IDcyLjA3NjkgMzQuNjU1NiA3Mi4wNzY5IDQ1LjYwNTRDNzIuMDc2OSA2OC43ODIgNjAuODUxOSA3My41MjMyIDQzLjk4OTcgNzMuNTIzMlpNMzUuMDI5NiAzOS42NzE5QzM1LjAyOTYgMzcuNTkwNiAzNi40MTI0IDM1LjgyNjggMzguMzEwMyAzNS4yMzQxQzM3LjI2NjEgMzQuMjY3NiAzNS44NjkxIDMzLjY3NDkgMzQuMzMxMSAzMy42NzQ5QzMxLjEwNjggMzMuNjc0OSAyOC40NjgxIDM2LjI5OTUgMjguNDY4MSAzOS41MDI2VjUxLjE1NzlDMjguNDY4MSA1NC4zNjEgMzEuMTA2OCA1Ni45ODU2IDM0LjMzMTEgNTYuOTg1NkMzNy41NTU0IDU2Ljk4NTYgNDAuMTk0IDU0LjM2ODEgNDAuMTk0IDUxLjE1NzlWNDQuMzAwMkM0MC4wMzE4IDQ0LjMxNDMgMzkuODY5NSA0NC4zMjg0IDM5LjcwNzIgNDQuMzI4NEMzNy4xMTc5IDQ0LjMyODQgMzUuMDIyNSA0Mi4yNDcxIDM1LjAyMjUgMzkuNjc5TDM1LjAyOTYgMzkuNjcxOVpNNTcuMjExNCAzNC44ODg0QzU1LjQxMjMgMzUuNTM3NSA1NC4xMjgyIDM3LjI0NDkgNTQuMTI4MiAzOS4yNTU3VjM5LjI2MjdDNTQuMTI4MiA0MS44MzA4IDU2LjIyMzYgNDMuOTEyMSA1OC44MTI5IDQzLjkxMjFDNTkuMDUyOCA0My45MTIxIDU5LjI4NTYgNDMuODkxIDU5LjUxMTQgNDMuODU1N1Y1MS4xNTc5QzU5LjUxMTQgNTQuMzY4MSA1Ni44NzI3IDU2Ljk4NTYgNTMuNjQ4NCA1Ni45ODU2QzUwLjQyNDIgNTYuOTg1NiA0Ny43ODU1IDU0LjM2MSA0Ny43ODU1IDUxLjE1NzlWMzkuNTAyNkM0Ny43ODU1IDM2LjI5OTUgNTAuNDI0MiAzMy42NzQ5IDUzLjY0ODQgMzMuNjc0OUM1NC45ODg5IDMzLjY3NDkgNTYuMjIzNiAzNC4xMzM1IDU3LjIxMTQgMzQuODg4NFoiIGZpbGw9IiMwQzBEMTQiLz4KPC9zdmc+Cg==", "name": "CrazyGamesAdApi", @@ -10610,6 +10977,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Clipboard", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNsaXBib2FyZC10ZXh0LW11bHRpcGxlLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNCA3VjIxSDE4VjIzSDRDMi45IDIzIDIgMjIuMSAyIDIxVjdINE0yMCAzQzIxLjEgMyAyMiAzLjkgMjIgNVYxN0MyMiAxOC4xIDIxLjEgMTkgMjAgMTlIOEM2LjkgMTkgNiAxOC4xIDYgMTdWNUM2IDMuOSA2LjkgMyA4IDNIMTEuMThDMTEuNiAxLjg0IDEyLjcgMSAxNCAxQzE1LjMgMSAxNi40IDEuODQgMTYuODIgM0gyME0xNCAzQzEzLjQ1IDMgMTMgMy40NSAxMyA0QzEzIDQuNTUgMTMuNDUgNSAxNCA1QzE0LjU1IDUgMTUgNC41NSAxNSA0QzE1IDMuNDUgMTQuNTUgMyAxNCAzTTEwIDdWNUg4VjE3SDIwVjVIMThWN00xNSAxNUgxMFYxM0gxNU0xOCAxMUgxMFY5SDE4VjExWiIgLz48L3N2Zz4=", "name": "Clipboard", @@ -10853,14 +11221,15 @@ "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.1.1", "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.", + "A button that can be used for menus and most labelled buttons of a game. 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)." ], @@ -10875,10 +11244,39 @@ "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": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -10894,64 +11292,30 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ { - "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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -10962,509 +11326,406 @@ "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" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "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::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "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": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "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": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "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\"" - ] - } - ] + "parameters": [] }, { - "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" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Hovered\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" ] } ] @@ -11475,49 +11736,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "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": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -11587,22 +11987,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" ] @@ -11637,11 +12035,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -11686,11 +12083,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -11735,11 +12131,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -11784,11 +12179,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -11810,11 +12204,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -11859,11 +12252,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -11908,11 +12300,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -11961,7 +12352,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -11992,8 +12383,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -12001,14 +12390,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -12017,9 +12419,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -12027,9 +12426,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -12037,9 +12433,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -12047,9 +12440,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -12059,7 +12449,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -12068,29 +12458,326 @@ "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, + "lineHeight": 0, + "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", + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": [] + } + ], + "editionSettings": [], + "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": [ { @@ -12099,7 +12786,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -12111,7 +12798,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -12119,14 +12806,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()" ] }, { @@ -12154,63 +12851,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" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -12249,18 +12909,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": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -12322,12 +13011,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -12362,10 +13052,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -12374,7 +13064,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -12382,7 +13072,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -12393,10 +13083,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -12420,10 +13110,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -12440,10 +13131,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -12472,12 +13164,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -12517,10 +13210,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -12549,12 +13243,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -12606,12 +13301,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -12643,129 +13339,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": [ - { - "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": [ + } + ], + "parameters": [ { "description": "Object", "name": "Object", @@ -12773,22 +13349,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -13010,6 +13571,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -13018,21 +13580,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -13047,17 +13601,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": [ { @@ -13066,18 +13620,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -13089,12 +13643,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", @@ -13102,17 +13655,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -13124,122 +13677,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", @@ -13252,10 +13689,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -13278,10 +13717,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -13355,231 +13796,1408 @@ } ], "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" + "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": [] }, { - "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": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "name": "RightPadding" + "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": "", + "choices": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" } ], - "effects": [], - "behaviors": [ + "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": "", + "textAlignment": "center", + "characterSize": 30, + "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": 30, + "lineHeight": 0, + "color": "72;72;79" + } + }, { - "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": 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 + } + } + ] + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "" + } }, { - "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" + "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - { - "objectName": "Idle" + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": [] + } + ], + "editionSettings": [] + }, + { + "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - { - "objectName": "Hovered" + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": [] + } + ], + "editionSettings": [] + }, + { + "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - { - "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" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [] + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": [] + } + ], + "editionSettings": [] } - ], - "instances": [] + ] } ] }, @@ -13588,12 +15206,13 @@ "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.1.0", + "version": "1.3.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -13635,7 +15254,7 @@ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -13664,11 +15283,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -13677,11 +15295,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -13715,12 +15332,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -13730,11 +15347,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -13751,12 +15369,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -13779,12 +15397,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -13794,11 +15412,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -13809,20 +15426,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": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -13854,11 +15471,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -13880,31 +15496,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": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -13920,22 +15535,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -13946,11 +15559,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -13965,11 +15577,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -13998,20 +15609,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14020,11 +15631,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14036,20 +15646,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14058,11 +15668,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14075,20 +15684,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14097,11 +15706,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14113,20 +15721,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14135,11 +15743,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14167,18 +15774,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -14190,11 +15796,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14203,11 +15808,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14220,11 +15824,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14232,11 +15835,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14245,11 +15847,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14332,22 +15933,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -14382,11 +15981,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14431,11 +16029,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14480,11 +16077,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14529,11 +16125,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14555,11 +16150,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14604,11 +16198,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14653,11 +16246,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14706,7 +16298,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -14737,8 +16329,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -14746,14 +16336,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -14762,9 +16365,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -14772,9 +16372,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -14782,9 +16379,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -14792,9 +16386,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -14824,7 +16415,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] }, @@ -14835,7 +16426,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -14846,7 +16437,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -14894,7 +16485,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "no" ] }, @@ -14905,7 +16496,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -14916,7 +16507,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -14927,11 +16518,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "!=", "\"\"" ] @@ -14955,7 +16545,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] } @@ -14966,11 +16556,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "!=", "\"\"" ] @@ -14994,7 +16583,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "yes" ] } @@ -15005,11 +16594,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "!=", "\"\"" ] @@ -15033,7 +16621,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "yes" ] } @@ -15075,7 +16663,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleEffect()" + "IdleEffect" ] } ] @@ -15112,13 +16700,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15156,7 +16743,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedEffect()" + "FocusedEffect" ] } ] @@ -15193,13 +16780,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15237,7 +16823,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedEffect()" + "PressedEffect" ] } ] @@ -15274,13 +16860,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15307,31 +16892,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -15340,16 +16921,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" } ], @@ -15359,7 +16937,7 @@ "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", "name": "ButtonAnimationName", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -15379,7 +16957,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15389,7 +16967,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15439,7 +17016,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15467,7 +17044,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -15495,7 +17072,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -15508,7 +17085,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15537,7 +17113,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15550,7 +17126,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15575,13 +17150,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15591,7 +17165,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15620,7 +17193,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -15633,7 +17206,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15658,13 +17230,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15674,7 +17245,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15703,7 +17273,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -15716,7 +17286,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15741,13 +17310,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15757,7 +17325,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15771,24 +17338,31 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "choices": [], + "name": "Animation" + }, { "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -15797,16 +17371,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" } ], @@ -15830,13 +17401,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -15887,11 +17457,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -15900,11 +17469,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -15916,7 +17484,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleValue()", + "IdleValue", "" ] } @@ -15943,11 +17511,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -15956,11 +17523,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -15972,7 +17538,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -15983,11 +17549,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -15996,11 +17561,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -16012,7 +17576,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -16035,11 +17599,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -16048,11 +17611,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -16064,7 +17626,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedValue()", + "PressedValue", "" ] } @@ -16087,11 +17649,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] @@ -16105,8 +17666,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeInDuration()", - "Object.Behavior::PropertyFadeInEasing()", + "FadeInDuration", + "FadeInEasing", "" ] } @@ -16117,11 +17678,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] @@ -16135,8 +17695,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeOutDuration()", - "Object.Behavior::PropertyFadeOutEasing()", + "FadeOutDuration", + "FadeOutEasing", "" ] } @@ -16214,46 +17774,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16292,46 +17848,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16369,37 +17921,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "<", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Tween::Ease(GetArgumentAsString(\"Easing\"), Object.Behavior::PropertyTweenInitialValue(), Object.Behavior::PropertyTweenTargetedValue(), Object.Behavior::PropertyTweenTime() / GetArgumentAsNumber(\"Duration\"))" + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] } ] @@ -16409,37 +17958,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", ">=", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"NoTween\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyTweenTargetedValue()" + "TweenTargetedValue" ] } ] @@ -16455,9 +18001,9 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyEffectName()", - "Object.Behavior::PropertyEffectProperty()", - "Object.Behavior::PropertyEffectValue()" + "EffectName", + "EffectProperty", + "EffectValue" ] } ] @@ -16506,7 +18052,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectName()" + "EffectName" ] } ] @@ -16547,7 +18093,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectProperty()" + "EffectProperty" ] } ] @@ -16586,24 +18132,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", - "GetArgumentAsString(\"Value\")" + "NewEffectName" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", - "GetArgumentAsString(\"Value\")" + "NewPropertyName" ] } ] @@ -16623,12 +18167,12 @@ }, { "description": "Effect name", - "name": "EffectName", + "name": "NewEffectName", "type": "string" }, { "description": "Parameter name", - "name": "PropertyName", + "name": "NewPropertyName", "type": "string" } ], @@ -16651,7 +18195,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -16688,13 +18232,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16732,7 +18275,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedValue()" + "FocusedValue" ] } ] @@ -16769,13 +18312,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16813,7 +18355,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedValue()" + "PressedValue" ] } ] @@ -16850,13 +18392,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16894,7 +18435,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -16932,13 +18473,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -16976,7 +18516,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -17014,13 +18554,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -17058,7 +18597,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -17095,13 +18634,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17139,7 +18677,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -17176,13 +18714,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17209,31 +18746,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -17242,16 +18775,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" }, { @@ -17260,58 +18790,153 @@ "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", - "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -17319,42 +18944,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -17363,9 +19086,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -17373,21 +19094,26 @@ "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" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -17396,9 +19122,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -17406,9 +19129,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -17416,9 +19136,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -17426,12 +19143,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -17440,9 +19164,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -17453,7 +19174,7 @@ "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", "name": "ButtonScaleTween", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -17473,7 +19194,7 @@ "Object", "Scale", "=", - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -17483,7 +19204,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17525,11 +19245,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -17538,11 +19257,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -17554,7 +19272,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleScale()", + "IdleScale", "" ] } @@ -17581,11 +19299,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -17594,11 +19311,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -17610,7 +19326,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -17621,11 +19337,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -17634,11 +19349,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -17650,7 +19364,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -17673,11 +19387,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -17686,11 +19399,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -17702,7 +19414,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedScale()", + "PressedScale", "" ] } @@ -17716,7 +19428,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17747,10 +19458,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -17762,7 +19473,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17798,10 +19508,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -17813,7 +19523,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17847,7 +19556,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -17860,7 +19569,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17885,13 +19593,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17901,7 +19608,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17930,7 +19636,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedScale()" + "FocusedScale" ] } ] @@ -17943,7 +19649,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17968,13 +19673,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17984,7 +19688,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18013,7 +19716,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedScale()" + "PressedScale" ] } ] @@ -18026,7 +19729,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18051,13 +19753,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18067,7 +19768,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18096,7 +19796,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -18109,7 +19809,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18134,13 +19833,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18150,7 +19848,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18179,7 +19876,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -18192,7 +19889,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18217,13 +19913,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18233,7 +19928,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18262,7 +19956,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -18276,7 +19970,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18301,13 +19994,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -18317,7 +20009,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18346,7 +20037,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -18360,7 +20051,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18385,13 +20075,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -18401,7 +20090,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18415,26 +20103,34 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "choices": [], + "name": "Scale" + }, { "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -18442,9 +20138,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -18454,7 +20148,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -18462,9 +20155,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -18472,9 +20163,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -18482,51 +20171,147 @@ "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", - "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -18534,42 +20319,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -18577,12 +20460,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -18612,7 +20502,7 @@ }, "parameters": [ "Object", - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -18664,11 +20554,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -18677,11 +20566,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -18693,7 +20581,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleColorTint()", + "IdleColorTint", "" ] } @@ -18720,11 +20608,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -18733,11 +20620,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -18749,7 +20635,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -18760,11 +20646,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -18773,11 +20658,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -18789,7 +20673,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -18812,11 +20696,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -18825,11 +20708,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -18841,7 +20723,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedColorTint()", + "PressedColorTint", "" ] } @@ -18886,9 +20768,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -18936,9 +20818,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -18984,7 +20866,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -19022,13 +20904,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19067,7 +20948,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedColorTint()" + "FocusedColorTint" ] } ] @@ -19105,13 +20986,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19150,7 +21030,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedColorTint()" + "PressedColorTint" ] } ] @@ -19188,13 +21068,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19233,7 +21112,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -19271,13 +21150,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -19316,7 +21194,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -19354,13 +21232,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -19399,7 +21276,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -19438,13 +21315,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19483,7 +21359,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -19522,13 +21398,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19556,31 +21431,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -19589,16 +21460,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" }, { @@ -19606,9 +21474,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -19616,51 +21482,147 @@ "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", - "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -19668,42 +21630,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -19711,12 +21771,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" diff --git a/examples/draggable-physics/draggable-physics.json b/examples/draggable-physics/draggable-physics.json index 44054c2e3..2e2f59095 100644 --- a/examples/draggable-physics/draggable-physics.json +++ b/examples/draggable-physics/draggable-physics.json @@ -1,13 +1,15 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { "adaptGameResolutionAtRuntime": false, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "default", "packageName": "com.example.draggablephysics", @@ -16,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": true, "version": "1.0.0", "name": "Extension: Draggable (physics)", "description": "Test the Draggable (physics) extension.", @@ -77,10 +78,18 @@ "placement": "bottom-left", "showWatermark": true }, - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], - "authorUsernames": ["VictrisGames"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "authorUsernames": [ + "VictrisGames" + ], "categories": [], - "playableDevices": ["keyboard", "mobile"], + "playableDevices": [ + "keyboard", + "mobile", + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -92,7 +101,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Grass.png", "kind": "image", "metadata": "", @@ -101,7 +109,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Pea-Happy.png", "kind": "image", "metadata": "", @@ -110,7 +117,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Border.png", "kind": "image", "metadata": "", @@ -123,7 +129,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Fill Bar.png", "kind": "image", "metadata": "", @@ -136,7 +141,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Thumb.png", "kind": "image", "metadata": "", @@ -149,7 +153,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Toggle_Off.png", "kind": "image", "metadata": "", @@ -162,7 +165,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Toggle_On.png", "kind": "image", "metadata": "", @@ -175,7 +177,6 @@ } }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -183,10 +184,12 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -205,13 +208,16 @@ "gridType": "rectangular", "gridWidth": 16, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 0.8781260801866498, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -540,9 +546,9 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player", - "tags": "", "type": "Sprite", "updateIfNotVisible": true, "variables": [], @@ -637,7 +643,6 @@ "assetStoreId": "", "height": 32, "name": "GrassBlock", - "tags": "", "texture": "Grass.png", "type": "TiledSpriteObject::TiledSprite", "width": 32, @@ -675,7 +680,6 @@ "italic": false, "name": "TextMessage", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -689,6 +693,28 @@ "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": "Click and drag the peas.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -697,7 +723,6 @@ "italic": false, "name": "Title_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -711,6 +736,28 @@ "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": "Extension: Draggable (physics)", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -719,7 +766,6 @@ "italic": false, "name": "Frequency_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -733,6 +779,28 @@ "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": "Frequency", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -741,7 +809,6 @@ "italic": false, "name": "MaxForce_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -755,6 +822,28 @@ "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": "Max Force", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -763,7 +852,6 @@ "italic": false, "name": "LeftButton_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -777,6 +865,28 @@ "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": "Left Button", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -785,7 +895,6 @@ "italic": false, "name": "RightButton_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -799,6 +908,28 @@ "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": "Right Button", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -807,7 +938,6 @@ "italic": false, "name": "Dampening_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -821,13 +951,35 @@ "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": "Dampening", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MaxForce_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -874,6 +1026,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, "Thumb": { @@ -891,8 +1065,8 @@ { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "Frequency_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -938,6 +1112,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, "Thumb": { @@ -955,8 +1151,8 @@ { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "Dampening_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1003,6 +1199,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, "Thumb": { @@ -1020,14 +1238,15 @@ { "assetStoreId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", "name": "LeftButton_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square Blue Toggle", "variables": [], "effects": [], "behaviors": [], "content": {}, "childrenContent": { "State": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -1095,14 +1314,15 @@ { "assetStoreId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", "name": "RightButton_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square Blue Toggle", "variables": [], "effects": [], "behaviors": [], "content": {}, "childrenContent": { "State": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -1168,6 +1388,53 @@ } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Player" + }, + { + "objectName": "GrassBlock" + }, + { + "objectName": "TextMessage" + }, + { + "objectName": "Title_Text" + }, + { + "objectName": "Frequency_Text" + }, + { + "objectName": "MaxForce_Text" + }, + { + "objectName": "LeftButton_Text" + }, + { + "objectName": "RightButton_Text" + }, + { + "objectName": "Dampening_Text" + }, + { + "objectName": "MaxForce_Slider" + }, + { + "objectName": "Frequency_Slider" + }, + { + "objectName": "Dampening_Slider" + }, + { + "objectName": "LeftButton_Toggle" + }, + { + "objectName": "RightButton_Toggle" + } + ] + }, "events": [ { "colorB": 228, @@ -1185,7 +1452,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -1193,19 +1462,34 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["MaxForce_Slider", "=", "500", ""] + "parameters": [ + "MaxForce_Slider", + "=", + "500", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["Frequency_Slider", "=", "10", ""] + "parameters": [ + "Frequency_Slider", + "=", + "10", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["Dampening_Slider", "=", "1", ""] + "parameters": [ + "Dampening_Slider", + "=", + "1", + "" + ] } ] }, @@ -1219,8 +1503,7 @@ "textG": 0, "textR": 0 }, - "comment": "Adjust extension values based checkboxes", - "comment2": "" + "comment": "Adjust extension values based checkboxes" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1229,7 +1512,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["LeftButton_Toggle", ""] + "parameters": [ + "LeftButton_Toggle", + "" + ] }, { "type": { @@ -1243,7 +1529,11 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["RightButton_Toggle", "no", ""] + "parameters": [ + "RightButton_Toggle", + "no", + "" + ] }, { "type": { @@ -1266,7 +1556,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["RightButton_Toggle", ""] + "parameters": [ + "RightButton_Toggle", + "" + ] }, { "type": { @@ -1280,7 +1573,11 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["LeftButton_Toggle", "no", ""] + "parameters": [ + "LeftButton_Toggle", + "no", + "" + ] }, { "type": { @@ -1304,14 +1601,20 @@ "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["RightButton_Toggle", ""] + "parameters": [ + "RightButton_Toggle", + "" + ] }, { "type": { "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["LeftButton_Toggle", ""] + "parameters": [ + "LeftButton_Toggle", + "" + ] }, { "type": { @@ -1325,7 +1628,11 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["LeftButton_Toggle", "yes", ""] + "parameters": [ + "LeftButton_Toggle", + "yes", + "" + ] }, { "type": { @@ -1351,8 +1658,7 @@ "textG": 0, "textR": 0 }, - "comment": "Adjust extension values based on sliders", - "comment2": "" + "comment": "Adjust extension values based on sliders" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1418,8 +1724,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop dragging if mouse gets far from object", - "comment2": "" + "comment": "Stop dragging if mouse gets far from object" }, { "disabled": true, @@ -1429,7 +1734,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" }, - "parameters": ["Player", "DraggablePhysics", ""] + "parameters": [ + "Player", + "DraggablePhysics", + "" + ] }, { "type": { @@ -1447,7 +1756,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::ReleaseDrag" }, - "parameters": ["Player", "DraggablePhysics", ""] + "parameters": [ + "Player", + "DraggablePhysics", + "" + ] } ] }, @@ -1461,8 +1774,7 @@ "textG": 0, "textR": 0 }, - "comment": "Only allow one object to be dragged at once", - "comment2": "" + "comment": "Only allow one object to be dragged at once" }, { "disabled": true, @@ -1472,19 +1784,30 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" }, - "parameters": ["Player", "DraggablePhysics", ""] + "parameters": [ + "Player", + "DraggablePhysics", + "" + ] }, { "type": { "value": "PickedInstancesCount" }, - "parameters": ["Player", ">", "1"] + "parameters": [ + "Player", + ">", + "1" + ] }, { "type": { "value": "AjoutHasard" }, - "parameters": ["", "Player"] + "parameters": [ + "", + "Player" + ] } ], "actions": [ @@ -1492,7 +1815,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::ReleaseDrag" }, - "parameters": ["Player", "DraggablePhysics", ""] + "parameters": [ + "Player", + "DraggablePhysics", + "" + ] } ] } @@ -1505,9 +1832,16 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -1525,10 +1859,26 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, { "name": "DraggablePhysics", "type": "DraggablePhysics::DraggablePhysics" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, { "name": "Physics2", "type": "Physics2::Physics2Behavior", @@ -1536,6 +1886,18 @@ "gravityY": 9.8, "scaleX": 100, "scaleY": 100 + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] } @@ -1547,12 +1909,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/toggle-switch", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", "name": "SpriteToggleSwitch", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.2.2", + "version": "2.0.2", "description": [ "Toggle switch that users can click or touch. The switch can be customized with sprites.", "", @@ -1562,13 +1925,50 @@ "identifier": "SpriteToggleSwitch", "name": "gdevelop-extension-store" }, - "tags": ["ui", "widget", "toggle", "switch"], + "tags": [ + "ui", + "widget", + "toggle", + "switch", + "check box" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Toggle switches now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing toggle switches 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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the switch object.", @@ -1585,79 +1985,70 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "WasChecked", + "False", + "" + ] } - ], - "actions": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" - }, - "parameters": ["Object", "Behavior", "yes"] - } + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "WasChecked", + "True", + "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" - }, - "parameters": ["Object", "Behavior", "yes"] - } + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" - }, - "parameters": ["Object", "Behavior", "no"] - } + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "Toggle", + "" ] } ] @@ -1682,7 +2073,6 @@ "description": "Check if the toggle switch is checked.", "fullName": "Is checked", "functionType": "Condition", - "group": "Switch finite state machine configuration", "name": "IsChecked", "sentence": "_PARAM0_ is checked", "events": [ @@ -1691,9 +2081,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "IsChecked", + "True", + "" + ] } ], "actions": [ @@ -1701,7 +2095,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -1722,49 +2118,45 @@ "objectGroups": [] }, { - "description": "Check (or uncheck) the toggle switch.", - "fullName": "Check (or uncheck)", - "functionType": "Action", - "group": "Switch finite state machine configuration", - "name": "SetChecked", - "sentence": "Check _PARAM0_: _PARAM2_", + "description": "Check if the toggle switch was checked in the current frame.", + "fullName": "Has just been checked", + "functionType": "Condition", + "name": "HasJustBeenChecked", + "sentence": "_PARAM0_ has just been checked", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [ + "IsChecked", + "True", + "" + ] + }, { "type": { - "value": "GetArgumentAsBoolean" + "inverted": true, + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "WasChecked", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetReturnBoolean" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "True" + ] } ] } @@ -1780,73 +2172,175 @@ "name": "Behavior", "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", "type": "behavior" - }, - { - "defaultValue": "yes", - "description": "IsChecked", - "name": "Value", - "optional": true, - "type": "yesorno" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "Button finite state machine", - "description": "", - "group": "", - "extraInformation": ["SpriteToggleSwitch::ButtonFSM"], - "hidden": false, - "name": "ButtonFSM" }, { - "value": "false", - "type": "Boolean", - "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "IsChecked" + "description": "Check if the toggle switch was unchecked in the current frame.", + "fullName": "Has just been unchecked", + "functionType": "Condition", + "name": "HasJustBeenUnchecked", + "sentence": "_PARAM0_ has just been unchecked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsChecked", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "WasChecked", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] }, { - "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "WasChecked" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", - "private": true, - "eventsFunctions": [ + "description": "Check if the toggle switch was toggled in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenUnchecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, { - "fullName": "", + "description": "Check (or uncheck) the toggle switch.", + "fullName": "Check (or uncheck)", "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", + "name": "SetChecked", + "sentence": "Check _PARAM0_: _PARAM2_", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "False", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Comment", @@ -1858,96 +2352,313 @@ "textG": 0, "textR": 0 }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" + "comment": "Avoid a started touch to interfere with a state change from events." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, "parameters": [ "Object", "Behavior", - "=", - "\"Validated\"" + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } + "parameters": [ + "Object", + "Behavior", + "" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" ] - }, + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsChecked", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "Object", + "Behavior", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "Object", + "Behavior", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button finite state machine", + "extraInformation": [ + "SpriteToggleSwitch::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "false", + "type": "Boolean", + "label": "Is checked", + "name": "IsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "PreviousIsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "WasChecked" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "name": "ButtonFSM", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -1958,238 +2669,29 @@ "textG": 0, "textR": 0 }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "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": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -2197,155 +2699,400 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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::Standard", - "conditions": [ + }, { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "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": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" + "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\"" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ + "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": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -2354,13 +3101,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -2370,50 +3116,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "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": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "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": [] + ] } ], "parameters": [ @@ -2443,15 +3290,62 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -2483,9 +3377,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -2493,7 +3391,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2525,9 +3425,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -2535,7 +3439,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2567,9 +3473,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -2577,7 +3487,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2609,9 +3521,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -2619,7 +3535,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -2628,11 +3546,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2643,7 +3560,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2675,11 +3594,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -2690,7 +3608,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2722,11 +3642,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2737,7 +3656,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2772,7 +3693,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -2802,8 +3725,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -2811,14 +3732,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -2827,9 +3761,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -2837,9 +3768,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -2847,9 +3775,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -2857,9 +3782,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -2869,42 +3791,137 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "ToggleSwitch", "description": "A toggle switch that users can click or touch.", "fullName": "Toggle switch", + "isUsingLegacyInstancesRenderer": false, "name": "SpriteToggleSwitch", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": 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.", - "comment2": "" + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ { - "type": { - "value": "Create" - }, - "parameters": ["", "State", "0", "0", ""] + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] } ] }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -2915,17 +3932,20 @@ "textG": 0, "textR": 0 }, - "comment": "Pass the configuration to the behavior.\nThe PreviousIsChecked property allows to detect a change of \"intial value\" on hot reload.", - "comment2": "" + "comment": "Pass the configuration to the behavior.\nThe PreviousIsChecked property allows to detect a change of \"intial value\" on hot reload." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "True", + "" + ] } ], "actions": [ @@ -2933,13 +3953,22 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "", ""] + "parameters": [ + "State", + "SwitchFSM", + "", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ] }, @@ -2948,10 +3977,13 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "False", + "" + ] } ], "actions": [ @@ -2959,13 +3991,22 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "no", ""] + "parameters": [ + "State", + "SwitchFSM", + "no", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", ""] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ] }, @@ -2977,7 +4018,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -3028,16 +4072,23 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "True", + "" + ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "SwitchFSM", ""] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ], "actions": [ @@ -3045,13 +4096,21 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["Object", "yes", "no"] + "parameters": [ + "Object", + "yes", + "no" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ] }, @@ -3060,16 +4119,23 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "False", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "SwitchFSM", ""] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ], "actions": [ @@ -3077,13 +4143,21 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["Object", "SwitchFSM", "no"] + "parameters": [ + "Object", + "SwitchFSM", + "no" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ] } @@ -3112,7 +4186,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -3141,7 +4218,140 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "parameters": ["State", "SwitchFSM", ""] + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was checked in the current frame.", + "fullName": "Has just been checked", + "functionType": "Condition", + "name": "HasJustBeenChecked", + "sentence": "_PARAM0_ has just been checked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was unchecked in the current frame.", + "fullName": "Has just been unchecked", + "functionType": "Condition", + "name": "HasJustBeenUnchecked", + "sentence": "_PARAM0_ has just been unchecked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenUnchecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was checked or unchecked in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenToggled" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] } ], "actions": [ @@ -3149,7 +4359,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3177,9 +4389,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ @@ -3187,7 +4403,12 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "no", ""] + "parameters": [ + "State", + "SwitchFSM", + "no", + "" + ] } ] }, @@ -3196,9 +4417,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ @@ -3206,7 +4431,12 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "yes", ""] + "parameters": [ + "State", + "SwitchFSM", + "yes", + "" + ] } ] } @@ -3228,6 +4458,40 @@ ], "objectGroups": [] }, + { + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::ToggleChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Check if the button is not used.", "fullName": "Is idle", @@ -3243,7 +4507,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsIdle" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -3251,7 +4519,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3281,7 +4551,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -3289,7 +4563,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3318,7 +4594,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsHovered" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -3326,7 +4606,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3356,7 +4638,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsFocused" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -3364,7 +4650,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3384,7 +4672,6 @@ "fullName": "Is pressed", "functionType": "Condition", "name": "IsPressed", - "private": true, "sentence": "_PARAM0_ is pressed", "events": [ { @@ -3392,9 +4679,56 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsPressed" + "value": "SpriteToggleSwitch::ButtonFSM::IsPressed" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "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": "SpriteToggleSwitch::ButtonFSM::IsPressedOutside" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -3402,7 +4736,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3432,13 +4768,20 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { "value": "AnimationName" }, - "parameters": ["State", "\"Unchecked\""] + "parameters": [ + "State", + "\"Unchecked\"" + ] } ], "actions": [ @@ -3446,13 +4789,18 @@ "type": { "value": "SetAnimationName" }, - "parameters": ["State", "\"Checked\""] + "parameters": [ + "State", + "\"Checked\"" + ] }, { "type": { "value": "PlayAnimation" }, - "parameters": ["State"] + "parameters": [ + "State" + ] } ] }, @@ -3464,13 +4812,20 @@ "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { "value": "AnimationName" }, - "parameters": ["State", "\"Checked\""] + "parameters": [ + "State", + "\"Checked\"" + ] } ], "actions": [ @@ -3478,13 +4833,18 @@ "type": { "value": "SetAnimationName" }, - "parameters": ["State", "\"Unchecked\""] + "parameters": [ + "State", + "\"Unchecked\"" + ] }, { "type": { "value": "PlayAnimation" }, - "parameters": ["State"] + "parameters": [ + "State" + ] } ] } @@ -3511,9 +4871,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -3521,7 +4885,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["State", "ButtonFSM", "yes"] + "parameters": [ + "State", + "ButtonFSM", + "yes" + ] } ] }, @@ -3531,9 +4899,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -3541,7 +4913,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["State", "ButtonFSM", "no"] + "parameters": [ + "State", + "ButtonFSM", + "no" + ] } ] } @@ -3575,7 +4951,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["State", "ButtonFSM"] + "parameters": [ + "State", + "ButtonFSM" + ] } ], "actions": [ @@ -3583,7 +4962,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3604,10 +4985,6 @@ "value": "true", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "IsChecked" }, { @@ -3615,64 +4992,170 @@ "type": "Boolean", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousIsChecked" } ], - "objects": [ - { - "assetStoreId": "", - "name": "State", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false - } - ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "variants": [ + { + "areaMaxX": 25, + "areaMaxY": 26, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", + "assetStoreOriginalName": "Square Blue Toggle", + "name": "Square Blue Toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ + ], + "animations": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square Blue Toggle_Off.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square Blue Toggle_On.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } ] } - ] + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -3683,12 +5166,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -3698,13 +5182,49 @@ "identifier": "PanelSpriteSlider", "name": "gdevelop-extension-store" }, - "tags": ["draggable", "slider", "ui", "widget"], + "tags": [ + "draggable", + "slider", + "ui", + "widget" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders 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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -3728,7 +5248,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValue()"] + "parameters": [ + "CurrentValue" + ] } ] } @@ -3763,21 +5285,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "StepSize", + "=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -3787,21 +5312,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "StepSize", + "!=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -3838,7 +5366,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMinValue()"] + "parameters": [ + "MinValue" + ] } ] } @@ -3874,13 +5404,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -3929,7 +5458,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxValue()"] + "parameters": [ + "MaxValue" + ] } ] } @@ -3965,13 +5496,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -4060,7 +5590,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyStepSize()"] + "parameters": [ + "StepSize" + ] } ] } @@ -4096,13 +5628,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -4141,40 +5672,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Value" + "name": "CurrentValue" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -4194,114 +5709,30 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } + "parameters": [ + "", + "" ] - }, - { - "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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -4312,238 +5743,29 @@ "textG": 0, "textR": 0 }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "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": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -4551,155 +5773,400 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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::Standard", - "conditions": [ + }, { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "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": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "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": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" + "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\"" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ + "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": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -4708,13 +6175,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -4724,50 +6190,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "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": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "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": [] + ] } ], "parameters": [ @@ -4797,15 +6364,23 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -4837,9 +6412,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -4847,7 +6426,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4879,9 +6460,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -4889,7 +6474,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4921,9 +6508,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -4931,7 +6522,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4963,9 +6556,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -4973,7 +6570,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -4982,11 +6581,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -4997,7 +6595,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5029,11 +6629,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5044,7 +6643,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5076,11 +6677,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5091,7 +6691,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5126,7 +6728,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -5156,8 +6760,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -5165,14 +6767,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -5181,9 +6796,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -5191,9 +6803,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -5201,9 +6810,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -5211,9 +6817,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -5223,42 +6826,296 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", - "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": [], + "string": "It displays the value when it changes.", + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload.", - "comment2": "" + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "Thumb", + "Draggable", + "" ] } ] @@ -5273,8 +7130,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances.", - "comment2": "" + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -5282,39 +7138,71 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": ["", "Background", "0", "0", ""] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "FillBar", "0", "0", ""] + "parameters": [ + "FillBar", + "Anchor", + "" + ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "Thumb", "0", "0", ""] + "parameters": [ + "Thumb", + "Anchor", + "" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Background", "=", "1"] + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - FillBar.Width()" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["FillBar", "=", "2"] - }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - FillBar.Height()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Thumb", "=", "3"] + "parameters": [ + "PreviousInitialValue", + "=", + "InitialValue" + ] } ] }, @@ -5328,8 +7216,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the label that is displayed over the thumb.", - "comment2": "" + "comment": "Create the label that is displayed over the thumb." }, { "type": "BuiltinCommonInstructions::Standard", @@ -5339,25 +7226,21 @@ "type": { "value": "Create" }, - "parameters": ["", "Label", "0", "0", ""] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": ["Label", "=", "4"] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": ["Label", "no"] + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -5371,8 +7254,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass the configuration to the behavior.", - "comment2": "" + "comment": "Pass the configuration to the behavior." }, { "type": "BuiltinCommonInstructions::Standard", @@ -5382,7 +7264,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -5391,7 +7276,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -5405,19 +7290,28 @@ "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Thumb", ""] + "parameters": [ + "Thumb", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["FillBar", ""] + "parameters": [ + "FillBar", + "" + ] } ] } @@ -5442,17 +7336,14 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] }, @@ -5461,24 +7352,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -5488,7 +7379,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -5512,137 +7403,323 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": ["Background", "ButtonFSM"] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" + "value": "BehaviorActivated" }, - "parameters": ["Thumb", "Draggable"] - }, + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [], + "events": [ { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "value": "DraggableBehavior::Dragged" }, - "parameters": ["Background", "ButtonFSM", ""] - }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "DraggableBehavior::Dropped" }, - "parameters": ["Object"] + "parameters": [ + "Thumb", + "Draggable" + ] } ], "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": ["Label", ""] - }, { "type": { "value": "ResetObjectTimer" }, - "parameters": ["Label", "\"HideBack\""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" }, - "parameters": ["Object"] + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] } ], "actions": [ @@ -5650,251 +7727,62 @@ "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": ["Object"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": ["Label", ""] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": ["Label"] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - } - ] - } - ], - "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 parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] }, { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": ["Object", "=", "1"] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, + ], "parameters": [] } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": ["Object", ""] - } ] } ], @@ -5929,19 +7817,30 @@ "type": { "value": "DraggableBehavior::Dragged" }, - "parameters": ["Thumb", "Draggable"] + "parameters": [ + "Thumb", + "Draggable" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressed" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] } ] } @@ -5951,7 +7850,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5981,7 +7882,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::Value()"] + "parameters": [ + "FillBar.Slider::Value()" + ] } ] } @@ -6018,7 +7921,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -6026,7 +7929,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -6063,7 +7969,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MinValue()"] + "parameters": [ + "FillBar.Slider::MinValue()" + ] } ] } @@ -6100,21 +8008,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -6151,7 +8056,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MaxValue()"] + "parameters": [ + "FillBar.Slider::MaxValue()" + ] } ] } @@ -6188,21 +8095,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -6239,7 +8143,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::StepSize()"] + "parameters": [ + "FillBar.Slider::StepSize()" + ] } ] } @@ -6276,7 +8182,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -6312,9 +8218,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] } ], "actions": [ @@ -6322,7 +8232,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -6351,23 +8263,33 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "ShowLabelAtChanges", + "False", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -6376,23 +8298,34 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] } ] } @@ -6412,53 +8345,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -6474,7 +8360,13 @@ "type": { "value": "PanelSpriteSlider::Slider::Size" }, - "parameters": ["FillBar", "Slider", ">", "0", ""] + "parameters": [ + "FillBar", + "Slider", + ">", + "0", + "" + ] } ], "actions": [], @@ -6485,10 +8377,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -6506,126 +8399,71 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { "type": { "value": "SetCenterY" }, - "parameters": ["Thumb", "=", "FillBar.CenterY()"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Label", - "=", - "ToString(Object.Value())" - ] - }, - { - "type": { - "value": "SetCenterX" - }, - "parameters": ["Label", "=", "Thumb.CenterX()"] - }, - { - "type": { - "value": "MettreY" - }, "parameters": [ - "Label", + "Thumb", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "FillBar.CenterY()" ] - }, - { - "type": { - "value": "TextObject::Angle" - }, - "parameters": ["Label", "=", "-Object.Angle()"] } ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.PropertyBarLeftPadding()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "ToString(Object.Value())" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Label", + "=", + "Thumb.CenterX()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Label", + "=", + "-Object.Angle()" + ] + } ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -6652,7 +8490,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -6689,8 +8527,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass configuration to the behavior and update children.", - "comment2": "" + "comment": "Pass configuration to the behavior and update children." }, { "type": "BuiltinCommonInstructions::Standard", @@ -6703,9 +8540,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -6715,7 +8551,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -6726,7 +8562,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -6755,9 +8591,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -6765,13 +8605,21 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "yes"] + "parameters": [ + "Thumb", + "Draggable", + "yes" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "yes"] + "parameters": [ + "Background", + "ButtonFSM", + "yes" + ] } ] }, @@ -6781,9 +8629,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -6791,19 +8643,29 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "no"] + "parameters": [ + "Thumb", + "Draggable", + "no" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "no"] + "parameters": [ + "Background", + "ButtonFSM", + "no" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] } @@ -6837,7 +8699,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Background", "ButtonFSM"] + "parameters": [ + "Background", + "ButtonFSM" + ] } ], "actions": [ @@ -6845,7 +8710,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -6866,100 +8733,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -6967,8 +8833,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -6977,8 +8841,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -6987,8 +8853,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["FillBar"], + "extraInformation": [ + "FillBar" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -6997,111 +8865,296 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Label"], + "extraInformation": [ + "Label" + ], + "choices": [], "hidden": true, "name": "ShowLabel" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" + } + ], + "variants": [ + { + "areaMaxX": 215, + "areaMaxY": 18, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", + "assetStoreOriginalName": "Square Blue Slider", + "name": "Square Blue Slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 16, + "color": { + "b": 221, + "g": 221, + "r": 221 + }, + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "221;221;221" + } + }, { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 + "assetStoreId": "", + "bottomMargin": 3, + "height": 21, + "leftMargin": 3, + "name": "Thumb", + "rightMargin": 3, + "texture": "Square Blue Slider Thumb.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 21, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 1, + "height": 11, + "leftMargin": 1, + "name": "FillBar", + "rightMargin": 1, + "texture": "Square Blue Slider Fill Bar.png", + "tiled": false, + "topMargin": 1, + "type": "PanelSpriteObject::PanelSprite", + "width": 209, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 4, + "height": 18, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square Blue Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 215, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] } - ] + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 11, + "keepRatio": true, + "layer": "", + "name": "FillBar", + "persistentUuid": "92813097-aee7-4422-8421-125e3ed61986", + "width": 209, + "x": 3, + "y": 3, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Thumb", + "persistentUuid": "ac167400-9a98-4f22-a0a2-8b28626074a6", + "width": 0, + "x": 194, + "y": -2, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -7112,35 +9165,45 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Draggable (for physics objects)", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjcsMTFjMC0yLTIuMi0zLjYtNS42LTQuNEMyMC42LDMuMiwxOSwxLDE3LDFzLTMuNiwyLjItNC40LDUuNkM5LjIsNy40LDcsOSw3LDExYzAsMiwyLjIsMy42LDUuNiw0LjQNCgljMC4zLDEuMiwwLjYsMi4yLDEuMSwzLjFjMC4zLDAuNSwwLjksMC43LDEuNCwwLjRjMC41LTAuMywwLjctMC45LDAuNC0xLjRjLTAuMy0wLjUtMC41LTEuMS0wLjctMS44YzAuNywwLjEsMS41LDAuMSwyLjIsMC4xDQoJYzAuOCwwLDEuNSwwLDIuMi0wLjFjLTAuMywxLTAuNywxLjktMS4xLDIuNWMtMC4zLDAuNC0wLjIsMS4xLDAuMiwxLjRjMC4yLDAuMSwwLjQsMC4yLDAuNiwwLjJjMC4zLDAsMC42LTAuMSwwLjgtMC40DQoJYzAuNy0xLDEuMy0yLjQsMS43LTRDMjQuOCwxNC42LDI3LDEzLDI3LDExeiBNMTcsM2MwLjcsMCwxLjYsMS4yLDIuMiwzLjNjLTAuNy0wLjEtMS41LTAuMS0yLjItMC4xcy0xLjUsMC0yLjIsMC4xDQoJQzE1LjQsNC4yLDE2LjMsMywxNywzeiBNOSwxMWMwLTAuNywxLjItMS42LDMuMy0yLjJjLTAuMSwwLjctMC4xLDEuNS0wLjEsMi4yYzAsMC44LDAsMS41LDAuMSwyLjJDMTAuMiwxMi42LDksMTEuNyw5LDExeiBNMTcsMTMuOQ0KCWMtMSwwLTEuOS0wLjEtMi43LTAuMmMtMC4xLTAuOC0wLjItMS43LTAuMi0yLjdjMC0xLDAuMS0xLjksMC4yLTIuN0MxNS4xLDguMiwxNiw4LjEsMTcsOC4xczEuOSwwLjEsMi43LDAuMg0KCWMwLjEsMC44LDAuMiwxLjcsMC4yLDIuN2MwLDAuOS0wLjEsMS44LTAuMiwyLjdDMTguOSwxMy44LDE4LDEzLjksMTcsMTMuOXogTTIxLjcsMTMuMmMwLjEtMC43LDAuMS0xLjUsMC4xLTIuMg0KCWMwLTAuOCwwLTEuNS0wLjEtMi4yQzIzLjgsOS40LDI1LDEwLjMsMjUsMTFDMjUsMTEuNywyMy44LDEyLjYsMjEuNywxMy4yeiIvPg0KPHBhdGggZD0iTTI5LjksMTcuNUMyOS43LDE3LjIsMjkuNCwxNywyOSwxN2MtMi4yLDAtNC4zLDEtNS42LDIuOEwyMi41LDIxYy0xLjEsMS4zLTIuOCwyLTQuNSwyaC0zYy0wLjYsMC0xLTAuNC0xLTFzMC40LTEsMS0xaDEuOQ0KCWMxLjYsMCwzLjEtMS4zLDMuMS0yLjljMCwwLDAtMC4xLDAtMC4xYzAtMC41LTAuNS0xLTEtMWwtNi4xLDBjLTMuNiwwLTYuNSwxLjYtOC4xLDQuMmwtMi43LDQuMmMtMC4yLDAuMy0wLjIsMC43LDAsMWwzLDUNCgljMC4xLDAuMiwwLjQsMC40LDAuNiwwLjVjMC4xLDAsMC4xLDAsMC4yLDBjMC4yLDAsMC40LTAuMSwwLjYtMC4yYzMuOC0yLjUsOC4yLTMuOCwxMi43LTMuOGMzLjMsMCw2LjMtMS44LDcuOS00LjdsMi43LTQuOA0KCUMzMCwxOC4yLDMwLDE3LjgsMjkuOSwxNy41eiIvPg0KPC9zdmc+DQo=", "name": "DraggablePhysics", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/Virtual Reality/Virtual Reality_hand_vr_ar_360.svg", "shortDescription": "Drag a physics object with the mouse (or touch).", - "version": "1.1.0", + "version": "1.3.0", "description": [ "Enables players to click and drag on physics objects to move them. The object retains velocity when the click is released, allowing players to fling objects across the screen.", "", "Note:", "- The default \"draggable\" behavior will not work on objects with the physics behavior. This extension should be used instead.", "- This extension will only work on objects that have the physics behavior.", - "- Kinematic physics mode is incompatible with this extension. The object will be changed to dynamic mode." + "- Kinematic physics mode is incompatible with this extension. The object will be changed to dynamic mode.", + "", + "The Parking Jam example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://parking-jam))." ], "origin": { "identifier": "DraggablePhysics", "name": "gdevelop-extension-store" }, "tags": [ - "draggable", + "physics", + "drag", "mouse", + "pointer", + "cursor", "touch", "physics", "object", "joint", "fling" ], - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -7171,7 +9234,10 @@ "type": { "value": "Physics2::IsKinematic" }, - "parameters": ["Object", "PhysicsBehavior"] + "parameters": [ + "Object", + "PhysicsBehavior" + ] } ], "actions": [ @@ -7179,7 +9245,10 @@ "type": { "value": "Physics2::SetDynamic" }, - "parameters": ["Object", "PhysicsBehavior"] + "parameters": [ + "Object", + "PhysicsBehavior" + ] } ] } @@ -7205,26 +9274,20 @@ "textG": 0, "textR": 0 }, - "comment": "Create mouse joints and save the joint ID", - "comment2": "" + "comment": "Create mouse joints and save the joint ID" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "MouseButtonFromTextPressed" + "value": "BooleanVariable" }, "parameters": [ - "", - "Object.Behavior::PropertyMouseButton()" + "EnableAutomaticDragging", + "True", + "" ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] } ], "actions": [], @@ -7234,43 +9297,74 @@ "conditions": [ { "type": { - "inverted": true, - "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" + "value": "MouseButtonFromTextPressed" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "", + "MouseButton" + ] }, { "type": { - "value": "SourisSurObjet" + "value": "BuiltinCommonInstructions::Once" }, - "parameters": ["Object", "", "", ""] + "parameters": [] } ], - "actions": [ - { - "type": { - "value": "Physics2::AddMouseJoint" - }, - "parameters": [ - "Object", - "PhysicsBehavior", - "MouseX(Object.Layer(),0)", - "MouseY(Object.Layer(),0)", - "Object.Behavior::PropertyMaxForce()", - "Object.Behavior::PropertyFrequency()", - "Object.Behavior::PropertyDamping()", - "__DraggablePhysics.MouseJointID" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseJointID" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Variable(__DraggablePhysics.MouseJointID)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "Object", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics2::AddMouseJoint" + }, + "parameters": [ + "Object", + "PhysicsBehavior", + "MouseX(Object.Layer(),0)", + "MouseY(Object.Layer(),0)", + "MaxForce", + "Frequency", + "Damping", + "__DraggablePhysics.MouseJointID" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "MouseJointID", + "=", + "Variable(__DraggablePhysics.MouseJointID)" + ] + } ] } ] @@ -7287,19 +9381,28 @@ "textG": 0, "textR": 0 }, - "comment": "Delete the mouse joint", - "comment2": "" + "comment": "Delete the mouse joint" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "EnableAutomaticDragging", + "True", + "" + ] + }, { "type": { "value": "MouseButtonFromTextReleased" }, "parameters": [ "", - "Object.Behavior::PropertyMouseButton()" + "MouseButton" ] } ], @@ -7308,7 +9411,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::ReleaseDrag" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] }, @@ -7322,8 +9429,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update the position of the mouse joint to follow the mouse", - "comment2": "" + "comment": "Update the position of the mouse joint to follow the mouse" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7332,7 +9438,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -7343,7 +9453,7 @@ "parameters": [ "Object", "PhysicsBehavior", - "Object.Behavior::PropertyMouseJointID()", + "MouseJointID", "MouseX(Object.Layer(),0)", "MouseY(Object.Layer(),0)" ] @@ -7369,6 +9479,72 @@ ], "objectGroups": [] }, + { + "description": "Start dragging object.", + "fullName": "Start dragging object", + "functionType": "Action", + "name": "StartDragging", + "sentence": "Start dragging (physics) _PARAM0_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics2::AddMouseJoint" + }, + "parameters": [ + "Object", + "PhysicsBehavior", + "MouseX(Object.Layer(),0)", + "MouseY(Object.Layer(),0)", + "MaxForce", + "Frequency", + "Damping", + "__DraggablePhysics.MouseJointID" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "MouseJointID", + "=", + "Variable(__DraggablePhysics.MouseJointID)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggablePhysics::DraggablePhysics", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "Release dragged object.", "fullName": "Release dragged object", @@ -7383,7 +9559,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -7394,14 +9574,18 @@ "parameters": [ "Object", "PhysicsBehavior", - "Object.Behavior::PropertyMouseJointID()" + "MouseJointID" ] }, { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseJointID" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "MouseJointID", + "=", + "0" + ] } ] } @@ -7433,9 +9617,13 @@ "conditions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::PropertyMouseJointID" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "MouseJointID", + "!=", + "0" + ] } ], "actions": [ @@ -7443,7 +9631,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7477,7 +9667,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::ReleaseDrag" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -7513,7 +9707,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyMouseButton()"] + "parameters": [ + "MouseButton" + ] } ] } @@ -7550,13 +9746,12 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseButton" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseButton", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -7593,7 +9788,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxForce()"] + "parameters": [ + "MaxForce" + ] } ] } @@ -7629,13 +9826,12 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMaxForce" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxForce", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -7672,7 +9868,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyFrequency()"] + "parameters": [ + "Frequency" + ] } ] } @@ -7708,13 +9906,12 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyFrequency" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Frequency", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -7751,7 +9948,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyDamping()"] + "parameters": [ + "Damping" + ] } ] } @@ -7787,13 +9986,140 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyDamping" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Damping", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggablePhysics::DraggablePhysics", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if automatic dragging is enabled.", + "fullName": "Automatic dragging", + "functionType": "Condition", + "group": "Draggable (for physics objects) configuration", + "name": "IsAutomaticDraggingEnabled", + "sentence": "Automatic dragging is enabled on _PARAM0_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "EnableAutomaticDragging", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggablePhysics::DraggablePhysics", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Enable (or disable) automatic dragging with the mouse or touch.", + "fullName": "Enable (or disable) automatic dragging", + "functionType": "Action", + "group": "Draggable (for physics objects) configuration", + "name": "SetEnableAutomaticDragging", + "sentence": "Enable automatic dragging on _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "EnableAutomaticDragging", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "EnableAutomaticDragging", + "True", + "" ] } ] @@ -7810,6 +10136,13 @@ "name": "Behavior", "supplementaryInformation": "DraggablePhysics::DraggablePhysics", "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "EnableAutomaticDragging", + "name": "Value", + "optional": true, + "type": "yesorno" } ], "objectGroups": [] @@ -7820,20 +10153,30 @@ "value": "", "type": "Behavior", "label": "Physics behavior", - "description": "", - "group": "", - "extraInformation": ["Physics2::Physics2Behavior"], - "hidden": false, + "extraInformation": [ + "Physics2::Physics2Behavior" + ], + "choices": [], "name": "PhysicsBehavior" }, { "value": "Left", "type": "Choice", "label": "Mouse button", - "description": "", - "group": "", - "extraInformation": ["Left", "Right", "Middle"], - "hidden": false, + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + }, + { + "label": "Middle", + "value": "Middle" + } + ], "name": "MouseButton" }, { @@ -7841,41 +10184,33 @@ "type": "Number", "unit": "Newton", "label": "Maximum force", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxForce" }, { "value": "10", "type": "Number", "label": "Frequency (Hz) ", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Frequency" }, { "value": "1", "type": "Number", "label": "Damping ratio (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Damping" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseJointID" + }, + { + "value": "true", + "type": "Boolean", + "label": "Enable automatic dragging", + "description": "If automatic dragging is disabled, use the \"Start drag\" and \"Release drag\" actions.", + "name": "EnableAutomaticDragging" } ], "sharedPropertyDescriptors": [] @@ -7884,22 +10219,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [ - { - "filename": "C:\\Users\\Maciel\\AppData\\Local\\Temp/GDTemporaries/GD0x5bd27c0SourceFile.cpp", - "gdManaged": true, - "language": "C++" - }, - { - "filename": "C:\\Users\\Maciel\\AppData\\Local\\Temp/GDTemporaries/GD0x4863290SourceFile.cpp", - "gdManaged": true, - "language": "C++" - }, - { - "filename": "C:\\Users\\Maciel\\AppData\\Local\\Temp/GDTemporaries/GD0x4bb7d18SourceFile.cpp", - "gdManaged": true, - "language": "C++" - } - ] -} + "externalLayouts": [] +} \ No newline at end of file diff --git a/examples/face-forward/face-forward.json b/examples/face-forward/face-forward.json index 307f0c0bc..db01f4506 100644 --- a/examples/face-forward/face-forward.json +++ b/examples/face-forward/face-forward.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "adaptWidth", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Face Forward", "description": "Learn how to use the FaceForward extension.", @@ -60,7 +59,8 @@ "educational" ], "playableDevices": [ - "keyboard" + "keyboard", + "mobile" ], "extensionProperties": [], "platforms": [ @@ -73,7 +73,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "brick_04.png", "kind": "image", "metadata": "", @@ -82,7 +81,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/tiled_Purple background.png", "kind": "image", "metadata": "", @@ -95,7 +93,6 @@ } }, { - "alwaysLoaded": false, "file": "Redship-1.png", "kind": "image", "metadata": "", @@ -104,7 +101,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Border.png", "kind": "image", "metadata": "", @@ -117,7 +113,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Fill Bar.png", "kind": "image", "metadata": "", @@ -130,7 +125,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Thumb.png", "kind": "image", "metadata": "", @@ -142,10 +136,12 @@ "name": "Square Blue Slider Thumb.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -164,13 +160,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.6935999999999999, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -397,7 +396,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "FaceForwardObject", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -485,7 +483,6 @@ "italic": false, "name": "RotationSpeed_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -499,6 +496,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Rotation Speed:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -507,7 +526,6 @@ "italic": false, "name": "MovementSpeed_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -521,6 +539,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Movement Speed:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -529,7 +569,6 @@ "italic": false, "name": "ObjectQuantity_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -543,13 +582,34 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Object Quantity:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { "assetStoreId": "", "height": 32, "name": "Background", - "tags": "", "texture": "brick_04.png", "type": "TiledSpriteObject::TiledSprite", "width": 32, @@ -561,7 +621,6 @@ "assetStoreId": "", "height": 128, "name": "PurpleBackground", - "tags": "", "texture": "tiled_Purple background.png", "type": "TiledSpriteObject::TiledSprite", "width": 128, @@ -575,7 +634,6 @@ "italic": false, "name": "Title", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -589,13 +647,35 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Extension:\nFace Forward\n", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 35, + "lineHeight": 0, + "color": "0;0;0" } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "RotationSpeed_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -642,6 +722,28 @@ "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" } }, "Thumb": { @@ -659,8 +761,8 @@ { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MovementSpeed_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -707,6 +809,28 @@ "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" } }, "Thumb": { @@ -724,8 +848,8 @@ { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "ObjectQuantity_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -774,6 +898,28 @@ "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" } }, "Thumb": { @@ -794,7 +940,6 @@ "italic": false, "name": "FPS_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -815,9 +960,69 @@ "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": "FPS: 0", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "FaceForwardObject" + }, + { + "objectName": "RotationSpeed_Text" + }, + { + "objectName": "MovementSpeed_Text" + }, + { + "objectName": "ObjectQuantity_Text" + }, + { + "objectName": "Background" + }, + { + "objectName": "PurpleBackground" + }, + { + "objectName": "Title" + }, + { + "objectName": "RotationSpeed_Slider" + }, + { + "objectName": "MovementSpeed_Slider" + }, + { + "objectName": "ObjectQuantity_Slider" + }, + { + "objectName": "FPS_Text" + } + ] + }, "events": [ { "colorB": 228, @@ -1400,9 +1605,11 @@ "ambientLightColorB": 1702453632, "ambientLightColorG": 92, "ambientLightColorR": 89, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -1416,9 +1623,11 @@ "ambientLightColorB": 0, "ambientLightColorG": 0, "ambientLightColorR": 6323496, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -1471,9 +1680,11 @@ "ambientLightColorB": 1702453632, "ambientLightColorG": 0, "ambientLightColorR": 12, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -1520,6 +1731,10 @@ { "name": "Scale", "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] } @@ -1531,6 +1746,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Frames per second (FPS)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMzAsM2gtMkg0SDJDMS40LDMsMSwzLjQsMSw0czAuNCwxLDEsMWgxdjE2YzAsMC42LDAuNCwxLDEsMWg5LjhsLTUuNSw2LjNjLTAuNCwwLjQtMC4zLDEsMC4xLDEuNEM4LjUsMjkuOSw4LjgsMzAsOSwzMA0KCWMwLjMsMCwwLjYtMC4xLDAuOC0wLjNsNS4yLTZWMjhjMCwwLjYsMC40LDEsMSwxczEtMC40LDEtMXYtNC4zbDUuMiw2YzAuMiwwLjIsMC41LDAuMywwLjgsMC4zYzAuMiwwLDAuNS0wLjEsMC43LTAuMg0KCWMwLjQtMC40LDAuNS0xLDAuMS0xLjRMMTguMiwyMkgyOGMwLjYsMCwxLTAuNCwxLTFWNWgxYzAuNiwwLDEtMC40LDEtMVMzMC42LDMsMzAsM3ogTTI0LjgsOC42bC00LDZjLTAuMywwLjQtMC44LDAuNi0xLjMsMC4zDQoJTDE1LjgsMTNoLTMuNGwtMy43LDMuN0M4LjUsMTYuOSw4LjMsMTcsOCwxN3MtMC41LTAuMS0wLjctMC4zYy0wLjQtMC40LTAuNC0xLDAtMS40bDQtNGMwLjItMC4yLDAuNC0wLjMsMC43LTAuM2g0DQoJYzAuMiwwLDAuMywwLDAuNCwwLjFsMy4yLDEuNmwzLjUtNS4zYzAuMy0wLjUsMC45LTAuNiwxLjQtMC4zQzI1LDcuNSwyNS4xLDguMSwyNC44LDguNnoiLz4NCjwvc3ZnPg0K", "name": "FPS", @@ -1562,6 +1778,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "fullName": "", @@ -1945,10 +2163,6 @@ "value": "FPS: ", "type": "String", "label": "The prefix before the FPS count", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "prefix" }, { @@ -1956,10 +2170,6 @@ "type": "Number", "unit": "Dimensionless", "label": "Number of decimal digits to display", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "DecimalDigits" } ], @@ -1973,12 +2183,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -1998,8 +2209,39 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders 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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -2024,7 +2266,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyValue()" + "CurrentValue" ] } ] @@ -2060,11 +2302,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", "0" ] @@ -2073,13 +2314,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -2089,11 +2329,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "!=", "0" ] @@ -2102,13 +2341,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -2146,7 +2384,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMinValue()" + "MinValue" ] } ] @@ -2183,13 +2421,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -2239,7 +2476,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxValue()" + "MaxValue" ] } ] @@ -2276,13 +2513,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -2372,7 +2608,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyStepSize()" + "StepSize" ] } ] @@ -2409,13 +2645,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -2454,40 +2689,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Value" + "name": "CurrentValue" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -2507,61 +2726,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -2575,562 +2760,598 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - }, - { - "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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" + "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", + "" + ] + } ] - } - ] - } - ], - "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" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "" - ] - } - ], - "actions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "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": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "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": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "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\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedInside\"" ] } ] - }, + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "HasTouchEnded" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "", + "TouchId" ] - }, + } + ], + "actions": [ { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "\"Validated\"" + "0" ] } ], - "actions": [ + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "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": [] + ] } ], "parameters": [ @@ -3160,22 +3381,20 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -3210,11 +3429,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3259,11 +3477,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -3308,11 +3525,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3357,11 +3573,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3383,11 +3598,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3432,11 +3646,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3481,11 +3694,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3534,108 +3746,364 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "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": "Slider", + "description": "Let users select a numerical value by dragging a slider.", + "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PanelSpriteSlider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ { - "description": "Object", - "name": "Object", - "type": "object" + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", - "type": "behavior" + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 } - ], - "objectGroups": [] + ] } ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" - }, + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } ], - "hidden": true, - "name": "State" - }, - { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" - }, + "effects": [] + } + ], + "instances": [ { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "defaultName": "Slider", - "description": "Let users select a numerical value by dragging a slider.", - "fullName": "Slider", - "name": "PanelSpriteSlider", + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -3643,30 +4111,28 @@ "name": "onCreated", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "Thumb", + "Draggable", + "" ] } ] @@ -3681,7 +4147,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances." + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -3689,68 +4155,70 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Background", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, "parameters": [ - "", "FillBar", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, "parameters": [ - "", "Thumb", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Background", + "BarLeftPlusRightMargin", "=", - "1" + "Object.Width() - FillBar.Width()" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "FillBar", + "BarTopPlusBottomMargin", "=", - "2" + "Object.Height() - FillBar.Height()" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Thumb", + "PreviousInitialValue", "=", - "3" + "InitialValue" ] } ] @@ -3783,25 +4251,6 @@ "" ] }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Label", - "=", - "4" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "no" - ] - }, { "type": { "value": "Cache" @@ -3844,7 +4293,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -3897,25 +4346,107 @@ { "fullName": "", "functionType": "Action", - "name": "onHotReloading", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "InitialValue", + "!=", + "PreviousInitialValue" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PreviousInitialValue", + "=", + "InitialValue" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "InitialValue", + "Object.PropertyInitialValue()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "" + "OldParentWidth", + "=", + "Object.Width()" ] }, { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, "parameters": [ "Object", @@ -3926,171 +4457,253 @@ }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "ResizableCapability::ResizableBehavior::SetHeight" }, "parameters": [ - "Object", - "!=", - "Object.PropertyPreviousInitialValue()" + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" ] - } - ], - "actions": [ + }, { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetCenterY" }, "parameters": [ - "Object", + "Thumb", "=", - "Object.PropertyInitialValue()" + "FillBar.CenterY()" ] }, { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + "value": "MettreY" }, "parameters": [ - "Object", + "Label", "=", - "Object.PropertyInitialValue()", - "Object.PropertyInitialValue()" + "Thumb.Y() - Label.Height() - LabelMargin" ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ + }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Background", - "ButtonFSM" - ] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - }, - { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" + "value": "BehaviorActivated" }, "parameters": [ - "Thumb", - "Draggable" + "Background", + "ButtonFSM" ] - }, + } + ], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "inverted": true, + "value": "DraggableBehavior::Dragged" }, "parameters": [ - "Background", - "ButtonFSM", - "" + "Thumb", + "Draggable" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "inverted": true, + "value": "DraggableBehavior::Dropped" }, "parameters": [ - "Background", - "ButtonFSM", - "" + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } ] } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "DraggableBehavior::Dragged" }, "parameters": [ - "Object" + "Thumb", + "Draggable" ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, "parameters": [ - "Label", - "" + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" ] - }, + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { "value": "ResetObjectTimer" @@ -4101,331 +4714,92 @@ ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "CompareObjectTimer" }, "parameters": [ - "Object" + "Label", + "\"HideBack\"", + ">", + "0.5" ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" }, "parameters": [ "Label", - "" + "\"HideBack\"" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": [ - "Object" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Label", - "" - ] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Label" - ] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - } - ] - } - ], - "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 parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\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(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" - ] - } - ] } ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, "parameters": [] } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": [ - "Object", - "" - ] - } ] } ], @@ -4564,7 +4938,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -4651,16 +5025,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -4747,16 +5112,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -4843,7 +5199,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -4879,10 +5235,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabelAtChanges", + "True", + "" ] } ], @@ -4922,21 +5280,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "ShowLabelAtChanges", + "False", + "" ] }, { @@ -4954,21 +5315,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShowLabelAtChanges", + "True", + "" ] }, { @@ -4998,53 +5362,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -5077,10 +5394,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -5098,7 +5416,7 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { @@ -5119,10 +5437,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -5144,12 +5463,12 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, "parameters": [ "Label", @@ -5172,76 +5491,6 @@ ], "objectGroups": [] }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.PropertyBarLeftPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "fullName": "", "functionType": "Expression", @@ -5258,7 +5507,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -5308,9 +5557,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -5320,7 +5568,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -5331,7 +5579,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -5360,10 +5608,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -5396,10 +5646,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -5498,112 +5750,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -5611,8 +5850,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -5621,10 +5858,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -5633,10 +5870,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "FillBar" ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -5645,113 +5882,296 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Label" ], + "choices": [], "hidden": true, "name": "ShowLabel" - } - ], - "objects": [ + }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" + } + ], + "variants": [ + { + "areaMaxX": 215, + "areaMaxY": 18, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", + "assetStoreOriginalName": "Square Blue Slider", + "name": "Square Blue Slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 16, + "color": { + "b": 221, + "g": 221, + "r": 221 + }, + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "221;221;221" + } + }, { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 + "assetStoreId": "", + "bottomMargin": 3, + "height": 21, + "leftMargin": 3, + "name": "Thumb", + "rightMargin": 3, + "texture": "Square Blue Slider Thumb.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 21, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 1, + "height": 11, + "leftMargin": 1, + "name": "FillBar", + "rightMargin": 1, + "texture": "Square Blue Slider Fill Bar.png", + "tiled": false, + "topMargin": 1, + "type": "PanelSpriteObject::PanelSprite", + "width": 209, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 4, + "height": 18, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square Blue Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 215, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 + "angle": 0, + "customSize": true, + "depth": 1, + "height": 11, + "keepRatio": true, + "layer": "", + "name": "FillBar", + "persistentUuid": "92813097-aee7-4422-8421-125e3ed61986", + "width": 209, + "x": 3, + "y": 3, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Thumb", + "persistentUuid": "ac167400-9a98-4f22-a0a2-8b28626074a6", + "width": 0, + "x": 194, + "y": -2, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ] + ], + "editionSettings": [] } ] } @@ -5762,6 +6182,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Face Forward", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/extension-faceforward", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNhcnQtYXJyb3ctcmlnaHQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOSwyMEEyLDIgMCAwLDEgNywyMkEyLDIgMCAwLDEgNSwyMEEyLDIgMCAwLDEgNywxOEEyLDIgMCAwLDEgOSwyME0xNywxOEEyLDIgMCAwLDAgMTUsMjBBMiwyIDAgMCwwIDE3LDIyQTIsMiAwIDAsMCAxOSwyMEEyLDIgMCAwLDAgMTcsMThNNy4yLDE0LjYzQzcuMTksMTQuNjcgNy4xOSwxNC43MSA3LjIsMTQuNzVBMC4yNSwwLjI1IDAgMCwwIDcuNDUsMTVIMTlWMTdIN0EyLDIgMCAwLDEgNSwxNUM1LDE0LjY1IDUuMDcsMTQuMzEgNS4yNCwxNEw2LjYsMTEuNTlMMyw0SDFWMkg0LjI3TDUuMjEsNEgyMEExLDEgMCAwLDEgMjEsNUMyMSw1LjE3IDIwLjk1LDUuMzQgMjAuODgsNS41TDE3LjMsMTJDMTYuOTQsMTIuNjIgMTYuMjcsMTMgMTUuNTUsMTNIOC4xTDcuMiwxNC42M005LDkuNUgxM1YxMS41TDE2LDguNUwxMyw1LjVWNy41SDlWOS41WiIgLz48L3N2Zz4=", "name": "FaceForward", @@ -5788,6 +6209,8 @@ "jy7FXnGX0ZZcWfrAI9YuQaeIphi1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -6183,9 +6606,6 @@ "type": "Number", "label": "Rotation speed (degrees per second)", "description": "Use \"0\" for immediate turning.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "RotationSpeed" }, { @@ -6194,9 +6614,6 @@ "unit": "DegreeAngle", "label": "Offset angle", "description": "Can be used when the image of the object is not facing to the right.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "OffsetAngle" }, { @@ -6204,9 +6621,6 @@ "type": "Number", "unit": "Pixel", "label": "Previous X position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousX" }, @@ -6215,9 +6629,6 @@ "type": "Number", "unit": "Pixel", "label": "Previous Y position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousY" }, @@ -6226,9 +6637,6 @@ "type": "Number", "unit": "DegreeAngle", "label": "Direction the object is moving (in degrees)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MovementDirection" } @@ -6243,6 +6651,7 @@ "category": "", "extensionNamespace": "", "fullName": "Bounce", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZvbGxleWJhbGwiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsMkExMCwxMCAwIDAsMSAyMiwxMkExMCwxMCAwIDAsMSAxMiwyMkExMCwxMCAwIDAsMSAyLDEyQTEwLDEwIDAgMCwxIDEyLDJNMTMuNiwyMC4zNUMxNS45NiwxOC4wNCAxNy42OSwxNS4wOCAxOC41LDExLjc2QzE3Ljg0LDExLjYyIDE3LjE4LDExLjU0IDE2LjUsMTEuNUMxNS41NiwxNS4xMSAxMy40MSwxOC4yMiAxMC41LDIwLjM3QzExLDIwLjQ1IDExLjUsMjAuNSAxMiwyMC41QzEyLjU1LDIwLjUgMTMuMDgsMjAuNDUgMTMuNiwyMC4zNU05LjIzLDIwLjA0QzEyLjIzLDE4LjA3IDE0LjUsMTUuMDUgMTUuNDYsMTEuNUMxNC43MSwxMS41NSAxMy45NywxMS42NSAxMy4yNywxMS44MUMxMi4xOCwxNC44OSA5Ljk3LDE3LjQ0IDcuMTMsMTguOTdDNy43NywxOS40MiA4LjUsMTkuNzggOS4yMywyMC4wNE0yMC41LDEyLjM3QzIwLjE2LDEyLjIzIDE5LjgxLDEyLjExIDE5LjQ2LDEyQzE4Ljc2LDE0LjkgMTcuMzksMTcuNTMgMTUuNTQsMTkuNzNDMTguMzYsMTguNDQgMjAuMzUsMTUuNjQgMjAuNSwxMi4zN00zLjU2LDExLjA0QzMuNSwxMS4zNSAzLjUsMTEuNjggMy41LDEyQzMuNSwxNC41IDQuNTcsMTYuNzMgNi4yNywxOC4yOEM2Ljg2LDE4IDcuNDEsMTcuNjYgNy45NCwxNy4yOUM2LjA4LDE1LjU0IDQuNTgsMTMuNDEgMy41NiwxMS4wNE01LjMzLDYuNzRDNC43Myw3LjUgNC4yNiw4LjM1IDMuOTUsOS4yOEM0LjkyLDEyLjEzIDYuNTgsMTQuNjYgOC43NCwxNi42N0M5LjI1LDE2LjI0IDkuNzIsMTUuNzcgMTAuMTUsMTUuMjZDNy43NCwxMy4wMyA2LDEwLjA4IDUuMzMsNi43NE04LjA0LDQuNUM3LjM2LDQuODUgNi43Myw1LjMgNi4xOCw1LjgyQzYuNzEsOS4yMSA4LjM3LDEyLjIzIDEwLjc3LDE0LjQ3QzExLjE3LDEzLjkxIDExLjUsMTMuMzIgMTEuODIsMTIuN0M5LjY4LDEwLjU2IDguMjgsNy42OSA4LjA0LDQuNU0xOS45Niw5LjAzQzE4LjcsOC42OCAxNy4zNyw4LjUgMTYsOC41QzE0LjEsOC41IDEyLjI4LDguODUgMTAuNjEsOS41QzEwLjk2LDEwLjEgMTEuMzUsMTAuNjcgMTEuOCwxMS4yQzEzLjEyLDEwLjc1IDE0LjUzLDEwLjUgMTYsMTAuNUMxNy41NywxMC41IDE5LjA4LDEwLjc4IDIwLjQ3LDExLjI5QzIwLjQsMTAuNSAyMC4yMyw5Ljc0IDE5Ljk2LDkuMDNNMTcuNTQsNS41N0MxNy4wMyw1LjUgMTYuNSw1LjUgMTYsNS41QzEzLjY5LDUuNSAxMS40Nyw1Ljk0IDkuNDQsNi43M0M5LjYyLDcuMzggOS44Niw4IDEwLjE0LDguNjFDMTEuOTYsNy44OSAxMy45Myw3LjUgMTYsNy41QzE3LjE4LDcuNSAxOC4zMiw3LjYzIDE5LjQyLDcuODdDMTguOTMsNyAxOC4yOSw2LjIxIDE3LjU0LDUuNTdNMTYsNC41QzE0Ljc5LDMuODcgMTMuNDQsMy41IDEyLDMuNUMxMC45NSwzLjUgOS45NCwzLjcgOSw0LjA1QzkuMDQsNC42MyA5LjExLDUuMiA5LjIxLDUuNzVDMTEuMzEsNC45NSAxMy42LDQuNSAxNiw0LjVaIiAvPjwvc3ZnPg==", "name": "Bounce", @@ -6260,6 +6669,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -6441,9 +6852,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -6451,9 +6859,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -6461,9 +6866,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldForceAngle" }, @@ -6471,9 +6873,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldForceLength" }, @@ -6481,9 +6880,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NormalAngle" } @@ -6494,6 +6890,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/fire-bullet/fire-bullet.json b/examples/fire-bullet/fire-bullet.json index 12a309155..bbcccae55 100644 --- a/examples/fire-bullet/fire-bullet.json +++ b/examples/fire-bullet/fire-bullet.json @@ -1,9 +1,9 @@ { "firstLayout": "MainGame", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "nearest", "sizeOnStartupMode": "", "templateSlug": "fire-bullet", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Fire bullet", "description": "Test the \"fire bullet\" extension using sliders to modify the rate of fire, accuracy, number of bullets, and firing arc.\n\nNow with ammo management, reloading, overheat mechanic, and collecting stats.", @@ -89,7 +88,9 @@ "shooter" ], "playableDevices": [ - "keyboard" + "keyboard", + "mobile", + "mobile" ], "extensionProperties": [], "platforms": [ @@ -102,7 +103,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Player1.png", "kind": "image", "metadata": "", @@ -111,7 +111,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Player2.png", "kind": "image", "metadata": "", @@ -120,7 +119,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Player3.png", "kind": "image", "metadata": "", @@ -129,7 +127,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Player4.png", "kind": "image", "metadata": "", @@ -138,7 +135,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Ghost1.png", "kind": "image", "metadata": "", @@ -147,7 +143,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Ghost2.png", "kind": "image", "metadata": "", @@ -156,7 +151,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Ghost3.png", "kind": "image", "metadata": "", @@ -165,7 +159,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Ghost4.png", "kind": "image", "metadata": "", @@ -174,7 +167,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/GhostSquint1.png", "kind": "image", "metadata": "", @@ -183,7 +175,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/GhostSquint2.png", "kind": "image", "metadata": "", @@ -192,7 +183,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/GhostSquint3.png", "kind": "image", "metadata": "", @@ -201,7 +191,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/GhostSquint4.png", "kind": "image", "metadata": "", @@ -227,7 +216,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/WesleyDeathParticle.png", "kind": "image", "metadata": "", @@ -236,7 +224,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_Trap53.png", "kind": "image", "metadata": "", @@ -245,7 +232,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_4Way_Walls2.png", "kind": "image", "metadata": "", @@ -254,7 +240,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_Floor2.png", "kind": "image", "metadata": "", @@ -283,7 +268,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Trap54.png", "kind": "image", "metadata": "", @@ -292,7 +276,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Spider1.png", "kind": "image", "metadata": "", @@ -301,7 +284,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Spider2.png", "kind": "image", "metadata": "", @@ -310,7 +292,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Spider3.png", "kind": "image", "metadata": "", @@ -319,7 +300,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Spider4.png", "kind": "image", "metadata": "", @@ -328,7 +308,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/SpiderCharging1.png", "kind": "image", "metadata": "", @@ -337,7 +316,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/SpiderCharging2.png", "kind": "image", "metadata": "", @@ -346,7 +324,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/SpiderHurt.png", "kind": "image", "metadata": "", @@ -355,7 +332,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Bullet.png", "kind": "image", "metadata": "", @@ -364,7 +340,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/GhostOrb.png", "kind": "image", "metadata": "", @@ -373,7 +348,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Imp1.png", "kind": "image", "metadata": "", @@ -382,7 +356,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp2.png", "kind": "image", "metadata": "", @@ -391,7 +364,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp3.png", "kind": "image", "metadata": "", @@ -400,7 +372,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp4.png", "kind": "image", "metadata": "", @@ -409,7 +380,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ImpCharging1.png", "kind": "image", "metadata": "", @@ -418,7 +388,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ImpCharging2.png", "kind": "image", "metadata": "", @@ -427,7 +396,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ImpCharging3.png", "kind": "image", "metadata": "", @@ -436,7 +404,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ImpCharging4.png", "kind": "image", "metadata": "", @@ -445,7 +412,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_4Way_Doors1.png", "kind": "image", "metadata": "", @@ -454,7 +420,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_4Way_Doors22.png", "kind": "image", "metadata": "", @@ -463,7 +428,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_4Way_Doors3.png", "kind": "image", "metadata": "", @@ -472,7 +436,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_4Way_Doors4.png", "kind": "image", "metadata": "", @@ -521,7 +484,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Walls.png", "kind": "image", "metadata": "", @@ -530,7 +492,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Walls.png", "kind": "image", "metadata": "", @@ -539,7 +500,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_SideTwoWay_Walls.png", "kind": "image", "metadata": "", @@ -548,7 +508,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Doors1.png", "kind": "image", "metadata": "", @@ -557,7 +516,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Doors2.png", "kind": "image", "metadata": "", @@ -566,7 +524,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Doors3.png", "kind": "image", "metadata": "", @@ -575,7 +532,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Doors4.png", "kind": "image", "metadata": "", @@ -584,7 +540,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Doors1.png", "kind": "image", "metadata": "", @@ -593,7 +548,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Doors2.png", "kind": "image", "metadata": "", @@ -602,7 +556,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Doors3.png", "kind": "image", "metadata": "", @@ -611,7 +564,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Doors4.png", "kind": "image", "metadata": "", @@ -620,7 +572,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Side2way_Doors1.png", "kind": "image", "metadata": "", @@ -629,7 +580,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Side2way_Doors2.png", "kind": "image", "metadata": "", @@ -638,7 +588,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Side2way_Doors3.png", "kind": "image", "metadata": "", @@ -647,7 +596,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Side2way_Doors4.png", "kind": "image", "metadata": "", @@ -656,7 +604,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Floor.png", "kind": "image", "metadata": "", @@ -665,7 +612,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Floor.png", "kind": "image", "metadata": "", @@ -674,7 +620,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Side2Way_Floor.png", "kind": "image", "metadata": "", @@ -683,7 +628,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Trap14.png", "kind": "image", "metadata": "", @@ -692,7 +636,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Trap23.png", "kind": "image", "metadata": "", @@ -701,7 +644,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Trap33.png", "kind": "image", "metadata": "", @@ -710,7 +652,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/desktop-icon-512.png", "kind": "image", "metadata": "", @@ -719,7 +660,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-192.png", "kind": "image", "metadata": "", @@ -728,7 +668,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-144.png", "kind": "image", "metadata": "", @@ -737,7 +676,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-96.png", "kind": "image", "metadata": "", @@ -746,7 +684,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-72.png", "kind": "image", "metadata": "", @@ -755,7 +692,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-48.png", "kind": "image", "metadata": "", @@ -764,7 +700,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-36.png", "kind": "image", "metadata": "", @@ -773,7 +708,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-1024.png", "kind": "image", "metadata": "", @@ -782,7 +716,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-180.png", "kind": "image", "metadata": "", @@ -791,7 +724,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-167.png", "kind": "image", "metadata": "", @@ -800,7 +732,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-152.png", "kind": "image", "metadata": "", @@ -809,7 +740,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-144.png", "kind": "image", "metadata": "", @@ -818,7 +748,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-120.png", "kind": "image", "metadata": "", @@ -827,7 +756,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-114.png", "kind": "image", "metadata": "", @@ -836,7 +764,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-100.png", "kind": "image", "metadata": "", @@ -845,7 +772,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-87.png", "kind": "image", "metadata": "", @@ -854,7 +780,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-80.png", "kind": "image", "metadata": "", @@ -863,7 +788,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-76.png", "kind": "image", "metadata": "", @@ -872,7 +796,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-72.png", "kind": "image", "metadata": "", @@ -881,7 +804,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-60.png", "kind": "image", "metadata": "", @@ -890,7 +812,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-58.png", "kind": "image", "metadata": "", @@ -899,7 +820,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-57.png", "kind": "image", "metadata": "", @@ -908,7 +828,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-50.png", "kind": "image", "metadata": "", @@ -917,7 +836,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-40.png", "kind": "image", "metadata": "", @@ -926,7 +844,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-29.png", "kind": "image", "metadata": "", @@ -935,7 +852,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-20.png", "kind": "image", "metadata": "", @@ -944,7 +860,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/thumbnail.png", "kind": "image", "metadata": "", @@ -953,7 +868,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Spider12.png", "kind": "image", "metadata": "", @@ -962,7 +876,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Spider22.png", "kind": "image", "metadata": "", @@ -971,7 +884,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Spider32.png", "kind": "image", "metadata": "", @@ -980,7 +892,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Spider42.png", "kind": "image", "metadata": "", @@ -989,7 +900,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp12.png", "kind": "image", "metadata": "", @@ -998,7 +908,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp22.png", "kind": "image", "metadata": "", @@ -1007,7 +916,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp32.png", "kind": "image", "metadata": "", @@ -1016,7 +924,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp42.png", "kind": "image", "metadata": "", @@ -1025,7 +932,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Gun1.png", "kind": "image", "metadata": "", @@ -1034,7 +940,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Gun2.png", "kind": "image", "metadata": "", @@ -1043,7 +948,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Bullet-1.png", "kind": "image", "metadata": "", @@ -1052,7 +956,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Treasure Chest_Closed.png", "kind": "image", "metadata": "", @@ -1065,7 +968,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Treasure Chest_Opening_1.png", "kind": "image", "metadata": "", @@ -1078,7 +980,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Treasure Chest_Opening_2.png", "kind": "image", "metadata": "", @@ -1111,7 +1012,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Flat Bar Green Fill Bar.png", "kind": "image", "metadata": "{\"localFilePath\":\"assets/Flat Bar Green Fill Bar.png\",\"extension\":\".png\",\"pskl\":{}}", @@ -1124,7 +1024,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Flat Bar White Border.png", "kind": "image", "metadata": "{\"localFilePath\":\"assets/Flat Bar White Border.png\",\"extension\":\".png\",\"pskl\":{}}", @@ -1136,8 +1035,7 @@ "name": "Flat Bar White Border.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -1161,13 +1059,16 @@ "gridType": "rectangular", "gridWidth": 16, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, - "zoomFactor": 0.8007631524066825, - "windowMask": false + "zoomFactor": 0.6784046134949462, + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -8970,7 +8871,9 @@ "text": "Text", "font": "PTSans-Bold.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 10, + "lineHeight": 0, "color": "56;255;4" } }, @@ -8996,6 +8899,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 33, "particleBlue2": 255, + "particleColor1": "126;211;33", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": -10, "particleGreen1": 211, @@ -9041,6 +8946,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 211, "particleBlue2": 255, + "particleColor1": "143;174;211", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": -10, "particleGreen1": 174, @@ -9086,6 +8993,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 255, "particleBlue2": 255, + "particleColor1": "255;255;255", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": -10, "particleGreen1": 255, @@ -9146,7 +9055,9 @@ "text": "Cooldown: 0.10 seconds", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9187,7 +9098,9 @@ "text": "Ammo: 1234", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -9228,7 +9141,9 @@ "text": "Shots fired: 0", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "189;16;224" } }, @@ -9269,7 +9184,9 @@ "text": "Bullets created: 0", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "189;16;224" } }, @@ -9310,7 +9227,9 @@ "text": "Reloads compelted: 0", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "189;16;224" } }, @@ -9351,7 +9270,9 @@ "text": "Max ammo: 100 shots", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9392,7 +9313,9 @@ "text": "Reload Duration: 1 seconds", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9433,7 +9356,9 @@ "text": "Overheat Duration: 1 seconds", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9474,7 +9399,9 @@ "text": "Heat per shot: 0.12", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9515,7 +9442,9 @@ "text": "Linear Cooling rate: 0.12", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9556,7 +9485,9 @@ "text": "Shots per reload: 4", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9597,7 +9528,9 @@ "text": "Shots until reload: 4", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -9638,7 +9571,9 @@ "text": "Heat level: 0.12", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "208;2;27" } }, @@ -9679,7 +9614,9 @@ "text": "Overheated!", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -9720,7 +9657,9 @@ "text": "Use right-click to reload", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -9761,7 +9700,9 @@ "text": "Firing Arc: 360 degrees", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9802,7 +9743,9 @@ "text": "Angle Variance: 360 degrees", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9843,7 +9786,9 @@ "text": "Speed Variance: 100 pixels/second", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9884,7 +9829,9 @@ "text": "Rotate bullets", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9925,7 +9872,9 @@ "text": "Unlimited ammo", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9966,7 +9915,9 @@ "text": "Automatic reloading", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10007,7 +9958,9 @@ "text": "Exponential cooling rate", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10048,7 +10001,9 @@ "text": "Linear cooling", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10089,7 +10044,9 @@ "text": "Bullets per shot: 10", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10130,7 +10087,9 @@ "text": "Reloading...", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "4;255;62" } }, @@ -10171,7 +10130,9 @@ "text": "Ready to shoot!", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "4;255;62" } }, @@ -10212,7 +10173,9 @@ "text": "Out of ammo!", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -10253,7 +10216,9 @@ "text": "Reload needed", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -10294,7 +10259,9 @@ "text": "Waiting for firing cooldown...", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "4;255;62" } }, @@ -10335,7 +10302,9 @@ "text": "Firing shots", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "74;144;226" } }, @@ -10376,7 +10345,9 @@ "text": "Ammo", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "74;144;226" } }, @@ -10417,7 +10388,9 @@ "text": "Overheat", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "74;144;226" } }, @@ -10465,19 +10438,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 + } }, { "assetStoreId": "", @@ -10523,23 +10496,139 @@ "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 + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "ShotsPerReload_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 10, + "TickSpacing": 1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "ReloadDuration_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 3, + "TickSpacing": 0.1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, "absoluteCoordinates": false, "clearBetweenFrames": true, - "antialiasing": "none" + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } }, { "assetStoreId": "", - "name": "ShotsPerReload_Slider", + "name": "OverheatDuration_Slider", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -10548,7 +10637,239 @@ "name": "DraggableSliderControl", "type": "DraggableSliderControl::DraggableSliderControl", "ValueMin": 0, - "ValueMax": 10, + "ValueMax": 5, + "TickSpacing": 0.1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "LinearCoolingPerSecond_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 1, + "TickSpacing": 0.01, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "ExponentialCoolingPerSecond_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 1, + "TickSpacing": 0.01, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "HeatPerShot_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 0.5, + "TickSpacing": 0.01, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "FireArc_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 360, "TickSpacing": 1, "ThumbShape": "circle", "ThumbWidth": 20, @@ -10581,367 +10902,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "ReloadDuration_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 3, - "TickSpacing": 0.1, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "OverheatDuration_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 5, - "TickSpacing": 0.1, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "LinearCoolingPerSecond_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 1, - "TickSpacing": 0.01, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "ExponentialCoolingPerSecond_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 1, - "TickSpacing": 0.01, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, "absoluteCoordinates": false, "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "HeatPerShot_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 0.5, - "TickSpacing": 0.01, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "FireArc_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 360, - "TickSpacing": 1, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, + "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": "", @@ -10987,19 +10960,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 + } }, { "assetStoreId": "", @@ -11045,19 +11018,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 + } }, { "assetStoreId": "", @@ -11103,19 +11076,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 + } }, { "assetStoreId": "", @@ -11161,19 +11134,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 + } }, { "assetStoreId": "", @@ -11219,19 +11192,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": 28, + "r": 248, "g": 231, - "r": 248 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 28 + } }, { "assetStoreId": "", @@ -11277,19 +11250,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": 28, + "r": 248, "g": 231, - "r": 248 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 28 + } }, { "assetStoreId": "", @@ -11335,19 +11308,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 + } }, { "assetStoreId": "", @@ -11359,19 +11332,19 @@ "fillOpacity": 255, "outlineSize": 4, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 224, + "r": 189, "g": 16, - "r": 189 + "b": 224 }, "outlineColor": { - "b": 224, + "r": 189, "g": 16, - "r": 189 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 224 + } }, { "assetStoreId": "", @@ -11406,19 +11379,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 + } }, { "assetStoreId": "", @@ -11453,19 +11426,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 + } }, { "assetStoreId": "", @@ -11500,19 +11473,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, @@ -11610,6 +11583,7 @@ "assetStoreId": "5c37cb58ddc519829264b5ff95dd80416c82e89b60bfa67c6c3852154ec2b632", "name": "Reloading_Bar", "type": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "variant": "Green bar", "variables": [], "effects": [], "behaviors": [], @@ -11685,7 +11659,9 @@ "text": "8 / 16", "font": "", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 16, + "lineHeight": 0, "color": "255;255;255" } } @@ -15944,6 +15920,7 @@ "ambientLightColorB": 0, "ambientLightColorG": 6059824, "ambientLightColorR": 9369496, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -15961,6 +15938,7 @@ "ambientLightColorB": 32, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -15989,6 +15967,7 @@ "ambientLightColorB": 9768528, "ambientLightColorG": 6034944, "ambientLightColorR": 7581144, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -16074,12 +16053,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Resource bar (continuous)", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/resource-bar", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjgsMTJIMTRINGMtMi4yLDAtNCwxLjgtNCw0czEuOCw0LDQsNGgxMGgxNGMyLjIsMCw0LTEuOCw0LTRTMzAuMiwxMiwyOCwxMnogTTQsMThjLTEuMSwwLTItMC45LTItMnMwLjktMiwyLTJoMTANCgljMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJINHoiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteContinuousBar", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Interface Elements/ea06363a57846caab544f536b78a952234b68d4941d41c1577852a1d61aefec3_Interface Elements_interface_ui_loading_progress_bar.svg", "shortDescription": "A bar that represents a resource in the game (health, mana, ammo, etc).", - "version": "1.1.1", + "version": "2.0.0", "description": [ "A bar that represents a resource in the game (health, mana, ammo, etc).", "", @@ -16104,7 +16084,15 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1", "q8ubdigLvIRXLxsJDDTaokO41mc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Resource bars now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing resource bars 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": [ { @@ -16144,7 +16132,7 @@ "Object", "\"__ResourceBar.LastValueChange\"", "<=", - "Object.Behavior::PropertyPreviousHighValueDuration()" + "PreviousHighValueDuration" ] } ], @@ -16193,7 +16181,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyValue()" + "CurrentValue" ] } ] @@ -16230,13 +16218,12 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), 0, Object.Behavior::MaxValue())" + "clamp(Value, 0, Object.Behavior::MaxValue())" ] } ] @@ -16246,11 +16233,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Value", "<", "Object.Behavior::PreviousHighValue()" ] @@ -16273,13 +16259,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Value", ">=", - "Object.Behavior::PropertyPreviousHighValue()" + "PreviousHighValue" ] } ], @@ -16329,7 +16314,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxValue()" + "MaxValue" ] } ] @@ -16366,13 +16351,12 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16405,11 +16389,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", "0" ] @@ -16454,13 +16437,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "Object.Behavior::PropertyMaxValue()" + "MaxValue" ] } ], @@ -16507,7 +16489,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPreviousHighValue()" + "PreviousHighValue" ] } ] @@ -16544,13 +16526,12 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyPreviousHighValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValue", "=", - "Object.Behavior::PropertyValue()" + "CurrentValue" ] } ] @@ -16588,7 +16569,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPreviousHighValueDuration()" + "PreviousHighValueDuration" ] } ] @@ -16625,13 +16606,12 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyPreviousHighValueDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValueDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16664,14 +16644,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PreviousHighValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValue", "!=", - "Object.Behavior::PropertyValue()", - "" + "CurrentValue" ] }, { @@ -16682,7 +16660,7 @@ "Object", "\"__ResourceBar.LastValueChange\"", "<=", - "Object.Behavior::PropertyPreviousHighValueDuration()" + "PreviousHighValueDuration" ] } ], @@ -16719,27 +16697,18 @@ "value": "1", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "name": "Value" + "name": "CurrentValue" }, { "value": "3", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxValue" }, { "value": "", "type": "Number", "label": "Previous high value", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousHighValue" }, @@ -16747,9 +16716,7 @@ "value": "1", "type": "Number", "label": "Previous high value conservation duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], + "hidden": true, "name": "PreviousHighValueDuration" } ], @@ -16758,10 +16725,287 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "ResourceBar", "description": "A bar that represents a resource in the game (health, mana, ammo, etc).", "fullName": "Resource bar (continuous)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteContinuousBar", + "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, + "leftEdgeAnchor": 4, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "2 / 3", + "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": "2 / 3", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "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": "ResourceBar", + "type": "PanelSpriteContinuousBar::ResourceBar", + "Value": 1, + "MaxValue": 3, + "PreviousValue": 0, + "CurrentValue": 1 + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Buffer", + "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": "Background", + "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": "FillBar" + }, + { + "objectName": "Buffer" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "fa2b0c42-1baa-489d-9c47-87ec233cbe8c", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "Buffer", + "persistentUuid": "6e01eec9-ca43-4a5c-b4e1-4d9d384473e2", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "4833affb-a8d1-4a2b-9019-a20cf5fdc68e", + "width": 196, + "x": 10, + "y": 10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "0e63f21c-2071-4765-8254-e9021fa84ec4", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 4, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -16779,7 +17023,7 @@ "textG": 0, "textR": 0 }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -16787,12 +17031,100 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "FillBar", + "Anchor", + "" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Buffer", + "Anchor", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Buffer", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - (max(FillBar.BoundingBoxRight(), Buffer.BoundingBoxRight()) - min(FillBar.BoundingBoxLeft(), Buffer.BoundingBoxLeft()))" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - (max(FillBar.BoundingBoxBottom(), Buffer.BoundingBoxBottom()) - min(FillBar.BoundingBoxTop(), Buffer.BoundingBoxTop()))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Buffer", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - (FillBar.BoundingBoxRight() - FillBar.BoundingBoxLeft())" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - (FillBar.BoundingBoxBottom() - FillBar.BoundingBoxTop())" + ] + } ] } ] @@ -16807,7 +17139,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances." + "comment": "This allows to detect a change of \"intial value\" on hot reload." }, { "type": "BuiltinCommonInstructions::Standard", @@ -16815,60 +17147,38 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Background", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "FillBar", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Background", + "PreviousInitialValue", "=", - "1" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "FillBar", - "=", - "3" + "InitialValue" ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create the child-object instances." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyPreviousHighValueDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - ">", + "PreviousHighValueDuration", + "=", "0" ] } @@ -16876,25 +17186,12 @@ "actions": [ { "type": { - "value": "Create" + "value": "Delete" }, "parameters": [ - "", "Buffer", - "0", - "0", "" ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Buffer", - "=", - "2" - ] } ] }, @@ -16910,62 +17207,18 @@ }, "comment": "Create the label over the bar." }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Label", - "=", - "4" - ] - }, - { - "type": { - "value": "TextObject::SetTextAlignment" - }, - "parameters": [ - "Label", - "\"center\"" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyShowLabel" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabel", + "True", + "" ] } ], @@ -17003,50 +17256,62 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetValue" + "value": "PanelSpriteContinuousBar::ResourceBar::SetValue" }, "parameters": [ - "Object", + "FillBar", + "ResourceBar", "=", - "Object.PropertyInitialValue()", - "Object.PropertyInitialValue()" + "InitialValue", + "" ] }, { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPreviousValueDuration" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ - "Object", + "FillBar", + "Resizable", "=", - "Object.PropertyPreviousHighValueDuration()", - "" + "Object.WidthForValue()" ] }, { "type": { - "value": "Tween::RemoveTween" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ - "FillBar", - "Tween", - "\"ChangeValue\"" + "Buffer", + "Resizable", + "=", + "FillBar.Width()" ] }, { "type": { - "value": "PanelSpriteObject::Width" + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPreviousValueDuration" }, "parameters": [ - "FillBar", + "Object", "=", - "Object.WidthForValue()" + "PreviousHighValueDuration", + "" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLabel" + }, + "parameters": [ + "Object", + "" ] } ] @@ -17088,7 +17353,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] } @@ -17099,24 +17364,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -17126,7 +17391,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] }, @@ -17137,7 +17402,7 @@ "parameters": [ "Object", "=", - "Object.PropertyPreviousHighValueDuration()", + "PreviousHighValueDuration", "" ] }, @@ -17159,10 +17424,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] @@ -17187,124 +17453,101 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "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": "NumberVariable" }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the bar size is refreshed according to the value\n- the label is put back at the center of the bar\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": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Background.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Background.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - } + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.WidthForValue()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "Buffer", + "Resizable", + "=", + "FillBar.Width()" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "FillBar", + "Tween", + "\"ChangeValue\"" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Buffer", + "Tween", + "\"ChangeValue\"" ] } - ], - "parameters": [] + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "Buffer", + "Resizable", + "=", + "FillBar.Height()" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", @@ -17329,7 +17572,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectWidthTween" + "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ "Buffer", @@ -17337,7 +17580,7 @@ "\"ChangeValue\"", "Object.WidthForValue()", "\"linear\"", - "Object.PropertyEasingDuration() * 1000", + "EasingDuration", "" ] } @@ -17348,10 +17591,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::Width" }, "parameters": [ "FillBar", + "Resizable", "<", "Buffer.Width()" ] @@ -17374,10 +17618,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::Width" }, "parameters": [ "FillBar", + "Resizable", ">=", "Buffer.Width()" ] @@ -17419,121 +17664,25 @@ "actions": [ { "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] }, { "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Buffer", - "=", - "FillBar.X()", - "=", - "FillBar.Y()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "Buffer", + "Resizable", "=", "FillBar.Width()" ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Buffer", - "=", - "FillBar.Height()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Object.FullBarWidth()" - ] - }, - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "FillBar.CenterY()" - ] - }, - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()) / 2" - ] } ] } @@ -17603,7 +17752,7 @@ "FillBar", "ResourceBar", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -17614,10 +17763,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "EasingDuration", ">", "0" ] @@ -17626,7 +17775,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectWidthTween" + "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ "FillBar", @@ -17634,7 +17783,7 @@ "\"ChangeValue\"", "Object.WidthForValue()", "\"linear\"", - "Object.PropertyEasingDuration() * 1000", + "EasingDuration", "" ] } @@ -17645,10 +17794,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "EasingDuration", "<=", "0" ] @@ -17657,10 +17806,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] @@ -17699,10 +17849,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "Buffer", + "Resizable", "=", "round(Object.FullBarWidth() * FillBar.ResourceBar::PreviousHighValue() / FillBar.ResourceBar::MaxValue())" ] @@ -17743,7 +17894,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "FillBar.ResourceBar::PropertyMaxValue()" + "FillBar.ResourceBar::MaxValue()" ] } ] @@ -17781,7 +17932,7 @@ "FillBar", "ResourceBar", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -17927,7 +18078,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "FillBar.ResourceBar::PropertyPreviousHighValueDuration()" + "FillBar.ResourceBar::PreviousHighValueDuration()" ] } ] @@ -17965,7 +18116,7 @@ "FillBar", "ResourceBar", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -18135,7 +18286,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -18167,10 +18318,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyShowLabel" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabel", + "True", + "" ] } ], @@ -18210,21 +18363,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyShowLabel" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "ShowLabel", + "False", + "" ] }, { @@ -18242,21 +18398,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyShowLabel" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShowLabel", + "True", + "" ] }, { @@ -18300,10 +18459,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(round(Object.Value())) + \" / \" + ToString(Object.MaxValue())" ] @@ -18323,74 +18483,16 @@ } ], "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarLeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarTopPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarRightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarBottomPadding" - }, { "value": "3", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxValue" }, { "value": "3", "type": "Number", "label": "Initial value", - "description": "", - "group": "", - "extraInformation": [], "name": "InitialValue" }, { @@ -18398,202 +18500,320 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, { "value": "1", "type": "Number", + "unit": "Second", "label": "Previous high value conservation duration (in seconds)", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PreviousHighValueDuration" }, { "value": "0.25", "type": "Number", + "unit": "Second", "label": "Easing duration", - "description": "", "group": "Animation", - "extraInformation": [], "name": "EasingDuration" }, { "value": "true", "type": "Boolean", "label": "Show the label", - "description": "", - "group": "", "extraInformation": [ "Label" ], + "choices": [], "name": "ShowLabel" }, { - "value": "", - "type": "Boolean", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "Buffer" - ], "hidden": true, - "name": "ShowBuffer" + "name": "BarLeftPlusRightMargin" }, { - "value": "Center", - "type": "String", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "Label" - ], "hidden": true, - "name": "LabelVerticalAnchorOrigin" + "name": "BarTopPlusBottomMargin" }, { - "value": "Center", - "type": "String", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "FillBar" - ], "hidden": true, - "name": "LabelVerticalAnchorTarget" + "name": "OldParentWidth" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "2 / 3", - "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": "2 / 3", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ResourceBar", - "type": "PanelSpriteContinuousBar::ResourceBar", - "Value": 1, - "MaxValue": 3, - "PreviousValue": 0 + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 1, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Green bar", + "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, + "leftEdgeAnchor": 4, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "8 / 16", + "font": "", + "textAlignment": "center", + "characterSize": 16, + "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": "8 / 16", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 24, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "Flat Bar Green Fill Bar.png", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 24, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ResourceBar", + "type": "PanelSpriteContinuousBar::ResourceBar", + "Value": 1, + "MaxValue": 3, + "PreviousValue": 0, + "CurrentValue": 1 + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 24, + "leftMargin": 0, + "name": "Buffer", + "rightMargin": 0, + "texture": "Flat Bar Green Fill Bar.png", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 24, + "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" + } + ] }, { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Buffer", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Tween", - "type": "Tween::TweenBehavior" + "assetStoreId": "", + "bottomMargin": 6, + "height": 34, + "leftMargin": 4, + "name": "Background", + "rightMargin": 4, + "texture": "Flat Bar White Border.png", + "tiled": true, + "topMargin": 6, + "type": "PanelSpriteObject::PanelSprite", + "width": 224, + "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": "Background", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "FillBar" - }, - { - "objectName": "Buffer" + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Buffer" + }, + { + "objectName": "Background" + } + ] }, - { - "objectName": "Background" + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "fa2b0c42-1baa-489d-9c47-87ec233cbe8c", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "4833affb-a8d1-4a2b-9019-a20cf5fdc68e", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "" } - ] - } + } + ] } ] }, @@ -18602,6 +18822,7 @@ "category": "", "extensionNamespace": "", "fullName": "Checkbox", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNoZWNrYm94LW1hcmtlZCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMCwxN0w1LDEyTDYuNDEsMTAuNThMMTAsMTQuMTdMMTcuNTksNi41OEwxOSw4TTE5LDNINUMzLjg5LDMgMywzLjg5IDMsNVYxOUEyLDIgMCAwLDAgNSwyMUgxOUEyLDIgMCAwLDAgMjEsMTlWNUMyMSwzLjg5IDIwLjEsMyAxOSwzWiIgLz48L3N2Zz4=", "name": "Checkbox", @@ -18637,6 +18858,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -21578,54 +21801,41 @@ "value": "0", "type": "Boolean", "label": "Checked", - "description": "", "group": "Checkbox state", - "extraInformation": [], "name": "Checked" }, { "value": "", "type": "Number", "label": "Halo size (hover). If blank, this is set to \"SideLength\".", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "HaloRadiusHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "HaloOpacityHover" }, { "value": "128", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", "group": "Checkbox state", - "extraInformation": [], "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingPressed" }, @@ -21633,9 +21843,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -21643,9 +21850,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -21653,9 +21857,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -21663,9 +21864,6 @@ "value": "0.3", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -21673,9 +21871,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" }, @@ -21683,9 +21878,6 @@ "value": "", "type": "Boolean", "label": "State of the checkbox has changed. (Used in \"ToggleChecked\" function)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ToggleChanged" }, @@ -21693,54 +21885,42 @@ "value": " 24;119;211", "type": "Color", "label": "Primary color of checkbox. (Example: 24;119;211) Fill color when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "PrimaryColor" }, { "value": "255;255;255", "type": "Color", "label": "Secondary color of checkbox. (Example: 255;255;255) Color of checkmark when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "SecondaryColor" }, { "value": "24", "type": "Number", "label": "Length of each side (px) Minimum: 10", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "SideLength" }, { "value": "5", "type": "Number", "label": "Line width of checkmark (px) (Min: 1, Max: 1/4 * SideLength)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "LineWidth" }, { "value": "2", "type": "Number", "label": "Border thickness (px) This border is only visible when the checkbox is unchecked. ", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "BorderThickness" }, { "value": "", "type": "Number", "label": "Halo size (pressed). If blank, this is set to \"HaloRadiusHover * 1.1\"", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "HaloRadiusPressed" } ], @@ -21754,6 +21934,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Draggable slider", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "DraggableSliderControl", @@ -21796,6 +21977,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -25413,38 +25596,34 @@ "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], "name": "ValueMin" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "ValueMax" }, { "value": "0", "type": "Number", "label": "Tick spacing", - "description": "", - "group": "", - "extraInformation": [], "name": "TickSpacing" }, { "value": "circle", "type": "Choice", "label": "Thumb shape", - "description": "", "group": "Thumb", - "extraInformation": [ - "circle", - "rectangle" + "choices": [ + { + "label": "circle", + "value": "circle" + }, + { + "label": "rectangle", + "value": "rectangle" + } ], "name": "ThumbShape" }, @@ -25452,144 +25631,110 @@ "value": "20", "type": "Number", "label": "Thumb width", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "ThumbWidth" }, { "value": "20", "type": "Number", "label": "Thumb height", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "ThumbHeight" }, { "value": " 24;119;211", "type": "Color", "label": "Thumb Color", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "ThumbColor" }, { "value": "255", "type": "Number", "label": "Thumb opacity", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "ThumbOpacity" }, { "value": "200", "type": "Number", "label": "Track length", - "description": "", "group": "Track", - "extraInformation": [], "name": "TrackLength" }, { "value": "4", "type": "Number", "label": "Track thickness", - "description": "", "group": "Track", - "extraInformation": [], "name": "TrackThickness" }, { "value": "", "type": "String", "label": "Inactive track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], "name": "InactiveTrackColor" }, { "value": "96", "type": "Number", "label": "Inactive track opacity", - "description": "", "group": "Track", - "extraInformation": [], "name": "InactiveTrackOpacity" }, { "value": " ", "type": "String", "label": "Active track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], "name": "ActiveTrackColor" }, { "value": "255", "type": "Number", "label": "Active track opacity", - "description": "", "group": "Track", - "extraInformation": [], "name": "ActiveTrackOpacity" }, { "value": "24", "type": "Number", "label": "Halo size (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "HaloRadius" }, { "value": "32", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "HaloOpacityHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Rounded track ends", - "description": "", "group": "Track", - "extraInformation": [], "name": "RoundedTrack" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", - "group": "", - "extraInformation": [], "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingDragged" }, @@ -25597,9 +25742,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Value" }, @@ -25607,9 +25749,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbOffset" }, @@ -25617,9 +25756,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -25627,9 +25763,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -25637,9 +25770,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseX" }, @@ -25647,9 +25777,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseY" }, @@ -25657,9 +25784,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -25667,9 +25791,6 @@ "value": "0.2", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -25677,9 +25798,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" } @@ -25694,21 +25812,25 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Fire bullets", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", - "version": "0.7.0", + "version": "0.9.1", "description": [ - "This extension allows objects to fire bullets.", + "This extension allows objects to fire bullets. To use it, add the behavior to the object that will shoot, then use the provided action to launch another object as the bullet.", "", - "It handles:", + "The properties of the behavior can be used to customize:", "- Cooldown between shots", "- Firing multiple bullets at a time ([open the project online](https://editor.gdevelop.io/?project=example://fire-bullet))", "- Ammo management", "- Overheat", "", + "The speed can be specified when using the actions to fire the bullets.", + "The bullets are automatically given a permanent force to make them move (no need to use a linear movement or move them with another behavior).", + "", "It can be used for:", "- Twin-stick shooters ([open the project online](https://editor.gdevelop.io/?project=example://conviction-of-gun-dude-desktop))", "- Shoot'em up ([open the project online](https://editor.gdevelop.io/?project=example://space-shooter))", @@ -25737,10 +25859,12 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "Fire bullets, manage ammo, reloading, and overheating.", + "description": "Fire bullets, manage ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior action in your events to fire another object as a bullet. This action will also make the bullet move (using a permanent force) at the speed specified in the action.", "fullName": "Fire bullets", "name": "FireBullet", "objectType": "", @@ -25766,24 +25890,22 @@ }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "Object.Behavior::PropertyStartingAmmo()" + "StartingAmmo" ] }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -25836,114 +25958,93 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "HasJustFired", + "True", + "" ] } ], - "actions": [], - "events": [ + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Reset firing cooldown", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Object", - "\"__FireBullet.FiringCooldown\"" - ] - } - ] - } - ], - "parameters": [] + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "False", + "" + ] }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.FiringCooldown\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TotalShotsFired", + "+", + "1" + ] + } + ], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Update ammo", + "name": "Ammo", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Subtract 1 from ammo (if not unlimited ammo)" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, - "value": "FireBullet::FireBullet::PropertyUnlimitedAmmo" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "UnlimitedAmmo", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "max(0,Object.Behavior::AmmoQuantity() - 1)" + "max(0, AmmoQuantity - 1)" ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update reloading counter", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsPerReload" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsPerReload", ">", "0" ] @@ -25952,39 +26053,27 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "-", "1" ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Automatically reload gun when needed", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "AutomaticReloading", + "True", + "" ] }, { @@ -26030,32 +26119,19 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Update Overheat", + "name": "Overheat", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Increase heat (if needed)" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHeatIncreasePerShot" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatIncreasePerShot", ">", "0" ] @@ -26064,39 +26140,25 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "+", - "Object.Behavior::PropertyHeatIncreasePerShot()" + "HeatIncreasePerShot" ] } ], "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if this caused overheat" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyOverheatDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OverheatDuration", ">", "0" ] @@ -26128,63 +26190,6 @@ } ], "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update statistics", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalShotsFired" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Reset firing detection", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::SetPropertyHasJustFired" - }, - "parameters": [ - "Object", - "Behavior", - "=" - ] - } - ] - } - ], - "parameters": [] } ] } @@ -26196,7 +26201,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Reload gun when needed", + "name": "Reload", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -26233,30 +26238,29 @@ "Object", "\"__FireBullet.ReloadingTimer\"", ">=", - "Object.Behavior::PropertyReloadDuration()" + "ReloadDuration" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalReloadsCompleted" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TotalReloadsCompleted", "+", "1" ] }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadInProgress" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "ReloadInProgress", + "False", + "" ] } ], @@ -26278,13 +26282,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -26319,13 +26322,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "min(Object.Behavior::PropertyShotsPerReload(), Object.Behavior::PropertyAmmoQuantity())" + "min(ShotsPerReload, AmmoQuantity)" ] } ] @@ -26340,7 +26342,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Reduce heat level (based on cooling rate)", + "name": "Cooling", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -26352,7 +26354,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object.Behavior::HeatLevel()", + "HeatLevel", ">", "0" ] @@ -26365,11 +26367,10 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyExponentialCoolingRate" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ExponentialCoolingRate", ">", "0" ] @@ -26378,13 +26379,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "=", - "max(0, Object.Behavior::PropertyHeatLevel() - TimeDelta() * Object.Behavior::PropertyExponentialCoolingRate() * Object.Behavior::PropertyHeatLevel())" + "max(0, HeatLevel - TimeDelta() * ExponentialCoolingRate * HeatLevel)" ] } ] @@ -26394,11 +26394,10 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyLinearCoolingRate" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LinearCoolingRate", ">", "0" ] @@ -26407,13 +26406,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "=", - "max(0, Object.Behavior::PropertyHeatLevel() - TimeDelta() * Object.Behavior::PropertyLinearCoolingRate())" + "max(0, HeatLevel - TimeDelta() * LinearCoolingRate)" ] } ] @@ -26440,44 +26438,32 @@ "objectGroups": [] }, { - "description": "Fire bullets toward an object.", + "description": "Fire bullets toward an object at a specified speed.", "fullName": "Fire bullets toward an object", "functionType": "Action", "name": "FireTowardObject", "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward _PARAM5_ with speed _PARAM6_ px/s", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Calculate the trajectory angle and use the \"Fire bullets\" action", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::Fire" - }, - "parameters": [ - "Object", - "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "Object.AngleToObject(TargetObject)", - "GetArgumentAsNumber(\"Speed\")", - "" - ] - } + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "Object.AngleToObject(TargetObject)", + "Speed", + "" ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -26521,44 +26507,32 @@ "objectGroups": [] }, { - "description": "Fire bullets toward a position.", + "description": "Fire bullets toward a position at a specified speed.", "fullName": "Fire bullets toward a position", "functionType": "Action", "name": "FireTowardPosition", "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward position _PARAM5_;_PARAM6_ with speed _PARAM7_ px/s", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Calculate the trajectory angle and use the \"Fire bullets\" action", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::Fire" - }, - "parameters": [ - "Object", - "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "Object.AngleToPosition(GetArgumentAsNumber(\"TargetXPosition\"), GetArgumentAsNumber(\"TargetYPosition\"))", - "GetArgumentAsNumber(\"Speed\")", - "" - ] - } + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "Object.AngleToPosition(TargetXPosition, TargetYPosition)", + "Speed", + "" ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -26607,249 +26581,195 @@ "objectGroups": [] }, { - "description": "Fire bullets in the direction of a given angle.", + "description": "Fire bullets in the direction of a given angle at a specified speed.", "fullName": "Fire bullets toward an angle", "functionType": "Action", "name": "Fire", "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward angle _PARAM5_ and speed _PARAM6_ px/s", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check if ready to shoot", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::IsReadyToShoot" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object", - "Behavior", - "" + "BulletQuantity", + "=", + "1" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHasJustFired" + "value": "FireBullet::FireBullet::FireSingleBullet" }, "parameters": [ "Object", "Behavior", - "yes" + "XPosition", + "YPosition", + "Bullet", + "Angle", + "Speed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "BulletQuantity", + ">", + "1" ] } ], + "actions": [], "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Single bullet", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PropertyBulletQuantity()", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::FireSingleBullet" - }, - "parameters": [ - "Object", - "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "GetArgumentAsNumber(\"Angle\")", - "GetArgumentAsNumber(\"Speed\")", - "" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Multiple bullets", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PropertyBulletQuantity()", - ">", - "1" - ] - } - ], - "actions": [ + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "BulletQuantity", + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.BatchOrderID", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::FiringArc" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "360", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "MultiShotAngle", + "=", + "Angle + lerp(-FiringArc / 2, FiringArc / 2, BulletIndex / (BulletQuantity - 1)) " + ] + } ] }, { - "type": { - "value": "ModVarObjet" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "__FireBullet.CurrentBulletAngle", - "=", - "GetArgumentAsNumber(\"Angle\") - Object.Behavior::PropertyFiringArc()/2" - ] - } - ], - "events": [ + "comment": "When firing in a full circle, prevent first and last bullet from using the same angle" + }, { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Object.Behavior::PropertyBulletQuantity()", - "conditions": [], - "actions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "FireBullet::FireBullet::FireSingleBullet" + "value": "FireBullet::FireBullet::FiringArc" }, "parameters": [ "Object", "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "Object.Variable(__FireBullet.CurrentBulletAngle) + RandomInRange(-Object.Behavior::PropertyAngleVariance(),Object.Behavior::PropertyAngleVariance())", - "GetArgumentAsNumber(\"Speed\")", + "=", + "360", "" ] } ], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetNumberVariable" }, - "comment": "When firing in a full circle, prevent first and last bullet from using the same angle" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "FireBullet::FireBullet::FiringArc" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "360", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.CurrentBulletAngle", - "+", - "Object.Behavior::PropertyFiringArc() / (Object.Behavior::PropertyBulletQuantity())" - ] - } + "parameters": [ + "MultiShotAngle", + "=", + "Angle + lerp(-FiringArc / 2, FiringArc / 2, BulletIndex / BulletQuantity) " ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "FireBullet::FireBullet::FiringArc" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "360", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.CurrentBulletAngle", - "+", - "Object.Behavior::PropertyFiringArc() / (Object.Behavior::PropertyBulletQuantity() - 1)" - ] - } + "type": { + "value": "FireBullet::FireBullet::FireSingleBullet" + }, + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "MultiShotAngle", + "Speed", + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.BatchOrderID", - "+", - "1" - ] - } + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BulletIndex", + "+", + "1" ] } ] @@ -26857,12 +26777,23 @@ ] } ], - "parameters": [] + "variables": [ + { + "folded": true, + "name": "MultiShotAngle", + "type": "number", + "value": 0 + }, + { + "name": "BulletIndex", + "type": "number", + "value": 0 + } + ] } ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -26946,9 +26877,9 @@ "parameters": [ "", "Bullet", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Object.Behavior::PropertyBulletLayer()" + "XPosition", + "YPosition", + "BulletLayer" ] } ], @@ -26971,13 +26902,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRandomizedAngle" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RandomizedAngle", "=", - "GetArgumentAsNumber(\"Angle\") + RandomInRange(-Object.Behavior::PropertyAngleVariance(), Object.Behavior::PropertyAngleVariance())" + "Angle + RandomInRange(-AngleVariance, AngleVariance)" ] }, { @@ -26986,64 +26916,13 @@ }, "parameters": [ "Bullet", - "Object.Behavior::PropertyRandomizedAngle()", - "GetArgumentAsNumber(\"Speed\") + RandomInRange(-Object.Behavior::PropertyBulletSpeedVariance(), Object.Behavior::PropertyBulletSpeedVariance())", + "RandomizedAngle", + "Speed + RandomInRange(-BulletSpeedVariance, BulletSpeedVariance)", "1" ] } ] }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Add identifier variables (to enable advanced picking by users)" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Bullet", - "__FireBullet.BulletID", - "=", - "Object.Behavior::PropertyTotalBulletsCreated()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Bullet", - "__FireBullet.BatchID", - "=", - "Object.Behavior::PropertyTotalShotsFired()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Bullet", - "__FireBullet.BatchOrderID", - "=", - "0" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -27061,11 +26940,12 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyRotateBullet" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "RotateBullet", + "True", + "" ] } ], @@ -27077,7 +26957,7 @@ "parameters": [ "Bullet", "=", - "Object.Behavior::PropertyRandomizedAngle()" + "RandomizedAngle" ] } ] @@ -27102,11 +26982,10 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalBulletsCreated" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TotalBulletsCreated", "+", "1" ] @@ -27182,12 +27061,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadInProgress" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "ReloadInProgress", + "True", + "" ] }, { @@ -27225,30 +27104,17 @@ "name": "HasJustFired", "sentence": "_PARAM0_ has just fired", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "HasJustFired", + "True", + "" ] } ], @@ -27292,11 +27158,12 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyRotateBullet" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "RotateBullet", + "True", + "" ] } ], @@ -27344,7 +27211,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFiringArc()" + "FiringArc" ] } ] @@ -27381,13 +27248,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyFiringArc" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FiringArc", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -27434,7 +27300,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -27478,7 +27344,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAngleVariance()" + "AngleVariance" ] } ] @@ -27515,13 +27381,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAngleVariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AngleVariance", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -27568,7 +27433,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -27612,7 +27477,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyBulletSpeedVariance()" + "BulletSpeedVariance" ] } ] @@ -27649,13 +27514,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletSpeedVariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletSpeedVariance", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -27702,7 +27566,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -27746,7 +27610,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyBulletQuantity()" + "BulletQuantity" ] } ] @@ -27783,13 +27647,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletQuantity", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -27836,7 +27699,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -27877,13 +27740,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletLayer" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletLayer", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -27923,22 +27785,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"RotateBullet\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRotateBullet" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "RotateBullet", + "False", + "" ] } ] @@ -27948,22 +27812,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"RotateBullet\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRotateBullet" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "RotateBullet", + "True", + "" ] } ] @@ -27984,7 +27850,7 @@ { "defaultValue": "yes", "description": "Rotate bullet to match trajetory", - "name": "RotateBullet", + "name": "Value", "optional": true, "type": "yesorno" } @@ -28005,22 +27871,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"UnlimitedAmmo\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyUnlimitedAmmo" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "UnlimitedAmmo", + "False", + "" ] } ] @@ -28030,22 +27898,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"UnlimitedAmmo\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyUnlimitedAmmo" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "UnlimitedAmmo", + "True", + "" ] } ] @@ -28066,7 +27936,7 @@ { "defaultValue": "yes", "description": "Unlimited ammo", - "name": "UnlimitedAmmo", + "name": "Value", "optional": true, "type": "yesorno" } @@ -28090,7 +27960,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFireCooldown()" + "FireCooldown" ] } ] @@ -28127,13 +27997,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyFireCooldown" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FireCooldown", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -28180,7 +28049,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"NewCooldown\")", + "Value", "" ] } @@ -28201,7 +28070,7 @@ }, { "description": "Cooldown in seconds", - "name": "NewCooldown", + "name": "Value", "type": "expression" } ], @@ -28224,7 +28093,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyReloadDuration()" + "ReloadDuration" ] } ] @@ -28261,13 +28130,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ReloadDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -28314,7 +28182,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -28358,7 +28226,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyOverheatDuration()" + "OverheatDuration" ] } ] @@ -28395,13 +28263,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyOverheatDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OverheatDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -28448,7 +28315,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -28492,7 +28359,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAmmoQuantity()" + "AmmoQuantity" ] } ] @@ -28529,13 +28396,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "max(0,Value)" + "max(0, Value)" ] } ] @@ -28582,7 +28448,7 @@ "Object", "Behavior", "=", - "max(0,Value)", + "max(0, Value)", "" ] } @@ -28626,7 +28492,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyHeatIncreasePerShot()" + "HeatIncreasePerShot" ] } ] @@ -28663,13 +28529,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatIncreasePerShot" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatIncreasePerShot", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -28716,7 +28581,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -28760,7 +28625,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxAmmo()" + "MaxAmmo" ] } ] @@ -28797,13 +28662,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyMaxAmmo" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxAmmo", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -28813,11 +28677,10 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyMaxAmmo" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxAmmo", ">", "0" ] @@ -28826,13 +28689,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "min(Object.Behavior::MaxAmmo(),Object.Behavior::AmmoQuantity())" + "min(MaxAmmo, AmmoQuantity)" ] } ] @@ -28879,7 +28741,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -28920,11 +28782,10 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalShotsFired" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TotalShotsFired", "=", "0" ] @@ -28961,11 +28822,10 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalBulletsCreated" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TotalBulletsCreated", "=", "0" ] @@ -29002,11 +28862,10 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalReloadsCompleted" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TotalReloadsCompleted", "=", "0" ] @@ -29046,7 +28905,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -29083,13 +28942,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsPerReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsPerReload", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -29099,26 +28957,24 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsBeforeNextReload" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", ">", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -29165,7 +29021,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -29206,12 +29062,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAutomaticReloading" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=" + "AutomaticReloading", + "False", + "" ] } ] @@ -29221,22 +29077,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAutomaticReloading" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "AutomaticReloading", + "True", + "" ] } ] @@ -29281,7 +29139,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyLinearCoolingRate()" + "LinearCoolingRate" ] } ] @@ -29318,13 +29176,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyLinearCoolingRate" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LinearCoolingRate", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -29371,7 +29228,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -29415,7 +29272,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyExponentialCoolingRate()" + "ExponentialCoolingRate" ] } ] @@ -29452,13 +29309,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyExponentialCoolingRate" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ExponentialCoolingRate", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -29506,7 +29362,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -29547,13 +29403,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "+", - "GetArgumentAsNumber(\"AmmoGained\")" + "AmmoGained" ] } ] @@ -29575,11 +29430,10 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyMaxAmmo" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxAmmo", ">", "0" ] @@ -29588,13 +29442,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "min(Object.Behavior::MaxAmmo(),Object.Behavior::AmmoQuantity())" + "min(MaxAmmo, AmmoQuantity)" ] } ] @@ -29614,11 +29467,12 @@ }, { "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "AutomaticReloading", + "True", + "" ] } ], @@ -29673,7 +29527,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyBulletLayer()" + "BulletLayer" ] } ] @@ -29714,7 +29568,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "min(1,Object.Behavior::PropertyHeatLevel())" + "min(1, HeatLevel)" ] } ] @@ -29755,7 +29609,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalShotsFired()" + "TotalShotsFired" ] } ] @@ -29796,7 +29650,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalBulletsCreated()" + "TotalBulletsCreated" ] } ] @@ -29837,7 +29691,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalReloadsCompleted()" + "TotalReloadsCompleted" ] } ] @@ -29878,7 +29732,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyShotsBeforeNextReload()" + "ShotsBeforeNextReload" ] } ] @@ -29919,7 +29773,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "max(0,Object.Behavior::Cooldown() - Object.ObjectTimerElapsedTime(\"__FireBullet.FiringCooldown\"))" + "max(0, FireCooldown - Object.ObjectTimerElapsedTime(\"__FireBullet.FiringCooldown\"))" ] } ] @@ -29972,7 +29826,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "max(0, Object.Behavior::PropertyOverheatDuration() - Object.ObjectTimerElapsedTime(\"__FireBullet.OverheatDuration\"))" + "max(0, OverheatDuration - Object.ObjectTimerElapsedTime(\"__FireBullet.OverheatDuration\"))" ] } ] @@ -30025,7 +29879,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "max(0, Object.Behavior::PropertyReloadDuration() - Object.ObjectTimerElapsedTime(\"__FireBullet.ReloadingTimer\"))" + "max(0, ReloadDuration - Object.ObjectTimerElapsedTime(\"__FireBullet.ReloadingTimer\"))" ] } ] @@ -30076,352 +29930,355 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyReloadInProgress" + "value": "BooleanVariable" + }, + "parameters": [ + "ReloadInProgress", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if object is ready to shoot.", + "fullName": "Is ready to shoot", + "functionType": "Condition", + "group": "Firing", + "name": "IsReadyToShoot", + "sentence": "_PARAM0_ is ready to shoot", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsOutOfAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsReloadNeeded" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsReloadInProgress" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsFiringCooldownActive" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsOverheated" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if automatic reloading is enabled.", + "fullName": "Is automatic reloading enabled", + "functionType": "Condition", + "group": "Reload", + "name": "IsAutomaticReloadingEnabled", + "sentence": "Automatic reloading is enabled on_PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "AutomaticReloading", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if ammo is unlimited.", + "fullName": "Is ammo unlimited", + "functionType": "Condition", + "group": "Ammo", + "name": "IsUnlimitedAmmo", + "sentence": "_PARAM0_ has unlimited ammo", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "UnlimitedAmmo", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if object has no ammo available.", + "fullName": "Is out of ammo", + "functionType": "Condition", + "group": "Ammo", + "name": "IsOutOfAmmo", + "sentence": "_PARAM0_ is out of ammo", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsUnlimitedAmmo" }, "parameters": [ "Object", - "Behavior" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "FireBullet::FireBullet", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if object is ready to shoot.", - "fullName": "Is ready to shoot", - "functionType": "Condition", - "group": "Firing", - "name": "IsReadyToShoot", - "sentence": "_PARAM0_ is ready to shoot", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsOutOfAmmo" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsReloadNeeded" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsReloadInProgress" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsFiringCooldownActive" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsOverheated" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "FireBullet::FireBullet", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if automatic reloading is enabled.", - "fullName": "Is automatic reloading enabled", - "functionType": "Condition", - "group": "Reload", - "name": "IsAutomaticReloadingEnabled", - "sentence": "Automatic reloading is enabled on_PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "FireBullet::FireBullet", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if ammo is unlimited.", - "fullName": "Is ammo unlimited", - "functionType": "Condition", - "group": "Ammo", - "name": "IsUnlimitedAmmo", - "sentence": "_PARAM0_ has unlimited ammo", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "FireBullet::FireBullet::PropertyUnlimitedAmmo" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "FireBullet::FireBullet", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if object has no ammo available.", - "fullName": "Is out of ammo", - "functionType": "Condition", - "group": "Ammo", - "name": "IsOutOfAmmo", - "sentence": "_PARAM0_ is out of ammo", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsUnlimitedAmmo" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "value": "FireBullet::FireBullet::PropertyAmmoQuantity" - }, - "parameters": [ - "Object", - "Behavior", - "<=", - "0" + "Behavior", + "" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AmmoQuantity", + "<=", + "0" ] } ], @@ -30491,22 +30348,20 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsPerReload" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsPerReload", ">", "0" ] }, { "type": { - "value": "FireBullet::FireBullet::PropertyShotsBeforeNextReload" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", "0" ] @@ -30572,11 +30427,10 @@ "subInstructions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHeatLevel" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", ">=", "1" ] @@ -30692,17 +30546,12 @@ "unit": "Second", "label": "Firing cooldown", "description": "Objects cannot shoot while firing cooldown is active.", - "group": "", - "extraInformation": [], "name": "FireCooldown" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustFired" }, @@ -30710,9 +30559,6 @@ "value": "true", "type": "Boolean", "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], "name": "RotateBullet" }, { @@ -30722,7 +30568,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "FiringArc" }, { @@ -30731,7 +30576,6 @@ "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "BulletQuantity" }, { @@ -30741,7 +30585,6 @@ "label": "Angle variance", "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "AngleVariance" }, @@ -30752,7 +30595,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range.", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "BulletSpeedVariance" }, @@ -30760,9 +30602,6 @@ "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -30772,7 +30611,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ShotsPerReload" }, @@ -30783,7 +30621,6 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ReloadDuration" }, @@ -30791,9 +30628,7 @@ "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "MaxAmmo" }, @@ -30801,9 +30636,6 @@ "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -30812,8 +30644,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" }, @@ -30821,9 +30651,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -30831,9 +30658,7 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "StartingAmmo" }, @@ -30841,9 +30666,6 @@ "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, @@ -30851,9 +30673,7 @@ "value": "true", "type": "Boolean", "label": "Unlimited ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "UnlimitedAmmo" }, @@ -30861,9 +30681,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ReloadInProgress" }, @@ -30873,7 +30690,6 @@ "label": "Heat increase per shot (between 0 and 1)", "description": " Object is overheated when Heat reaches 1.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "HeatIncreasePerShot" }, @@ -30881,9 +30697,6 @@ "value": "0", "type": "Number", "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeatLevel" }, @@ -30891,9 +30704,7 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "AutomaticReloading" }, @@ -30904,7 +30715,6 @@ "label": "Overheat duration", "description": "Object cannot shoot while overheat duration is active.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "OverheatDuration" }, @@ -30912,9 +30722,7 @@ "value": "0.1", "type": "Number", "label": "Linear cooling rate (per second)", - "description": "", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "LinearCoolingRate" }, @@ -30928,6 +30736,7 @@ "Linear", "Exponential" ], + "choices": [], "advanced": true, "name": "ExponentialCoolingRate" }, @@ -30937,7 +30746,6 @@ "label": "Layer the bullets are created on", "description": "Base layer by default.", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -30945,9 +30753,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" } @@ -30962,6 +30767,7 @@ "category": "", "extensionNamespace": "", "fullName": "Flash layer", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", "name": "FlashLayer", @@ -30989,6 +30795,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Make a layer visible for a specified duration, and then hide the layer.", @@ -31221,6 +31029,7 @@ "category": "", "extensionNamespace": "", "fullName": "Health (life points and damages for objects)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWhlYXJ0LWhhbGYtZnVsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDVDMTUsNSAxMy41OCw1LjkxIDEzLDcuMlYxNy43NEMxNy4yNSwxMy44NyAyMCwxMS4yIDIwLDguNUMyMCw2LjUgMTguNSw1IDE2LjUsNU0xNi41LDNDMTkuNTgsMyAyMiw1LjQxIDIyLDguNUMyMiwxMi4yNyAxOC42LDE1LjM2IDEzLjQ1LDIwLjAzTDEyLDIxLjM1TDEwLjU1LDIwLjAzQzUuNCwxNS4zNiAyLDEyLjI3IDIsOC41QzIsNS40MSA0LjQyLDMgNy41LDNDOS4yNCwzIDEwLjkxLDMuODEgMTIsNS4wOEMxMy4wOSwzLjgxIDE0Ljc2LDMgMTYuNSwzWiIgLz48L3N2Zz4=", "name": "Health", @@ -31243,6 +31052,8 @@ "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -31710,36 +31521,24 @@ "value": "100", "type": "Number", "label": "Health", - "description": "", - "group": "", - "extraInformation": [], "name": "Health" }, { "value": "0", "type": "Number", "label": "Damage cooldown (in seconds) (0 for no cooldown)", - "description": "", - "group": "", - "extraInformation": [], "name": "DamageCooldown" }, { "value": "100", "type": "Number", "label": "Maximum health (0 for no maximum)", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxHealth" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsJustDamaged" }, @@ -31747,9 +31546,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CooldownActive" } @@ -31764,6 +31560,7 @@ "category": "", "extensionNamespace": "", "fullName": "Flash (blink)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", "name": "Flash", @@ -31790,6 +31587,8 @@ "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -32226,18 +32025,12 @@ "value": "0.1", "type": "Number", "label": "Half period (time during which object is invisible), in seconds", - "description": "", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -32245,9 +32038,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" } @@ -32262,6 +32052,7 @@ "category": "", "extensionNamespace": "", "fullName": "Shake Object (position, angle, scale)", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", @@ -32306,6 +32097,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -36667,37 +36460,29 @@ }, { "author": "westboy31, Tristan Rhodes (https://victrisgames.itch.io/)", - "category": "", + "category": "Camera", "extensionNamespace": "", - "fullName": "Camera Shake", - "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", + "fullName": "Camera shake", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZlY3Rvci1kaWZmZXJlbmNlLWFiIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTMsMUMxLjg5LDEgMSwxLjg5IDEsM1Y1SDNWM0g1VjFIM003LDFWM0gxMFYxSDdNMTIsMVYzSDE0VjVIMTZWM0MxNiwxLjg5IDE1LjExLDEgMTQsMUgxMk0xLDdWMTBIM1Y3SDFNMTQsN0MxNCw3IDE0LDExLjY3IDE0LDE0QzExLjY3LDE0IDcsMTQgNywxNEM3LDE0IDcsMTggNywyMEM3LDIxLjExIDcuODksMjIgOSwyMkgyMEMyMS4xMSwyMiAyMiwyMS4xMSAyMiwyMFY5QzIyLDcuODkgMjEuMTEsNyAyMCw3QzE4LDcgMTQsNyAxNCw3TTE2LDlIMjBWMjBIOVYxNkgxNEMxNS4xMSwxNiAxNiwxNS4xMSAxNiwxNFY5TTEsMTJWMTRDMSwxNS4xMSAxLjg5LDE2IDMsMTZINVYxNEgzVjEySDFaIiAvPjwvc3ZnPg==", "name": "CameraShake", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/vector-difference-ab.svg", - "shortDescription": "Shake the camera on the specified layer using one or more methods of shaking (position, angle, zoom).", - "version": "2.6.5", + "shortDescription": "Shake layer cameras.", + "version": "3.2.0", "description": [ - "Ideal for explosions, hit/impacts, earthquake, etc.", - "", - "Select one or more methods of shaking:", - "- Position: Shake the X and/or Y position of the camera ", - "- Angle: Shake the rotation of the camera ", - "- Zoom: Shake the zoom level of the camera ", + "Shake layer cameras with translation, rotation and zoom.", "", - "Control how the camera shakes:", - "- Amplitude: How far the camera moves during each shake", - "- Duration: Amount of time to shake the camera", - "- Time between shakes: Amount of time between each change of the movement of the camera", - "- Keep shaking until stopped (boolean)", + "- Short shaking can be used to give impact (explosion, hit)", + "- Shaking can go indefinitely to set an ambiance (engine vibration, earthquake, pulsing)", + "- Low frequency shaking allows to simulate slow moving objects (ship rocking back and forth)", "", - "Tips:", - "- For a single-shake effect, set the \"Time between shakes\" to be equal to \"Duration\" (great for a hit or impact)", - "- To make the single-shake move in the opposite direction, use negative numbers ", - "- To repeat a single-shake effect in a loop, add a condition \"Camera is not shaking\" ", - "- Use a long \"Time between shakes\" to simulate a slow moving object (like a ship rocking back and forth)", - "- Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. ", - "- Use \"Shake until stopped\" to simulate engine vibration, earthquake, or pulsing", - "" + "Release notes:", + "- Version 3.0.0", + " - No adaptation of the game events is needed.", + " - It fixes an issue when used with scrolling, the amplitude will feel bigger in this case.", + " - The shaking relies on noise which could feel a bit different.", + " - This extension can no longer do impulses. For this, another extension \"Camera impulse\" can be used." ], "origin": { "identifier": "CameraShake", @@ -36708,432 +36493,163 @@ "camera", "effect", "screen", - "shake", - "zoom", - "position", - "rotate" + "shake" ], "authorIds": [ - "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "m4hBMBTUilft4s1V4FQQPakVDGx1" ], "dependencies": [], - "eventsFunctions": [ + "globalVariables": [], + "sceneVariables": [ { - "description": "Shake the camera on the specified layer, using one or more ways to shake (position, angle, zoom).", - "fullName": "Camera Shake", - "functionType": "Action", - "name": "CameraShake", - "sentence": "Shake camera on _PARAM3_ layer for _PARAM5_ seconds. Use an amplitude of _PARAM1_px on X axis and _PARAM2_px on Y axis, angle rotation amplitude _PARAM6_ degrees, and zoom amplitude _PARAM7_ percent. Wait _PARAM8_ seconds between shakes. Keep shaking until stopped: _PARAM9_", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Camera Shake", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Start/Reset duration timer" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"__CameraShake_DurationTimer\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "=", - "GetArgumentAsNumber(\"PowerX\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "=", - "GetArgumentAsNumber(\"PowerY\")" - ] - }, - { - "type": { - "value": "ModVarGlobalTxt" - }, - "parameters": [ - "__CameraShake_Layer", - "=", - "GetArgumentAsString(\"Layer\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_Camera", - "=", - "GetArgumentAsNumber(\"Camera\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_Duration", - "=", - "GetArgumentAsNumber(\"Duration\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_PowerAngle", - "=", - "GetArgumentAsNumber(\"PowerAngle\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_PowerZoom", - "=", - "GetArgumentAsNumber(\"PowerZoom\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_TimeBetweenShakes", - "=", - "GetArgumentAsNumber(\"TimeBetweenShakes\")" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Determine if the shake should keep going until stopped" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetGlobalVariableAsBoolean" - }, - "parameters": [ - "__CameraShake_ShakeForever", - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShakeForever\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetGlobalVariableAsBoolean" - }, - "parameters": [ - "__CameraShake_ShakeForever", - "True" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Add default values if none were provided" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_Duration", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_Duration", - "=", - "0.5" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_TimeBetweenShakes", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_TimeBetweenShakes", - "=", - "0.08" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If duration is less than a single shake, increase duration to make 1 full shake" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_Duration", - "<", - "GlobalVariable(__CameraShake_TimeBetweenShakes)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_Duration", - "=", - "GlobalVariable(__CameraShake_TimeBetweenShakes)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect initial shake" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_ShakeInProgress", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_InitialShake", - "=", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Initiate the onScenePostEvents function" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ShakeInProgress", - "=", - "1" - ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [ + "folded": true, + "name": "DefaultFrequency", + "type": "number", + "value": 12 + }, + { + "folded": true, + "name": "DefaultAmplitudeX", + "type": "number", + "value": 4 + }, + { + "folded": true, + "name": "DefaultAmplitudeY", + "type": "number", + "value": 4 + }, + { + "folded": true, + "name": "DefaultAmplitudeAngle", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "DefaultAmplitudeZoom", + "type": "number", + "value": 1 + }, + { + "folded": true, + "name": "Duration", + "type": "number", + "value": 0 + }, + { + "name": "Layers", + "type": "structure", + "children": [] + }, + { + "name": "Layer", + "type": "structure", + "children": [ { - "description": "Amplitude of shaking on the X axis (pixels) (For example: 5)", - "name": "PowerX", - "type": "expression" + "name": "AmplitudeAngle", + "type": "number", + "value": 0 }, { - "description": "Amplitude of shaking on the Y axis (pixels) (For example: 5)", - "name": "PowerY", - "type": "expression" + "name": "AmplitudeX", + "type": "number", + "value": 0 }, { - "description": "Layer (base layer if empty)", - "name": "Layer", - "type": "layer" + "name": "AmplitudeY", + "type": "number", + "value": 0 }, { - "description": "Camera index (Default: 0)", - "name": "Camera", - "type": "expression" + "folded": true, + "name": "AmplitudeZoom", + "type": "number", + "value": 0 }, { - "description": "Duration (seconds) (Default: 0.5)", - "name": "Duration", - "type": "expression" + "folded": true, + "name": "CameraDeltaAngle", + "type": "number", + "value": 0 }, { - "description": "Angle rotation amplitude (degrees) (For example: 2)", - "name": "PowerAngle", - "type": "expression" + "name": "CameraDeltaX", + "type": "number", + "value": 0 }, { - "description": "Zoom amplitude (percent change) (For example: 3)", - "name": "PowerZoom", - "type": "expression" + "name": "CameraDeltaY", + "type": "number", + "value": 0 }, { - "description": "Amount of time between shakes (seconds) (Default: 0.08)", - "name": "TimeBetweenShakes", - "type": "expression" + "folded": true, + "name": "CameraDeltaZoom", + "type": "number", + "value": 0 }, { - "description": "Keep shaking until stopped", - "longDescription": "Duration value will be ignored", - "name": "ShakeForever", - "type": "yesorno" + "folded": true, + "name": "Frequency", + "type": "number", + "value": 0 + } + ] + }, + { + "folded": true, + "name": "LayerName", + "type": "string", + "value": "" + }, + { + "folded": true, + "name": "Time", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "StartEaseDuration", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "StopEaseDuration", + "type": "number", + "value": 0 + } + ], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CameraShake::SetLayerShakable" + }, + "parameters": [ + "", + "", + "\"\"", + "" + ] + } + ] } ], + "parameters": [], "objectGroups": [] }, { @@ -37143,95 +36659,420 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Camera Shake", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Step time counters." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Time", + "+", + "TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraShake::IsShaking" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Start shaking", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarGlobal" + "value": "NumberVariable" + }, + "parameters": [ + "Time", + "<", + "StartEaseDuration" + ] + }, + { + "type": { + "inverted": true, + "value": "NumberVariable" + }, + "parameters": [ + "Time", + ">", + "Duration - StopEaseDuration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake_ShakeInProgress", + "EaseFactor", "=", - "1" + "clamp(Time / StartEaseDuration, 0, 1)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Time", + ">", + "Duration - StopEaseDuration" ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetNumberVariable" }, - "comment": "Keep shaking forever (if desired)" - }, + "parameters": [ + "EaseFactor", + "=", + "clamp((Duration - Time) / StopEaseDuration, 0, 1)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "Layers", + "valueIteratorVariableName": "Layer", + "keyIteratorVariableName": "LayerName", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Layer.Shakable", + "True", + "" + ] + } + ], + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { + "conditions": [], + "actions": [ + { "type": { - "value": "GlobalVariableAsBoolean" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake_ShakeForever", - "True" + "ActualLayerName", + "=", + "LayerName" ] } - ], - "actions": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ModVarGlobal" + "value": "StringVariable" }, "parameters": [ - "__CameraShake_Duration", + "LayerName", "=", - "100" + "\"__BaseLayer\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "ResetTimer" + "value": "SetStringVariable" }, "parameters": [ - "", - "\"__CameraShake_DurationTimer\"" + "ActualLayerName", + "=", + "\"\"" ] } ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Calculate movement of the shake", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use user defined default values when there is no layer specific value set." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CameraShake::SetFrequency" + }, + "parameters": [ + "", + "DefaultFrequency", + "\"\"", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeX", + "=", + "DefaultAmplitudeX" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeY", + "=", + "DefaultAmplitudeY" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeAngle", + "=", + "DefaultAmplitudeAngle" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeZoom", + "=", + "DefaultAmplitudeZoom" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaX", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaY", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaAngle", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaZoom", + "=", + "0" + ] + } + ], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"Frequency\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CameraShake::SetFrequency" + }, + "parameters": [ + "", + "Layer.Frequency", + "\"\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"AmplitudeX\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeX", + "=", + "Layer.AmplitudeX" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"AmplitudeY\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeY", + "=", + "Layer.AmplitudeY" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"AmplitudeAngle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeAngle", + "=", + "Layer.AmplitudeAngle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"AmplitudeZoom\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeZoom", + "=", + "Layer.AmplitudeZoom" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -37242,1778 +37083,2962 @@ "textG": 0, "textR": 0 }, - "comment": "Run once before every shake movement" + "comment": "Shake the layer camera.\nSave the camera displacement to revert it in onScenePostEvents." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "NumberVariable" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_InitialShake", - "=", - "1" - ] - }, - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "GlobalVariable(__CameraShake_TimeBetweenShakes)", - "\"__CameraShake_ShakeTimer\"" - ] - } + "parameters": [ + "AmplitudeX", + "!=", + "0" ] } ], "actions": [ { "type": { - "value": "ResetTimer" + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaX", + "=", + "CameraShake::Noise2d(\"\", TimeFromStart(), 1000) * AmplitudeX * EaseFactor" + ] + }, + { + "type": { + "value": "SetCameraCenterX" }, "parameters": [ "", - "\"__CameraShake_ShakeTimer\"" + "+", + "Layers[LayerName].CameraDeltaX", + "ActualLayerName", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AmplitudeY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaY", + "=", + "CameraShake::Noise2d(\"\", TimeFromStart(), 2000) * AmplitudeY * EaseFactor" ] }, { "type": { - "value": "ModVarGlobal" + "value": "SetCameraCenterY" }, "parameters": [ - "__CameraShake_ShakeCounter", + "", "+", - "1" + "Layers[LayerName].CameraDeltaY", + "ActualLayerName", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AmplitudeAngle", + "!=", + "0" ] } ], - "events": [ + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "folded": true, - "name": "Correct for drift and reset drift tracking variables", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move to correct any drift from previous shake" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerAngle", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "RotateCamera" - }, - "parameters": [ - "", - "-", - "GlobalVariable(__CameraShake_AngleTravelled)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerZoom", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ZoomCamera" - }, - "parameters": [ - "", - "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - GlobalVariable(__CameraShake_ZoomTravelled)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SetCameraX" - }, - "parameters": [ - "Object", - "-", - "GlobalVariable(__CameraShake_DisplacementTravelledX)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - }, - { - "type": { - "value": "SetCameraY" - }, - "parameters": [ - "Object", - "-", - "GlobalVariable(__CameraShake_DisplacementTravelledY)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset drift detection variables" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledX", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledY", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_AngleTravelled", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ZoomTravelled", - "=", - "0" - ] - } - ] - } - ], - "parameters": [] + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaAngle", + "=", + "CameraShake::Noise2d(\"\", TimeFromStart(), 3000) * AmplitudeAngle * EaseFactor" + ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetCameraAngle" + }, + "parameters": [ + "", + "+", + "Layers[LayerName].CameraDeltaAngle", + "ActualLayerName", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AmplitudeZoom", + "!=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" }, - "comment": "Calculate Position Shake" + "parameters": [ + "Layers[LayerName].CameraDeltaZoom", + "=", + "pow(AmplitudeZoom, CameraShake::Noise2d(\"\", TimeFromStart(), 4000) * EaseFactor)" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_InitialShake", - "=", - "1" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementX", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerX)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementY", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerY)" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "After initial shake pick a random direction" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_InitialShake", - "=", - "0" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementX", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerX) * RandomWithStep(-1, 1, 2)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementY", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerY) * RandomWithStep(-1, 1, 2)" - ] - } - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Calculate Rotation (angle) shake " - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerAngle", - "!=", - "0" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Every \"even\" shake, rotate counter-clockwise" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "DisplacementAngle = ((DesiredDuration - RunningTimer) / DesiredDuration) * Amplitude" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementAngle", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerAngle)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Every \"odd\" shake, rotate clockwise (this includes the initial shake and can be used for a one shake effect)" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "DisplacementAngle = -1 * ((DesiredDuration - RunningTimer) / DesiredDuration) * Amplitude" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementAngle", - "=", - "-1 * (GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerAngle)" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Calculate Zoom shake" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerZoom", - "!=", - "0" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Calculate camera zoom displacement, with linear decay over time" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "ZoomDisplacement = ((DesiredDuration - RunningTimer) / DesiredDuration) * Amplitude * 1/100" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Every even shake, increase zoom" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementZoom", - "=", - "-1 * (GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerZoom) * (1/100)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Every \"odd\" shake, decrease scale" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "ZoomDisplacement = -1 * ((DesiredDuration - RunningTimer) / DesiredDuration) * Amplitude * 1/100" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementZoom", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerZoom) * (1/100)" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "ZoomCamera" }, - "comment": "Save that initial shake has been processed" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_InitialShake", - "=", - "0" - ] - } + "parameters": [ + "", + "CameraZoom(ActualLayerName, 0) * Layers[LayerName].CameraDeltaZoom", + "ActualLayerName", + "0" ] } ] } - ], - "parameters": [] + ] + } + ] + } + ], + "variables": [ + { + "folded": true, + "name": "AmplitudeX", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "AmplitudeY", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "AmplitudeAngle", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "AmplitudeZoom", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "EaseFactor", + "type": "number", + "value": 1 + }, + { + "folded": true, + "name": "ActualLayerName", + "type": "string", + "value": "" + } + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Revert the shaking." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraShake::IsShaking" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "Layers", + "valueIteratorVariableName": "Layer", + "keyIteratorVariableName": "LayerName", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Layer.Shakable", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraDeltaX", + "=", + "Layer.CameraDeltaX" + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Move camera", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraDeltaY", + "=", + "Layer.CameraDeltaY" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraDeltaAngle", + "=", + "Layer.CameraDeltaAngle" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraDeltaZoom", + "=", + "Layer.CameraDeltaZoom" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ActualLayerName", + "=", + "LayerName" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" }, - "comment": "Calculate the fraction of shake that occured during this frame" - }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake_PercentTimeElapsedThisFrame", - "=", - "min(1,TimeDelta()/GlobalVariable(__CameraShake_TimeBetweenShakes))" - ] - } + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ActualLayerName", + "=", + "\"\"" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "NumberVariable" }, - "comment": "Increase change for the first half of the shake (move away from original values)" - }, + "parameters": [ + "CameraDeltaX", + "!=", + "0" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Timer" - }, - "parameters": [ - "", - "GlobalVariable(__CameraShake_TimeBetweenShakes)/2", - "\"__CameraShake_ShakeTimer\"" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change position" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "CameraX" - }, - "parameters": [ - "", - "-", - "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - }, - { - "type": { - "value": "CameraY" - }, - "parameters": [ - "", - "-", - "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save movement to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledX", - "-", - "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledY", - "-", - "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change angle" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "GlobalVariable(__CameraShake_PowerAngle)", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "RotateCamera" - }, - "parameters": [ - "", - "+", - "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024", - "", - "" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save movement to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_AngleTravelled", - "+", - "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change zoom" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "GlobalVariable(__CameraShake_PowerZoom)", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ZoomCamera" - }, - "parameters": [ - "", - "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) + round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save movement to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ZoomTravelled", - "+", - "round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - } - ] - } - ] - } + "type": { + "value": "SetCameraCenterX" + }, + "parameters": [ + "", + "-", + "CameraDeltaX", + "ActualLayerName", + "0" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "NumberVariable" }, - "comment": "Decrease change the second half of the shake (return to original position)" - }, + "parameters": [ + "CameraDeltaY", + "!=", + "0" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "GlobalVariable(__CameraShake_TimeBetweenShakes)/2", - "\"__CameraShake_ShakeTimer\"" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change position" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "CameraX" - }, - "parameters": [ - "", - "+", - "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - }, - { - "type": { - "value": "CameraY" - }, - "parameters": [ - "", - "+", - "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save the amount of change to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledX", - "+", - "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledY", - "+", - "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change angle" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "GlobalVariable(__CameraShake_PowerAngle)", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "RotateCamera" - }, - "parameters": [ - "", - "-", - "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024", - "", - "" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save the amount of change to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_AngleTravelled", - "-", - "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change zoom" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "GlobalVariable(__CameraShake_PowerZoom)", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ZoomCamera" - }, - "parameters": [ - "", - "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save the amount of change to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ZoomTravelled", - "-", - "round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - } - ] - } - ] - } + "type": { + "value": "SetCameraCenterY" + }, + "parameters": [ + "", + "-", + "CameraDeltaY", + "ActualLayerName", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CameraDeltaAngle", + "!=", + "0" ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetCameraAngle" + }, + "parameters": [ + "", + "-", + "CameraDeltaAngle", + "ActualLayerName", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CameraDeltaZoom", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "CameraZoom(ActualLayerName) / CameraDeltaZoom", + "ActualLayerName", + "0" + ] + } + ] } ] } ], - "parameters": [] + "variables": [ + { + "folded": true, + "name": "ActualLayerName", + "type": "string", + "value": "" + }, + { + "folded": true, + "name": "CameraDeltaX", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "CameraDeltaY", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "CameraDeltaAngle", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "CameraDeltaZoom", + "type": "number", + "value": 0 + } + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Shake the camera on layers chosen with configuration actions.", + "fullName": "Shake camera", + "functionType": "Action", + "name": "ShakeCamera", + "sentence": "Shake camera for _PARAM1_ seconds with _PARAM2_ seconds of easing to start and _PARAM3_ seconds to stop", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Time", + "=", + "0" + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Stop shaking", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "NewDuration" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StartEaseDuration", + "=", + "NewStartEaseDuration" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StopEaseDuration", + "=", + "NewStopEaseDuration" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Duration", + "<", + "StartEaseDuration + StopEaseDuration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StartEaseDuration", + "=", + "StartEaseDuration * Duration / (StartEaseDuration + StopEaseDuration)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StopEaseDuration", + "=", + "StopEaseDuration * Duration / (StartEaseDuration + StopEaseDuration)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Duration (in seconds)", + "name": "NewDuration", + "type": "expression" + }, + { + "description": "Ease duration to start (in seconds)", + "name": "NewStartEaseDuration", + "type": "expression" + }, + { + "description": "Ease duration to stop (in seconds)", + "name": "NewStopEaseDuration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Shake the camera on the specified layer, using one or more ways to shake (position, angle, zoom). This action is deprecated. Please use the other one with the same name.", + "fullName": "Shake camera (deprecated)", + "functionType": "Action", + "name": "CameraShake", + "private": true, + "sentence": "Shake camera on _PARAM3_ layer for _PARAM5_ seconds. Use an amplitude of _PARAM1_px on X axis and _PARAM2_px on Y axis, angle rotation amplitude _PARAM6_ degrees, and zoom amplitude _PARAM7_ percent. Wait _PARAM8_ seconds between shakes. Keep shaking until stopped: _PARAM9_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Camera Shake", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "ClearVariableChildren" + }, + "parameters": [ + "Layers" + ] + }, + { + "type": { + "value": "CameraShake::SetLayerShakable" + }, + "parameters": [ + "", + "", + "NewLayer", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Time", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Layer", + "=", + "NewLayer" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "NewDuration" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StartEaseDuration", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StopEaseDuration", + "=", + "NewDuration" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeX", + "=", + "abs(AmplitudeX)" + ] + }, + { + "type": { + "value": "SetNumberVariable" }, - "comment": "Stop shaking when the duration has been reached or if stop shaking has been requested" + "parameters": [ + "DefaultAmplitudeY", + "=", + "abs(AmplitudeY)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeAngle", + "=", + "AmplitudeAngle" + ] }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeZoom", + "=", + "1 + AmplitudeZoom / 100" + ] + } + ], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "BuiltinCommonInstructions::CompareNumbers" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "GlobalVariable(__CameraShake_Duration)", - "\"__CameraShake_DurationTimer\"" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_ShakeInProgress", - "=", - "-1" - ] - } + "parameters": [ + "ShakePeriod", + "!=", + "0" ] - }, + } + ], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::Once" + "value": "SetNumberVariable" }, - "parameters": [] + "parameters": [ + "DefaultFrequency", + "=", + "1 / ShakePeriod" + ] } - ], - "actions": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ModVarGlobal" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "__CameraShake_ShakeInProgress", + "ShakePeriod", "=", "0" ] } ], - "events": [ + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Correct for drift and reset drift tracking variables", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move to correct drift from previous shake" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerAngle", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "RotateCamera" - }, - "parameters": [ - "", - "-", - "GlobalVariable(__CameraShake_AngleTravelled)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerZoom", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ZoomCamera" - }, - "parameters": [ - "", - "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - GlobalVariable(__CameraShake_ZoomTravelled)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SetCameraX" - }, - "parameters": [ - "Object", - "-", - "GlobalVariable(__CameraShake_DisplacementTravelledX)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - }, - { - "type": { - "value": "SetCameraY" - }, - "parameters": [ - "Object", - "-", - "GlobalVariable(__CameraShake_DisplacementTravelledY)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset drift detection variables" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledX", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledY", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_AngleTravelled", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ZoomTravelled", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ShakeCounter", - "=", - "0" - ] - } - ] - } - ], - "parameters": [] + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultFrequency", + "=", + "1 / 0.08" + ] } ] } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Determine if the shake should keep going until stopped" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShakeForever", + "True", + "" + ] + } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "1234567890" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add default values if none were provided" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "NewDuration", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "0.5" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Amplitude of shaking on the X axis (in pixels)", + "name": "AmplitudeX", + "type": "expression" + }, + { + "description": "Amplitude of shaking on the Y axis (in pixels)", + "name": "AmplitudeY", + "type": "expression" + }, + { + "description": "Layer (base layer if empty)", + "name": "NewLayer", + "type": "layer" + }, + { + "description": "Camera index (Default: 0)", + "name": "Camera", + "type": "expression" + }, + { + "description": "Duration (in seconds) (Default: 0.5)", + "name": "NewDuration", + "type": "expression" + }, + { + "description": "Angle rotation amplitude (in degrees) (For example: 2)", + "name": "AmplitudeAngle", + "type": "expression" + }, + { + "description": "Zoom factor amplitude", + "name": "AmplitudeZoom", + "type": "expression" + }, + { + "description": "Period between shakes (in seconds) (Default: 0.08)", + "name": "ShakePeriod", + "type": "expression" + }, + { + "description": "Keep shaking until stopped", + "longDescription": "Duration value will be ignored", + "name": "ShakeForever", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Start shaking the camera indefinitely.", + "fullName": "Start camera shaking", + "functionType": "Action", + "name": "StartShaking", + "sentence": "Start shaking the camera with _PARAM1_ seconds of easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Time", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "1234567890" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StartEaseDuration", + "=", + "EaseDuration" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Ease duration (in seconds)", + "name": "EaseDuration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Stop shaking the camera.", + "fullName": "Stop camera shaking", + "functionType": "Action", + "name": "StopShaking", + "sentence": "Stop shaking the camera with _PARAM1_ seconds of easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Time", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "EaseDuration" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StopEaseDuration", + "=", + "EaseDuration" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Ease duration (in seconds)", + "name": "EaseDuration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Mark a layer as shakable.", + "fullName": "Shakable layer", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetLayerShakable", + "sentence": "Mark the layer: _PARAM2_ as shakable: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "NewLayerName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "NewLayerName", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "Shakable", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "Layers[LayerName].Shakable", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Shakable", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "Layers[LayerName].Shakable", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "defaultValue": "yes", + "description": "Shakable", + "name": "Shakable", + "optional": true, + "type": "yesorno" + }, + { + "description": "Layer", + "name": "NewLayerName", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the camera is shaking.", + "fullName": "Camera is shaking", + "functionType": "Condition", + "name": "IsShaking", + "sentence": "Camera is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Time", + "<", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Change the translation amplitude of the shaking (in pixels).", + "fullName": "Layer translation amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetLayerTranslationAmplitude", + "sentence": "Change the translation amplitude of the shaking to _PARAM1_; _PARAM2_ (layer: _PARAM3_)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "NewLayerName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "NewLayerName", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].AmplitudeX", + "=", + "AmplitudeX" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].AmplitudeY", + "=", + "AmplitudeY" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Amplitude of shaking on the X axis (in pixels)", + "name": "AmplitudeX", + "type": "expression" + }, + { + "description": "Amplitude of shaking on the Y axis (in pixels)", + "name": "AmplitudeY", + "type": "expression" + }, + { + "description": "Layer", + "name": "NewLayerName", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Change the rotation amplitude of the shaking (in degrees).", + "fullName": "Layer rotation amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetLayerRotationAmplitude", + "sentence": "Change the rotation amplitude of the shaking to _PARAM1_ degrees (layer: _PARAM2_)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "NewLayerName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "NewLayerName", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].AmplitudeAngle", + "=", + "AmplitudeAngle" + ] } - ], - "parameters": [] + ] + } + ], + "parameters": [ + { + "description": "Angle (in degree)", + "name": "AmplitudeAngle", + "type": "expression" + }, + { + "description": "NewLayerName", + "name": "NewLayerName", + "type": "layer" } ], - "parameters": [], "objectGroups": [] }, { - "description": "Check if camera is shaking.", - "fullName": "Check if camera is shaking", - "functionType": "Condition", - "name": "IsShaking", - "sentence": " Camera is shaking", + "description": "Change the zoom factor amplitude of the shaking. The shaking will zoom and unzoom by this factor (for instance 1.0625 is a valid value).", + "fullName": "Layer zoom amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetLayerZoomAmplitude", + "sentence": "Change the zoom factor amplitude of the shaking to _PARAM1_ (layer: _PARAM2_)", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "NewLayerName" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarGlobal" + "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "__CameraShake_ShakeInProgress", + "NewLayerName", "=", - "1" + "\"\"" ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].AmplitudeZoom", + "=", + "AmplitudeZoom" ] } ] } ], - "parameters": [], + "parameters": [ + { + "description": "Zoom factor", + "name": "AmplitudeZoom", + "type": "expression" + }, + { + "description": "NewLayerName", + "name": "NewLayerName", + "type": "layer" + } + ], "objectGroups": [] }, { - "description": "Stop shaking the camera.", - "fullName": "Stop shaking the camera", + "description": "Change the number of back and forth per seconds.", + "fullName": "Layer shaking frequency", "functionType": "Action", - "name": "StopShaking", - "sentence": "Stop shaking the camera", + "group": "Camera shake configuration", + "name": "SetLayerShakingFrequency", + "sentence": "Change the shaking frequency to _PARAM1_ (layer: _PARAM2_)", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "NewLayerName" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "CameraShake::IsShaking" + "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "", - "" + "NewLayerName", + "=", + "\"\"" ] } ], "actions": [ { "type": { - "value": "ModVarGlobal" + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].Frequency", + "=", + "Frequency" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Frequency", + "name": "Frequency", + "type": "expression" + }, + { + "description": "NewLayerName", + "name": "NewLayerName", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Change the default translation amplitude of the shaking (in pixels).", + "fullName": "Default translation amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetDefaultTranslationAmplitude", + "sentence": "Change the default translation amplitude of the shaking to _PARAM1_; _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeX", + "=", + "AmplitudeX" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeY", + "=", + "AmplitudeY" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Amplitude of shaking on the X axis (in pixels)", + "name": "AmplitudeX", + "type": "expression" + }, + { + "description": "Amplitude of shaking on the Y axis (in pixels)", + "name": "AmplitudeY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the default rotation amplitude of the shaking (in degrees).", + "fullName": "Default rotation amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetDefaultRotationAmplitude", + "sentence": "Change the default rotation amplitude of the shaking to _PARAM1_ degrees", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeAngle", + "=", + "AmplitudeAngle" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle (in degree)", + "name": "AmplitudeAngle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the default zoom factor amplitude of the shaking. The shaking will zoom and unzoom by this factor (for instance 1.0625 is a valid value).", + "fullName": "Default zoom amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetDefaultZoomAmplitude", + "sentence": "Change the default zoom factor amplitude of the shaking to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeZoom", + "=", + "AmplitudeZoom" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Zoom factor", + "name": "AmplitudeZoom", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the default number of back and forth per seconds.", + "fullName": "Default shaking frequency", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetDefaultShakingFrequency", + "sentence": "Change the default shaking frequency to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake_ShakeInProgress", + "DefaultFrequency", "=", - "-1" + "Frequency" ] } ] } ], + "parameters": [ + { + "description": "Frequency", + "name": "Frequency", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "if (gdjs._cameraShakeExtension) {", + " return;", + "}", + "", + "/** Noise generator manager. */", + "class NoiseManager {", + " /**", + " * Create the manager of noise generators.", + " */", + " constructor() {", + " this.seed = gdjs.randomInRange(1, Number.MAX_SAFE_INTEGER);", + " /** @type {Map} */", + " this.generators = new Map();", + " }", + "", + " /**", + " * @param name {string}", + " * @return {NoiseGenerator}", + " */", + " getGenerator(name) {", + " let generator = this.generators.get(name);", + " if (!generator) {", + " generator = new NoiseGenerator(name + this.seed);", + " this.generators.set(name, generator);", + " }", + " return generator;", + " }", + "", + " /**", + " * @param seed {number}", + " */", + " setSeed(seed) {", + " this.seed = seed;", + " this.generators.forEach(generator => generator.setSeed(name + this.seed));", + " }", + "", + " /**", + " * @param name {string}", + " */", + " deleteGenerator(name) {", + " this.generators.delete(name);", + " }", + "", + " /**", + " */", + " deleteAllGenerators() {", + " this.generators.clear();", + " }", + "}", + "", + "/** Noise generator with octaves. */", + "class NoiseGenerator {", + " /**", + " * Create a noise generator with a seed.", + " * @param seed {string}", + " */", + " constructor(seed) {", + " this.simplexNoise = new SimplexNoise(seed);", + " this.frequency = 1;", + " this.octaves = 1;", + " this.persistence = 0.5;", + " this.lacunarity = 2;", + " this.xLoopPeriod = 0;", + " this.yLoopPeriod = 0;", + " }", + "", + " /**", + " * @param seed {string}", + " */", + " setSeed(seed) {", + " this.simplexNoise = new SimplexNoise(seed);", + " }", + "", + " /**", + " * @param x {float}", + " * @param y {float}", + " * @param z {float} optionnal", + " * @param w {float} optionnal", + " * @return {float}", + " */", + " noise(x, y, z, w) {", + " if (this.xLoopPeriod && this.yLoopPeriod) {", + " const circleRatioX = 2 * Math.PI / this.xLoopPeriod;", + " const circleRatioY = 2 * Math.PI / this.yLoopPeriod;", + " const angleX = circleRatioX * x;", + " const angleY = circleRatioY * y;", + " x = Math.cos(angleX) / circleRatioX;", + " y = Math.sin(angleX) / circleRatioX;", + " z = Math.cos(angleY) / circleRatioY;", + " w = Math.sin(angleY) / circleRatioY;", + " }", + " else if (this.xLoopPeriod) {", + " const circleRatio = 2 * Math.PI / this.xLoopPeriod;", + " const angleX = circleRatio * x;", + " w = z;", + " z = y;", + " x = Math.cos(angleX) / circleRatio;", + " y = Math.sin(angleX) / circleRatio;", + " }", + " else if (this.yLoopPeriod) {", + " const circleRatio = 2 * Math.PI / this.xLoopPeriod;", + " const angleX = circleRatio * x;", + " w = z;", + " // Make the circle perimeter equals to the looping period", + " // to keep the same perceived frequency with or without looping.", + " y = Math.cos(angleX) / circleRatio;", + " z = Math.sin(angleX) / circleRatio;", + " }", + " let noiseFunction = this.simplexNoise.noise4D.bind(this.simplexNoise);", + " if (z === undefined) {", + " noiseFunction = this.simplexNoise.noise2D.bind(this.simplexNoise);", + " }", + " else if (w === undefined) {", + " noiseFunction = this.simplexNoise.noise3D.bind(this.simplexNoise);", + " }", + " let frequency = this.frequency;", + " let noiseSum = 0;", + " let amplitudeSum = 0;", + " let amplitude = 1;", + " for (let i = 0; i < this.octaves; i++) {", + " noiseSum += noiseFunction(x * frequency, y * frequency, z * frequency, w * frequency) * amplitude;", + " amplitudeSum += Math.abs(amplitude);", + " amplitude *= this.persistence;", + " frequency *= this.lacunarity;", + " }", + " return noiseSum / amplitudeSum;", + " }", + "}", + "", + "/*", + "A fast javascript implementation of simplex noise by Jonas Wagner", + "https://github.com/jwagner/simplex-noise.js", + "", + "Based on a speed-improved simplex noise algorithm for 2D, 3D and 4D in Java.", + "Which is based on example code by Stefan Gustavson (stegu@itn.liu.se).", + "With Optimisations by Peter Eastman (peastman@drizzle.stanford.edu).", + "Better rank ordering method by Stefan Gustavson in 2012.", + "", + " Copyright (c) 2021 Jonas Wagner", + "", + " Permission is hereby granted, free of charge, to any person obtaining a copy", + " of this software and associated documentation files (the \"Software\"), to deal", + " in the Software without restriction, including without limitation the rights", + " to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", + " copies of the Software, and to permit persons to whom the Software is", + " furnished to do so, subject to the following conditions:", + "", + " The above copyright notice and this permission notice shall be included in all", + " copies or substantial portions of the Software.", + "", + " THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", + " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", + " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", + " OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", + " SOFTWARE.", + " */", + "", + "const F2 = 0.5 * (Math.sqrt(3.0) - 1.0);", + "const G2 = (3.0 - Math.sqrt(3.0)) / 6.0;", + "const F3 = 1.0 / 3.0;", + "const G3 = 1.0 / 6.0;", + "const F4 = (Math.sqrt(5.0) - 1.0) / 4.0;", + "const G4 = (5.0 - Math.sqrt(5.0)) / 20.0;", + "const grad3 = new Float32Array([1, 1, 0,", + " -1, 1, 0,", + " 1, -1, 0,", + " -1, -1, 0,", + " 1, 0, 1,", + " -1, 0, 1,", + " 1, 0, -1,", + " -1, 0, -1,", + " 0, 1, 1,", + " 0, -1, 1,", + " 0, 1, -1,", + " 0, -1, -1]);", + "const grad4 = new Float32Array([0, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1,", + " 0, -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1,", + " 1, 0, 1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 1, 0, -1, -1,", + " -1, 0, 1, 1, -1, 0, 1, -1, -1, 0, -1, 1, -1, 0, -1, -1,", + " 1, 1, 0, 1, 1, 1, 0, -1, 1, -1, 0, 1, 1, -1, 0, -1,", + " -1, 1, 0, 1, -1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, -1,", + " 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1, 0,", + " -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1, 0]);", + "", + "", + "/**", + " * Builds a random permutation table.", + " * This is exported only for (internal) testing purposes.", + " * Do not rely on this export.", + " * @param {() => number} random", + " * @private", + " */", + "function buildPermutationTable(random) {", + " const p = new Uint8Array(256);", + " for (let i = 0; i < 256; i++) {", + " p[i] = i;", + " }", + " for (let i = 0; i < 255; i++) {", + " const r = i + ~~(random() * (256 - i));", + " const aux = p[i];", + " p[i] = p[r];", + " p[r] = aux;", + " }", + " return p;", + "}", + "", + "/*", + "The ALEA PRNG and masher code used by simplex-noise.js", + "is based on code by Johannes Baagøe, modified by Jonas Wagner.", + "See alea.md for the full license.", + "@param {string|number} seed", + "*/", + "function alea(seed) {", + " let s0 = 0;", + " let s1 = 0;", + " let s2 = 0;", + " let c = 1;", + " const mash = masher();", + " s0 = mash(' ');", + " s1 = mash(' ');", + " s2 = mash(' ');", + " s0 -= mash(seed);", + " if (s0 < 0) {", + " s0 += 1;", + " }", + " s1 -= mash(seed);", + " if (s1 < 0) {", + " s1 += 1;", + " }", + " s2 -= mash(seed);", + " if (s2 < 0) {", + " s2 += 1;", + " }", + " return function () {", + " const t = 2091639 * s0 + c * 2.3283064365386963e-10; // 2^-32", + " s0 = s1;", + " s1 = s2;", + " return s2 = t - (c = t | 0);", + " };", + "}", + "", + "function masher() {", + " let n = 0xefc8249d;", + " return function (data) {", + " data = data.toString();", + " for (let i = 0; i < data.length; i++) {", + " n += data.charCodeAt(i);", + " let h = 0.02519603282416938 * n;", + " n = h >>> 0;", + " h -= n;", + " h *= n;", + " n = h >>> 0;", + " h -= n;", + " n += h * 0x100000000; // 2^32", + " }", + " return (n >>> 0) * 2.3283064365386963e-10; // 2^-32", + " };", + "}", + "", + "/** Deterministic simplex noise generator suitable for 2D, 3D and 4D spaces. */", + "class SimplexNoise {", + " /**", + " * Creates a new `SimplexNoise` instance.", + " * This involves some setup. You can save a few cpu cycles by reusing the same instance.", + " * @param {(() => number)|string|number} randomOrSeed A random number generator or a seed (string|number).", + " * Defaults to Math.random (random irreproducible initialization).", + " */", + " constructor(randomOrSeed) {", + " if (randomOrSeed === void 0) { randomOrSeed = Math.random; }", + " const random = typeof randomOrSeed == 'function' ? randomOrSeed : alea(randomOrSeed);", + " this.p = buildPermutationTable(random);", + " this.perm = new Uint8Array(512);", + " this.permMod12 = new Uint8Array(512);", + " for (let i = 0; i < 512; i++) {", + " this.perm[i] = this.p[i & 255];", + " this.permMod12[i] = this.perm[i] % 12;", + " }", + " }", + "", + " /**", + " * Samples the noise field in 2 dimensions", + " * @param {number} x", + " * @param {number} y", + " * @returns a number in the interval [-1, 1]", + " */", + " noise2D(x, y) {", + " const permMod12 = this.permMod12;", + " const perm = this.perm;", + " let n0 = 0; // Noise contributions from the three corners", + " let n1 = 0;", + " let n2 = 0;", + " // Skew the input space to determine which simplex cell we're in", + " const s = (x + y) * F2; // Hairy factor for 2D", + " const i = Math.floor(x + s);", + " const j = Math.floor(y + s);", + " const t = (i + j) * G2;", + " const X0 = i - t; // Unskew the cell origin back to (x,y) space", + " const Y0 = j - t;", + " const x0 = x - X0; // The x,y distances from the cell origin", + " const y0 = y - Y0;", + " // For the 2D case, the simplex shape is an equilateral triangle.", + " // Determine which simplex we are in.", + " let i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords", + " if (x0 > y0) {", + " i1 = 1;", + " j1 = 0;", + " } // lower triangle, XY order: (0,0)->(1,0)->(1,1)", + " else {", + " i1 = 0;", + " j1 = 1;", + " } // upper triangle, YX order: (0,0)->(0,1)->(1,1)", + " // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and", + " // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where", + " // c = (3-sqrt(3))/6", + " const x1 = x0 - i1 + G2; // Offsets for middle corner in (x,y) unskewed coords", + " const y1 = y0 - j1 + G2;", + " const x2 = x0 - 1.0 + 2.0 * G2; // Offsets for last corner in (x,y) unskewed coords", + " const y2 = y0 - 1.0 + 2.0 * G2;", + " // Work out the hashed gradient indices of the three simplex corners", + " const ii = i & 255;", + " const jj = j & 255;", + " // Calculate the contribution from the three corners", + " let t0 = 0.5 - x0 * x0 - y0 * y0;", + " if (t0 >= 0) {", + " const gi0 = permMod12[ii + perm[jj]] * 3;", + " t0 *= t0;", + " n0 = t0 * t0 * (grad3[gi0] * x0 + grad3[gi0 + 1] * y0); // (x,y) of grad3 used for 2D gradient", + " }", + " let t1 = 0.5 - x1 * x1 - y1 * y1;", + " if (t1 >= 0) {", + " const gi1 = permMod12[ii + i1 + perm[jj + j1]] * 3;", + " t1 *= t1;", + " n1 = t1 * t1 * (grad3[gi1] * x1 + grad3[gi1 + 1] * y1);", + " }", + " let t2 = 0.5 - x2 * x2 - y2 * y2;", + " if (t2 >= 0) {", + " const gi2 = permMod12[ii + 1 + perm[jj + 1]] * 3;", + " t2 *= t2;", + " n2 = t2 * t2 * (grad3[gi2] * x2 + grad3[gi2 + 1] * y2);", + " }", + " // Add contributions from each corner to get the final noise value.", + " // The result is scaled to return values in the interval [-1,1].", + " return 70.0 * (n0 + n1 + n2);", + " }", + "", + " /**", + " * Samples the noise field in 3 dimensions", + " * @param {number} x", + " * @param {number} y", + " * @param {number} z", + " * @returns a number in the interval [-1, 1]", + " */", + " noise3D(x, y, z) {", + " const permMod12 = this.permMod12;", + " const perm = this.perm;", + " let n0, n1, n2, n3; // Noise contributions from the four corners", + " // Skew the input space to determine which simplex cell we're in", + " const s = (x + y + z) * F3; // Very nice and simple skew factor for 3D", + " const i = Math.floor(x + s);", + " const j = Math.floor(y + s);", + " const k = Math.floor(z + s);", + " const t = (i + j + k) * G3;", + " const X0 = i - t; // Unskew the cell origin back to (x,y,z) space", + " const Y0 = j - t;", + " const Z0 = k - t;", + " const x0 = x - X0; // The x,y,z distances from the cell origin", + " const y0 = y - Y0;", + " const z0 = z - Z0;", + " // For the 3D case, the simplex shape is a slightly irregular tetrahedron.", + " // Determine which simplex we are in.", + " let i1, j1, k1; // Offsets for second corner of simplex in (i,j,k) coords", + " let i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords", + " if (x0 >= y0) {", + " if (y0 >= z0) {", + " i1 = 1;", + " j1 = 0;", + " k1 = 0;", + " i2 = 1;", + " j2 = 1;", + " k2 = 0;", + " } // X Y Z order", + " else if (x0 >= z0) {", + " i1 = 1;", + " j1 = 0;", + " k1 = 0;", + " i2 = 1;", + " j2 = 0;", + " k2 = 1;", + " } // X Z Y order", + " else {", + " i1 = 0;", + " j1 = 0;", + " k1 = 1;", + " i2 = 1;", + " j2 = 0;", + " k2 = 1;", + " } // Z X Y order", + " }", + " else { // x0 y0)", + " rankx++;", + " else", + " ranky++;", + " if (x0 > z0)", + " rankx++;", + " else", + " rankz++;", + " if (x0 > w0)", + " rankx++;", + " else", + " rankw++;", + " if (y0 > z0)", + " ranky++;", + " else", + " rankz++;", + " if (y0 > w0)", + " ranky++;", + " else", + " rankw++;", + " if (z0 > w0)", + " rankz++;", + " else", + " rankw++;", + " // simplex[c] is a 4-vector with the numbers 0, 1, 2 and 3 in some order.", + " // Many values of c will never occur, since e.g. x>y>z>w makes x= 3 ? 1 : 0;", + " const j1 = ranky >= 3 ? 1 : 0;", + " const k1 = rankz >= 3 ? 1 : 0;", + " const l1 = rankw >= 3 ? 1 : 0;", + " // The integer offsets for the third simplex corner", + " const i2 = rankx >= 2 ? 1 : 0;", + " const j2 = ranky >= 2 ? 1 : 0;", + " const k2 = rankz >= 2 ? 1 : 0;", + " const l2 = rankw >= 2 ? 1 : 0;", + " // The integer offsets for the fourth simplex corner", + " const i3 = rankx >= 1 ? 1 : 0;", + " const j3 = ranky >= 1 ? 1 : 0;", + " const k3 = rankz >= 1 ? 1 : 0;", + " const l3 = rankw >= 1 ? 1 : 0;", + " // The fifth corner has all coordinate offsets = 1, so no need to compute that.", + " const x1 = x0 - i1 + G4; // Offsets for second corner in (x,y,z,w) coords", + " const y1 = y0 - j1 + G4;", + " const z1 = z0 - k1 + G4;", + " const w1 = w0 - l1 + G4;", + " const x2 = x0 - i2 + 2.0 * G4; // Offsets for third corner in (x,y,z,w) coords", + " const y2 = y0 - j2 + 2.0 * G4;", + " const z2 = z0 - k2 + 2.0 * G4;", + " const w2 = w0 - l2 + 2.0 * G4;", + " const x3 = x0 - i3 + 3.0 * G4; // Offsets for fourth corner in (x,y,z,w) coords", + " const y3 = y0 - j3 + 3.0 * G4;", + " const z3 = z0 - k3 + 3.0 * G4;", + " const w3 = w0 - l3 + 3.0 * G4;", + " const x4 = x0 - 1.0 + 4.0 * G4; // Offsets for last corner in (x,y,z,w) coords", + " const y4 = y0 - 1.0 + 4.0 * G4;", + " const z4 = z0 - 1.0 + 4.0 * G4;", + " const w4 = w0 - 1.0 + 4.0 * G4;", + " // Work out the hashed gradient indices of the five simplex corners", + " const ii = i & 255;", + " const jj = j & 255;", + " const kk = k & 255;", + " const ll = l & 255;", + " // Calculate the contribution from the five corners", + " let t0 = 0.6 - x0 * x0 - y0 * y0 - z0 * z0 - w0 * w0;", + " if (t0 < 0)", + " n0 = 0.0;", + " else {", + " const gi0 = (perm[ii + perm[jj + perm[kk + perm[ll]]]] % 32) * 4;", + " t0 *= t0;", + " n0 = t0 * t0 * (grad4[gi0] * x0 + grad4[gi0 + 1] * y0 + grad4[gi0 + 2] * z0 + grad4[gi0 + 3] * w0);", + " }", + " let t1 = 0.6 - x1 * x1 - y1 * y1 - z1 * z1 - w1 * w1;", + " if (t1 < 0)", + " n1 = 0.0;", + " else {", + " const gi1 = (perm[ii + i1 + perm[jj + j1 + perm[kk + k1 + perm[ll + l1]]]] % 32) * 4;", + " t1 *= t1;", + " n1 = t1 * t1 * (grad4[gi1] * x1 + grad4[gi1 + 1] * y1 + grad4[gi1 + 2] * z1 + grad4[gi1 + 3] * w1);", + " }", + " let t2 = 0.6 - x2 * x2 - y2 * y2 - z2 * z2 - w2 * w2;", + " if (t2 < 0)", + " n2 = 0.0;", + " else {", + " const gi2 = (perm[ii + i2 + perm[jj + j2 + perm[kk + k2 + perm[ll + l2]]]] % 32) * 4;", + " t2 *= t2;", + " n2 = t2 * t2 * (grad4[gi2] * x2 + grad4[gi2 + 1] * y2 + grad4[gi2 + 2] * z2 + grad4[gi2 + 3] * w2);", + " }", + " let t3 = 0.6 - x3 * x3 - y3 * y3 - z3 * z3 - w3 * w3;", + " if (t3 < 0)", + " n3 = 0.0;", + " else {", + " const gi3 = (perm[ii + i3 + perm[jj + j3 + perm[kk + k3 + perm[ll + l3]]]] % 32) * 4;", + " t3 *= t3;", + " n3 = t3 * t3 * (grad4[gi3] * x3 + grad4[gi3 + 1] * y3 + grad4[gi3 + 2] * z3 + grad4[gi3 + 3] * w3);", + " }", + " let t4 = 0.6 - x4 * x4 - y4 * y4 - z4 * z4 - w4 * w4;", + " if (t4 < 0)", + " n4 = 0.0;", + " else {", + " const gi4 = (perm[ii + 1 + perm[jj + 1 + perm[kk + 1 + perm[ll + 1]]]] % 32) * 4;", + " t4 *= t4;", + " n4 = t4 * t4 * (grad4[gi4] * x4 + grad4[gi4 + 1] * y4 + grad4[gi4 + 2] * z4 + grad4[gi4 + 3] * w4);", + " }", + " // Sum up and scale the result to cover the range [-1,1]", + " return 27.0 * (n0 + n1 + n2 + n3 + n4);", + " };", + "}", + "", + "gdjs._cameraShakeExtension = {", + " noiseManager: new NoiseManager(),", + "};", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Generate a number from 2 dimensional simplex noise.", + "fullName": "2D noise", + "functionType": "Expression", + "name": "Noise2d", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "const x = eventsFunctionContext.getArgument(\"X\");\r", + "const y = eventsFunctionContext.getArgument(\"Y\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).noise(x, y);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + }, + { + "description": "X coordinate", + "name": "X", + "type": "expression" + }, + { + "description": "Y coordinate", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate a number from 3 dimensional simplex noise.", + "fullName": "3D noise", + "functionType": "Expression", + "name": "Noise3d", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "const x = eventsFunctionContext.getArgument(\"X\");\r", + "const y = eventsFunctionContext.getArgument(\"Y\");\r", + "const z = eventsFunctionContext.getArgument(\"Z\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).noise(x, y, z);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + }, + { + "description": "X coordinate", + "name": "X", + "type": "expression" + }, + { + "description": "Y coordinate", + "name": "Y", + "type": "expression" + }, + { + "description": "Z coordinate", + "name": "Z", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate a number from 4 dimensional simplex noise.", + "fullName": "4D noise", + "functionType": "Expression", + "name": "Noise4d", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "const x = eventsFunctionContext.getArgument(\"X\");\r", + "const y = eventsFunctionContext.getArgument(\"Y\");\r", + "const z = eventsFunctionContext.getArgument(\"Z\");\r", + "const w = eventsFunctionContext.getArgument(\"W\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).noise(x, y, z, w);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + }, + { + "description": "X coordinate", + "name": "X", + "type": "expression" + }, + { + "description": "Y coordinate", + "name": "Y", + "type": "expression" + }, + { + "description": "Z coordinate", + "name": "Z", + "type": "expression" + }, + { + "description": "W coordinate", + "name": "W", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Create a noise generator with default settings (frequency = 1, octaves = 1, persistence = 0.5, lacunarity = 2).", + "fullName": "Create a noise generator", + "functionType": "Action", + "name": "Create", + "private": true, + "sentence": "Create a noise generator named _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Delete a noise generator and loose its settings.", + "fullName": "Delete a noise generator", + "functionType": "Action", + "name": "Delete", + "private": true, + "sentence": "Delete _PARAM1_ noise generator", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.deleteGenerator(name);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Delete all noise generators and loose their settings.", + "fullName": "Delete all noise generators", + "functionType": "Action", + "name": "DeleteAll", + "private": true, + "sentence": "Delete all noise generators", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "gdjs._cameraShakeExtension.noiseManager.deleteAllGenerators();", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "The seed is a number used to generate the random noise. Setting the same seed will result in the same random noise generation. It's for example useful to generate the same world, by saving this seed value and reusing it later to generate again a world.", + "fullName": "Noise seed", + "functionType": "Action", + "name": "SetSeed", + "private": true, + "sentence": "Change the noise seed to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "gdjs._cameraShakeExtension.noiseManager.setSeed(eventsFunctionContext.getArgument(\"Seed\"));", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Seed", + "longDescription": "15 digits numbers maximum", + "name": "Seed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the looping period on X used for noise generation. The noise will wrap-around on X.", + "fullName": "Noise looping period on X", + "functionType": "Action", + "name": "SetLoopPeriodX", + "private": true, + "sentence": "Change the looping period on X of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).xLoopPeriod = eventsFunctionContext.getArgument(\"LoopPeriod\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Looping period on X", + "name": "LoopPeriod", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change the looping period on Y used for noise generation. The noise will wrap-around on Y.", + "fullName": "Noise looping period on Y", + "functionType": "Action", + "name": "SetLoopPeriodY", + "private": true, + "sentence": "Change the looping period on Y of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).yLoopPeriod = eventsFunctionContext.getArgument(\"LoopPeriod\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Looping period on Y", + "name": "LoopPeriod", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change the base frequency used for noise generation. A lower frequency will zoom in the noise.", + "fullName": "Noise base frequency", + "functionType": "Action", + "name": "SetFrequency", + "private": true, + "sentence": "Change the noise frequency of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).frequency = eventsFunctionContext.getArgument(\"Frequency\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Frequency", + "name": "Frequency", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change the number of octaves used for noise generation. It can be seen as layers of noise with different zoom.", + "fullName": "Noise octaves", + "functionType": "Action", + "name": "SetOctaves", + "private": true, + "sentence": "Change the number of noise octaves of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).octaves = eventsFunctionContext.getArgument(\"Octaves\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Octaves", + "name": "Octaves", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change the persistence used for noise generation. At its default value \"0.5\", it halves the noise amplitude at each octave.", + "fullName": "Noise persistence", + "functionType": "Action", + "name": "SetPersistence", + "private": true, + "sentence": "Change the noise persistence of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).persistence = eventsFunctionContext.getArgument(\"Persistence\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Persistence", + "name": "Persistence", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change the lacunarity used for noise generation. At its default value \"2\", it doubles the frequency at each octave.", + "fullName": "Noise lacunarity", + "functionType": "Action", + "name": "SetLacunarity", + "private": true, + "sentence": "Change the noise lacunarity of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).lacunarity = eventsFunctionContext.getArgument(\"Lacunarity\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Lacunarity", + "name": "Lacunarity", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "The seed used for noise generation.", + "fullName": "Noise seed", + "functionType": "Expression", + "name": "Seed", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.seed;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, "parameters": [], "objectGroups": [] + }, + { + "description": "The base frequency used for noise generation.", + "fullName": "Noise base frequency", + "functionType": "Expression", + "name": "Frequency", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).frequency;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "The number of octaves used for noise generation.", + "fullName": "Noise octaves number", + "functionType": "Expression", + "name": "Octaves", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).octaves;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "The persistence used for noise generation.", + "fullName": "Noise persistence", + "functionType": "Expression", + "name": "Persistence", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).persistence;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "The lacunarity used for noise generation.", + "fullName": "Noise lacunarity", + "functionType": "Expression", + "name": "Lacunarity", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).lacunarity;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] } ], "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/firing-patterns/firing-patterns.json b/examples/firing-patterns/firing-patterns.json index 3b6ea4306..a5e830745 100644 --- a/examples/firing-patterns/firing-patterns.json +++ b/examples/firing-patterns/firing-patterns.json @@ -1,13 +1,15 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "landscape", "packageName": "com.example.gamename", @@ -16,7 +18,6 @@ "scaleMode": "nearest", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Firing Patterns", "description": "Show how to fire bullets with different patterns.", @@ -55,7 +56,9 @@ "D8H" ], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -67,7 +70,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Background 1.png", "kind": "image", "metadata": "", @@ -80,7 +82,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Ship 4.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -89,7 +90,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Projectile 1.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -98,7 +98,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Yellow Button_Hovered.png", "kind": "image", "metadata": "", @@ -111,7 +110,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Yellow Button_Idle.png", "kind": "image", "metadata": "", @@ -124,7 +122,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Yellow Button_Pressed.png", "kind": "image", "metadata": "", @@ -136,10 +133,12 @@ "name": "Yellow Button_Pressed.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -158,13 +157,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.9296874999999998, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -201,12 +203,13 @@ }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "depth": 64, + "height": 106, "layer": "", "name": "YellowButton", "persistentUuid": "a82d6f45-b5cc-488a-912f-eb8749775971", - "width": 0, + "width": 106, "x": 515, "y": 358, "zOrder": 1, @@ -232,9 +235,9 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "d3ff83eed21b7cc4b17a214bba10f3a52913426ce586987c3ec3e791a250740c", "name": "Background", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -273,9 +276,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "d4275ec52e2a2bf5544d5777551420db4f9663f1cea00bdc8151b307c5cfdca1", "name": "Ship", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -378,18 +381,18 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "3af1a3fd809de5edf1fd2ffd33e37229c815197717f76d4174b128fa066b011b", "name": "Projectile", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [ { - "extraBorder": 32, "name": "DestroyOutside", - "type": "DestroyOutsideBehavior::DestroyOutside" + "type": "DestroyOutsideBehavior::DestroyOutside", + "extraBorder": 32 } ], "animations": [ @@ -428,8 +431,8 @@ { "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "YellowButton", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -439,9 +442,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 16, "TopPadding": 0, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "➔" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 96, @@ -475,6 +492,28 @@ "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": "➔", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "139;87;42" } }, "Pressed": { @@ -495,7 +534,6 @@ "italic": false, "name": "NewText", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -509,9 +547,51 @@ "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": "Pattern", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Background" + }, + { + "objectName": "Ship" + }, + { + "objectName": "Projectile" + }, + { + "objectName": "YellowButton" + }, + { + "objectName": "NewText" + } + ] + }, "events": [ { "colorB": 228, @@ -1128,9 +1208,16 @@ "ambientLightColorB": 7719808, "ambientLightColorG": 6068784, "ambientLightColorR": 7418304, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Background", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -1139,9 +1226,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 8064376, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -1159,10 +1253,38 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, { "name": "FireBullet", "type": "FireBullet::FireBullet" }, + { + "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": "TopDownMovement", "type": "TopDownMovementBehavior::TopDownMovementBehavior" @@ -1181,14 +1303,15 @@ "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.3", + "version": "2.1.1", "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.", + "A button that can be used for menus and most labelled buttons of a game. 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)." ], @@ -1203,8 +1326,39 @@ "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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -1220,62 +1374,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -1289,496 +1408,430 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ] - } - ], - "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": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "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::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "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": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "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": { - "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": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] }, - { - "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" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -1787,13 +1840,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -1803,50 +1855,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -1916,22 +2069,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" ] @@ -1966,11 +2117,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -2015,11 +2165,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -2064,11 +2213,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -2113,11 +2261,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -2139,11 +2286,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2188,11 +2334,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -2237,11 +2382,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2290,7 +2434,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -2321,8 +2465,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -2330,14 +2472,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -2346,9 +2501,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -2356,9 +2508,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -2366,9 +2515,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -2376,9 +2522,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -2388,10 +2531,314 @@ ], "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -2409,8 +2856,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown.", - "comment2": "" + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -2422,7 +2868,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -2434,7 +2880,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -2442,14 +2888,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()" ] }, { @@ -2477,64 +2933,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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Pressed", "=", - "2" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -2573,18 +2991,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": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -2622,8 +3069,7 @@ "textG": 0, "textR": 0 }, - "comment": "Show the right background accordingly to the new state.", - "comment2": "" + "comment": "Show the right background accordingly to the new state." }, { "type": "BuiltinCommonInstructions::Standard", @@ -2647,12 +3093,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -2687,10 +3134,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -2699,7 +3146,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -2707,7 +3154,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -2718,10 +3165,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -2745,10 +3192,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -2765,10 +3213,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -2797,12 +3246,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -2842,10 +3292,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -2874,12 +3325,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -2931,12 +3383,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -2968,127 +3421,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.", - "comment2": "" - }, - { - "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": [ @@ -3099,22 +3431,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -3336,6 +3653,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -3344,21 +3662,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -3372,54 +3682,18 @@ "type": "object" }, { - "description": "", - "name": "LabelText", + "description": "Text", + "name": "Value", "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, + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -3428,18 +3702,18 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -3451,12 +3725,11 @@ "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_", + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3464,107 +3737,27 @@ "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" + "value": "SetReturnString" }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" + "parameters": [ + "Labels.Text::Value()" + ] } ] } - ] + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { "description": "De/activate interactions with the button.", @@ -3578,10 +3771,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -3604,10 +3799,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -3681,169 +3878,445 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "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" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "LeftPadding" + "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": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "RightPadding" + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "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" - ], - "hidden": false, - "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": [], - "hidden": false, - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "value": "", + "type": "Choice", + "label": "", + "choices": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" } ], - "effects": [], - "behaviors": [ + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "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, + "lineHeight": 0, + "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" + } + ] + }, { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "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": "Tween", - "type": "Tween::TweenBehavior" + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": [] + } + ], + "editionSettings": [] } ] } @@ -3854,6 +4327,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Fire bullets", + "gdevelopVersion": "", "helpPath": "https://gdevelop.io/game-example/fire-bullet", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", @@ -3910,6 +4384,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -4002,8 +4478,7 @@ "textG": 0, "textR": 0 }, - "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\".", - "comment2": "" + "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\"." }, { "type": "BuiltinCommonInstructions::Standard", @@ -4066,8 +4541,7 @@ "textG": 0, "textR": 0 }, - "comment": "Subtract 1 from ammo (if not unlimited ammo)", - "comment2": "" + "comment": "Subtract 1 from ammo (if not unlimited ammo)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4219,8 +4693,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase heat (if needed)", - "comment2": "" + "comment": "Increase heat (if needed)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4261,8 +4734,7 @@ "textG": 0, "textR": 0 }, - "comment": "Check if this caused overheat", - "comment2": "" + "comment": "Check if this caused overheat" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4387,8 +4859,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect when reload is completed", - "comment2": "" + "comment": "Detect when reload is completed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4477,8 +4948,7 @@ "textG": 0, "textR": 0 }, - "comment": "Only reload the amount of ammo available", - "comment2": "" + "comment": "Only reload the amount of ammo available" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4871,8 +5341,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move temp variable to the next angle a bullet will be sent", - "comment2": "" + "comment": "Move temp variable to the next angle a bullet will be sent" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4983,8 +5452,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create bullet", - "comment2": "" + "comment": "Create bullet" }, { "type": "BuiltinCommonInstructions::Standard", @@ -5014,8 +5482,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move bullet (apply angle and bullet speed variances)", - "comment2": "" + "comment": "Move bullet (apply angle and bullet speed variances)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -5055,8 +5522,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add identifier variables (to enable advanced picking by users)", - "comment2": "" + "comment": "Add identifier variables (to enable advanced picking by users)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -5107,8 +5573,7 @@ "textG": 0, "textR": 0 }, - "comment": "Rotate newly created bullet, if needed", - "comment2": "" + "comment": "Rotate newly created bullet, if needed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -5148,8 +5613,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update statistics", - "comment2": "" + "comment": "Update statistics" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7623,8 +8087,7 @@ "textG": 0, "textR": 0 }, - "comment": "If Max Ammo is set, do not exceed the value", - "comment2": "" + "comment": "If Max Ammo is set, do not exceed the value" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8487,8 +8950,7 @@ "textG": 0, "textR": 0 }, - "comment": "Shots per reload must not be \"0\"", - "comment2": "" + "comment": "Shots per reload must not be \"0\"" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8696,18 +9158,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" }, @@ -8718,8 +9174,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], - "hidden": false, "name": "FiringArc" }, { @@ -8728,8 +9182,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" }, { @@ -8739,27 +9191,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" }, @@ -8769,8 +9212,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading", "group": "Reload", - "extraInformation": [], - "hidden": false, "name": "ShotsPerReload" }, { @@ -8780,27 +9221,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" }, @@ -8809,8 +9242,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" }, @@ -8818,9 +9249,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -8828,19 +9256,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" }, @@ -8848,19 +9270,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" }, @@ -8870,17 +9286,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" }, @@ -8888,10 +9299,7 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], - "hidden": false, "name": "AutomaticReloading" }, { @@ -8901,18 +9309,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" }, { @@ -8925,7 +9328,7 @@ "Linear", "Exponential" ], - "hidden": false, + "choices": [], "name": "ExponentialCoolingRate" }, { @@ -8934,7 +9337,6 @@ "label": "Layer the bullets are created on", "description": "Base layer by default", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -8942,9 +9344,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" }, @@ -8955,8 +9354,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" } ], @@ -8970,6 +9367,7 @@ "category": "", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "TopDownMovementWithTouch", @@ -8980,6 +9378,8 @@ "tags": [], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -9137,12 +9537,10 @@ "value": "", "type": "Behavior", "label": "Top-down movement", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], - "hidden": false, + "choices": [], "name": "TopDownMovement" }, { @@ -9150,10 +9548,6 @@ "type": "Number", "unit": "Pixel", "label": "Margin", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Margin" } ], @@ -9163,6 +9557,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/in-app-purchase/in-app-purchase.json b/examples/in-app-purchase/in-app-purchase.json index b108ebeb7..67d5c622f 100644 --- a/examples/in-app-purchase/in-app-purchase.json +++ b/examples/in-app-purchase/in-app-purchase.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "adaptWidth", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.6", "name": "In-App Purchase example", "description": "", @@ -84,7 +83,9 @@ ], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -96,7 +97,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Coin_Spin_1.png", "kind": "image", "metadata": "", @@ -109,7 +109,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Coin_Spin_2.png", "kind": "image", "metadata": "", @@ -122,7 +121,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Coin_Spin_3.png", "kind": "image", "metadata": "", @@ -135,7 +133,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Coin_Spin_4.png", "kind": "image", "metadata": "", @@ -148,7 +145,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/NoAds-1.png", "kind": "image", "metadata": "", @@ -157,7 +153,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/NoAds-2.png", "kind": "image", "metadata": "", @@ -166,7 +161,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Premium-1.png", "kind": "image", "metadata": "", @@ -175,7 +169,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Brown Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -188,7 +181,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Brown Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -201,7 +193,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Brown Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -224,8 +215,7 @@ "name": "CantoraOne-Regular.ttf" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -249,13 +239,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.8199999999999998, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -582,7 +575,9 @@ "text": " Premium\nsubscription", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "218;212;212" } }, @@ -623,7 +618,9 @@ "text": "Remove ads", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "218;212;212" } }, @@ -664,7 +661,9 @@ "text": "Buy coins", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "218;212;212" } }, @@ -705,7 +704,9 @@ "text": "00.00$", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 50, + "lineHeight": 0, "color": "218;212;212" } }, @@ -746,7 +747,9 @@ "text": "00.00$", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 50, + "lineHeight": 0, "color": "218;212;212" } }, @@ -787,7 +790,9 @@ "text": "00.00$", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 50, + "lineHeight": 0, "color": "218;212;212" } }, @@ -828,7 +833,9 @@ "text": "Premium: off", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 45, + "lineHeight": 0, "color": "245;166;35" } }, @@ -869,7 +876,9 @@ "text": "Ads: on", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 45, + "lineHeight": 0, "color": "245;166;35" } }, @@ -910,7 +919,9 @@ "text": "Coin: 44", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 45, + "lineHeight": 0, "color": "245;166;35" } }, @@ -1109,6 +1120,7 @@ "assetStoreId": "d7de738069817891a6c233618dc4fe00463738543c80009e9ef75684d5f6e8fd", "name": "BuyCoinButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Brown Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1118,9 +1130,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Buy Coins" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -1172,7 +1198,9 @@ "text": "Buy Coins", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1192,6 +1220,7 @@ "assetStoreId": "d7de738069817891a6c233618dc4fe00463738543c80009e9ef75684d5f6e8fd", "name": "BuySubscriptionButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Brown Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1201,9 +1230,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Buy Subscription" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -1255,7 +1298,9 @@ "text": "Buy Subscription", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1275,6 +1320,7 @@ "assetStoreId": "d7de738069817891a6c233618dc4fe00463738543c80009e9ef75684d5f6e8fd", "name": "RemoveAdsButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Brown Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1284,9 +1330,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Remove Ads" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -1338,7 +1398,9 @@ "text": "Remove Ads", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1358,6 +1420,7 @@ "assetStoreId": "d7de738069817891a6c233618dc4fe00463738543c80009e9ef75684d5f6e8fd", "name": "UseCoinButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Brown Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1367,9 +1430,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Use Coins" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -1421,7 +1498,9 @@ "text": "Use Coins", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2445,6 +2524,7 @@ "ambientLightColorB": 0, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -2509,6 +2589,7 @@ "category": "Ads", "extensionNamespace": "", "fullName": "Mobile In-App Purchase (experimental)", + "gdevelopVersion": "", "helpPath": "/extensions/in-app-purchase/setup", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBkPSJNMjcsMTBINmMtMS4xLDAtMi0wLjktMi0yczAuOS0yLDItMmg0YzAuNiwwLDEtMC40LDEtMXMtMC40LTEtMS0xSDZDMy44LDQsMiw1LjgsMiw4djE2YzAsMi4yLDEuOCw0LDQsNGgyMQ0KCQljMS43LDAsMy0xLjMsMy0zVjEzQzMwLDExLjMsMjguNywxMCwyNywxMHogTTI4LDE1Ljh2Ni40Yy0wLjMtMC4xLTAuNi0wLjItMS0wLjJoLTRjLTEuNywwLTMtMS4zLTMtM3MxLjMtMywzLTNoNA0KCQlDMjcuNCwxNiwyNy43LDE1LjksMjgsMTUuOHoiLz4NCgk8cGF0aCBkPSJNNyw3QzYuNCw3LDYsNy40LDYsOHMwLjQsMSwxLDFoNGMwLDAsMCwwLDAsMHMwLDAsMCwwaDE1YzAuMywwLDAuNi0wLjIsMC44LTAuNGMwLjItMC4zLDAuMi0wLjYsMC4xLTAuOWwtMi01DQoJCWMtMC4yLTAuNS0wLjgtMC44LTEuMy0wLjZMMTAuOCw3SDd6Ii8+DQoJPHBhdGggZD0iTTI1LDE4aC0yYy0wLjYsMC0xLDAuNC0xLDFzMC40LDEsMSwxaDJjMC42LDAsMS0wLjQsMS0xUzI1LjYsMTgsMjUsMTh6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==", "name": "InAppPurchase", @@ -2851,14 +2932,15 @@ "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.1.1", "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.", + "A button that can be used for menus and most labelled buttons of a game. 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)." ], @@ -2873,10 +2955,39 @@ "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": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -2892,61 +3003,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "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\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -2960,509 +3037,369 @@ "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" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "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::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "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" - ] - } - ], + "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": "BuiltinCommonInstructions::Or" + "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": [], - "subInstructions": [ + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "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": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "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\"" - ] - } - ] + "parameters": [] }, { - "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" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Hovered\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Idle\"" ] } ] @@ -3472,51 +3409,227 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "MouseIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"Hovered\"" ] } ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [] - } + }, + { + "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": [ { @@ -3585,22 +3698,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" ] @@ -3635,11 +3746,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3684,11 +3794,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -3733,11 +3842,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3782,11 +3890,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3808,11 +3915,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3857,11 +3963,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3906,11 +4011,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3959,7 +4063,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -3990,8 +4094,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -3999,14 +4101,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -4015,9 +4130,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -4025,9 +4137,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -4035,9 +4144,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -4045,9 +4151,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -4057,40 +4160,344 @@ ], "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", - "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, + "lineHeight": 0, + "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": [ + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": [] + } + ], + "editionSettings": [], + "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", + "Hovered", "0", "0", "" @@ -4102,7 +4509,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -4110,14 +4517,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()" ] }, { @@ -4145,63 +4562,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" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -4240,18 +4620,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": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -4313,12 +4722,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -4353,10 +4763,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -4365,7 +4775,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -4373,7 +4783,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -4384,10 +4794,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -4411,10 +4821,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -4431,10 +4842,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -4463,12 +4875,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -4508,10 +4921,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -4540,12 +4954,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -4597,12 +5012,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -4634,163 +5050,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" @@ -5001,6 +5282,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -5009,21 +5291,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -5038,17 +5312,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": [ { @@ -5057,18 +5331,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -5080,12 +5354,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", @@ -5093,17 +5366,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -5116,65 +5389,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" ] } ] @@ -5184,10 +5427,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -5195,12 +5440,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -5212,126 +5457,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" + "Labels", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -5350,198 +5592,374 @@ ], "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", - "extraInformation": [ - "Label" + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.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": [ + "variants": [ { - "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 + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d7de738069817891a6c233618dc4fe00463738543c80009e9ef75684d5f6e8fd", + "assetStoreOriginalName": "Brown Button With Shadow", + "name": "Brown 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, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Brown 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": "Brown 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": "Brown 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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - "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" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [], - "behaviors": [ + "layers": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] - }, - { - "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": "e070ac21-1a34-4e10-a4d6-8c986ee6235a", + "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": [] + ], + "editionSettings": [] } - ], - "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/marching-squares-island-generator/marching-squares-island-generator.json b/examples/marching-squares-island-generator/marching-squares-island-generator.json index dc846a610..806a7423e 100644 --- a/examples/marching-squares-island-generator/marching-squares-island-generator.json +++ b/examples/marching-squares-island-generator/marching-squares-island-generator.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Island Generator", "description": "", @@ -55,7 +54,9 @@ ], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -67,7 +68,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/EnableNoiseButton.png", "kind": "image", "metadata": "", @@ -76,7 +76,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/DisableNoiseButton.png", "kind": "image", "metadata": "", @@ -85,7 +84,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/RerollTerrainButton.png", "kind": "image", "metadata": "", @@ -94,7 +92,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/RerollIslandButton.png", "kind": "image", "metadata": "", @@ -103,7 +100,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/EnableConstraintButton.png", "kind": "image", "metadata": "", @@ -112,7 +108,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/DisableConstraintButton.png", "kind": "image", "metadata": "", @@ -120,8 +115,7 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -145,13 +139,16 @@ "gridType": "rectangular", "gridWidth": 48, "gridHeight": 48, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 0.6533333534240722, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -520,19 +517,19 @@ "fillOpacity": 255, "outlineSize": 0, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none", "fillColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 + "b": 0 }, "outlineColor": { - "b": 35, + "r": 245, "g": 166, - "r": 245 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": false, - "antialiasing": "none" + "b": 35 + } }, { "assetStoreId": "", @@ -558,19 +555,19 @@ "fillOpacity": 255, "outlineSize": 0, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": false, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -591,19 +588,19 @@ "fillOpacity": 255, "outlineSize": 0, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none", "fillColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 + "b": 0 }, "outlineColor": { - "b": 35, + "r": 245, "g": 166, - "r": 245 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": false, - "antialiasing": "none" + "b": 35 + } }, { "assetStoreId": "", @@ -624,19 +621,19 @@ "fillOpacity": 255, "outlineSize": 0, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none", "fillColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 + "b": 0 }, "outlineColor": { - "b": 35, + "r": 245, "g": 166, - "r": 245 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": false, - "antialiasing": "none" + "b": 35 + } }, { "adaptCollisionMaskAutomatically": false, @@ -779,7 +776,9 @@ "text": "", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -820,7 +819,9 @@ "text": "Click to evaluate the height and normal", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -861,7 +862,9 @@ "text": "There is neither noise nor island shapes.\n Press one of the first two buttons.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -869,6 +872,7 @@ "assetStoreId": "", "name": "ToogleNoiseButton", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Noise toggle", "variables": [], "effects": [], "behaviors": [], @@ -943,7 +947,9 @@ { "assetStoreId": "", "name": "ToogleConstraintButton", + "persistentUuid": "bf12dde2-dbc3-467f-b576-365fcba821b5", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Constraint toggle", "variables": [], "effects": [], "behaviors": [], @@ -1904,6 +1910,7 @@ "ambientLightColorB": 32, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -1932,6 +1939,7 @@ "ambientLightColorB": 12, "ambientLightColorG": 6023776, "ambientLightColorR": 7798800, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -1949,6 +1957,7 @@ "ambientLightColorB": 12, "ambientLightColorG": 6026736, "ambientLightColorR": 8002696, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -2006,7 +2015,6 @@ "externalEvents": [ { "associatedLayout": "IslandGenerator", - "lastChangeTimeStamp": 0, "name": "IslandPositioning", "events": [ { @@ -2179,7 +2187,6 @@ }, { "associatedLayout": "IslandGenerator", - "lastChangeTimeStamp": 0, "name": "GenerateTerrain", "events": [ { @@ -2586,12 +2593,13 @@ "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.1.0", + "version": "1.3.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -2620,6 +2628,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -2631,7 +2641,7 @@ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -2660,11 +2670,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -2673,11 +2682,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -2711,12 +2719,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -2726,11 +2734,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -2747,12 +2756,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -2775,12 +2784,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -2790,11 +2799,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -2805,20 +2813,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": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -2850,11 +2858,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -2876,31 +2883,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": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -2916,22 +2922,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -2942,11 +2946,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -2961,11 +2964,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -2994,20 +2996,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3016,11 +3018,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3032,20 +3033,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3054,11 +3055,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3071,20 +3071,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3093,11 +3093,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3109,20 +3108,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3131,11 +3130,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3163,18 +3161,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -3186,11 +3183,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3199,11 +3195,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -3216,11 +3211,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3228,11 +3222,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -3241,11 +3234,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3328,22 +3320,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -3378,11 +3368,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3427,11 +3416,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -3476,11 +3464,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3525,11 +3512,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3551,11 +3537,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3600,11 +3585,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3649,11 +3633,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3702,7 +3685,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -3733,8 +3716,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -3742,14 +3723,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -3758,9 +3752,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -3768,9 +3759,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -3778,9 +3766,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -3788,9 +3773,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -3820,7 +3802,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] }, @@ -3831,7 +3813,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -3842,7 +3824,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -3890,7 +3872,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "no" ] }, @@ -3901,7 +3883,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -3912,7 +3894,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -3923,11 +3905,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "!=", "\"\"" ] @@ -3951,7 +3932,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] } @@ -3962,11 +3943,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "!=", "\"\"" ] @@ -3990,7 +3970,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "yes" ] } @@ -4001,11 +3981,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "!=", "\"\"" ] @@ -4029,7 +4008,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "yes" ] } @@ -4071,7 +4050,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleEffect()" + "IdleEffect" ] } ] @@ -4108,13 +4087,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4152,7 +4130,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedEffect()" + "FocusedEffect" ] } ] @@ -4189,13 +4167,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4233,7 +4210,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedEffect()" + "PressedEffect" ] } ] @@ -4270,13 +4247,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4303,31 +4279,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -4336,16 +4308,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" } ], @@ -4355,7 +4324,7 @@ "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", "name": "ButtonAnimationName", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -4375,7 +4344,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -4385,7 +4354,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4435,7 +4403,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -4463,7 +4431,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -4491,7 +4459,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -4504,7 +4472,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4533,7 +4500,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -4546,7 +4513,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4571,13 +4537,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4587,7 +4552,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4616,7 +4580,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -4629,7 +4593,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4654,13 +4617,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4670,7 +4632,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4699,7 +4660,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -4712,7 +4673,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4737,13 +4697,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4753,7 +4712,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4767,24 +4725,31 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "choices": [], + "name": "Animation" + }, { "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -4793,16 +4758,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" } ], @@ -4826,13 +4788,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -4883,11 +4844,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -4896,11 +4856,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -4912,7 +4871,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleValue()", + "IdleValue", "" ] } @@ -4939,11 +4898,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -4952,11 +4910,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -4968,7 +4925,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -4979,11 +4936,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -4992,11 +4948,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -5008,7 +4963,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -5031,11 +4986,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -5044,11 +4998,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -5060,7 +5013,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedValue()", + "PressedValue", "" ] } @@ -5083,11 +5036,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] @@ -5101,8 +5053,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeInDuration()", - "Object.Behavior::PropertyFadeInEasing()", + "FadeInDuration", + "FadeInEasing", "" ] } @@ -5113,11 +5065,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] @@ -5131,8 +5082,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeOutDuration()", - "Object.Behavior::PropertyFadeOutEasing()", + "FadeOutDuration", + "FadeOutEasing", "" ] } @@ -5210,46 +5161,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -5288,46 +5235,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -5365,37 +5308,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "<", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Tween::Ease(GetArgumentAsString(\"Easing\"), Object.Behavior::PropertyTweenInitialValue(), Object.Behavior::PropertyTweenTargetedValue(), Object.Behavior::PropertyTweenTime() / GetArgumentAsNumber(\"Duration\"))" + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] } ] @@ -5405,37 +5345,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", ">=", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"NoTween\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyTweenTargetedValue()" + "TweenTargetedValue" ] } ] @@ -5451,9 +5388,9 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyEffectName()", - "Object.Behavior::PropertyEffectProperty()", - "Object.Behavior::PropertyEffectValue()" + "EffectName", + "EffectProperty", + "EffectValue" ] } ] @@ -5502,7 +5439,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectName()" + "EffectName" ] } ] @@ -5543,7 +5480,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectProperty()" + "EffectProperty" ] } ] @@ -5582,24 +5519,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", - "GetArgumentAsString(\"Value\")" + "NewEffectName" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", - "GetArgumentAsString(\"Value\")" + "NewPropertyName" ] } ] @@ -5619,12 +5554,12 @@ }, { "description": "Effect name", - "name": "EffectName", + "name": "NewEffectName", "type": "string" }, { "description": "Parameter name", - "name": "PropertyName", + "name": "NewPropertyName", "type": "string" } ], @@ -5647,7 +5582,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -5684,13 +5619,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -5728,7 +5662,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedValue()" + "FocusedValue" ] } ] @@ -5765,13 +5699,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -5809,7 +5742,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedValue()" + "PressedValue" ] } ] @@ -5846,13 +5779,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -5890,7 +5822,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -5928,13 +5860,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -5972,7 +5903,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -6010,13 +5941,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -6054,7 +5984,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -6091,13 +6021,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -6135,7 +6064,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -6172,13 +6101,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -6205,31 +6133,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -6238,16 +6162,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" }, { @@ -6256,112 +6177,303 @@ "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", - "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", - "description": "", - "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", - "description": "", "group": "Speed", - "extraInformation": [], + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeOutEasing" + }, + { + "value": "0.125", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", "name": "FadeInDuration" }, { @@ -6369,21 +6481,26 @@ "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" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -6392,9 +6509,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -6402,9 +6516,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -6412,9 +6523,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -6422,12 +6530,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -6436,9 +6551,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -6449,7 +6561,7 @@ "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", "name": "ButtonScaleTween", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -6469,7 +6581,7 @@ "Object", "Scale", "=", - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -6479,7 +6591,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6521,11 +6632,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -6534,11 +6644,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -6550,7 +6659,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleScale()", + "IdleScale", "" ] } @@ -6577,11 +6686,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -6590,11 +6698,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -6606,7 +6713,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -6617,11 +6724,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -6630,11 +6736,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -6646,7 +6751,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -6669,11 +6774,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -6682,11 +6786,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -6698,7 +6801,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedScale()", + "PressedScale", "" ] } @@ -6712,7 +6815,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6743,10 +6845,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -6758,7 +6860,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6794,10 +6895,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -6809,7 +6910,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6843,7 +6943,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -6856,7 +6956,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6881,13 +6980,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -6897,7 +6995,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6926,7 +7023,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedScale()" + "FocusedScale" ] } ] @@ -6939,7 +7036,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6964,13 +7060,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -6980,7 +7075,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7009,7 +7103,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedScale()" + "PressedScale" ] } ] @@ -7022,7 +7116,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7047,13 +7140,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -7063,7 +7155,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7092,7 +7183,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -7105,7 +7196,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7130,13 +7220,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -7146,7 +7235,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7175,7 +7263,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -7188,7 +7276,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7213,13 +7300,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -7229,7 +7315,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7258,7 +7343,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -7272,7 +7357,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7297,13 +7381,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -7313,7 +7396,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7342,7 +7424,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -7356,7 +7438,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7381,13 +7462,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -7397,7 +7477,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7411,26 +7490,34 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "choices": [], + "name": "Scale" + }, { "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -7438,9 +7525,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -7450,7 +7535,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -7458,9 +7542,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -7468,9 +7550,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -7478,126 +7558,327 @@ "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", - "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", - "description": "", "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": [ - "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": [ + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "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": [], @@ -7608,7 +7889,7 @@ }, "parameters": [ "Object", - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -7660,11 +7941,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -7673,11 +7953,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -7689,7 +7968,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleColorTint()", + "IdleColorTint", "" ] } @@ -7716,11 +7995,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -7729,11 +8007,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -7745,7 +8022,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -7756,11 +8033,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -7769,11 +8045,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -7785,7 +8060,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -7808,11 +8083,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -7821,11 +8095,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -7837,7 +8110,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedColorTint()", + "PressedColorTint", "" ] } @@ -7882,9 +8155,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -7932,9 +8205,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -7980,7 +8253,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -8018,13 +8291,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8063,7 +8335,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedColorTint()" + "FocusedColorTint" ] } ] @@ -8101,13 +8373,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8146,7 +8417,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedColorTint()" + "PressedColorTint" ] } ] @@ -8184,13 +8455,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8229,7 +8499,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -8267,13 +8537,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8312,7 +8581,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -8350,13 +8619,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8395,7 +8663,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -8434,13 +8702,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8479,7 +8746,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -8518,13 +8785,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8552,31 +8818,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -8585,16 +8847,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" }, { @@ -8602,9 +8861,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -8612,150 +8869,383 @@ "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", - "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", - "description": "", "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": [ - "Idle", - "Focused", - "Pressed" - ], - "hidden": true, - "name": "PreviousState" - } - ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "User interface", - "extensionNamespace": "", - "fullName": "Toggle switch", - "helpPath": "/objects/toggle-switch", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", - "name": "SpriteToggleSwitch", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", - "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.3.1", - "description": [ - "Toggle switch that users can click or touch. The switch can be customized with sprites.", - "", - "There are ready-to-use toggle switches in the asset-store [settings UI pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=settings-ui-settings-ui)." - ], - "origin": { - "identifier": "SpriteToggleSwitch", - "name": "gdevelop-extension-store" - }, - "tags": [ - "ui", - "widget", - "toggle", - "switch", - "check box" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } + ], + "hidden": true, + "name": "PreviousState" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Toggle switch", + "gdevelopVersion": ">=5.5.230", + "helpPath": "/objects/toggle-switch", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", + "name": "SpriteToggleSwitch", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", + "shortDescription": "Toggle switch that users can click or touch.", + "version": "2.0.2", + "description": [ + "Toggle switch that users can click or touch. The switch can be customized with sprites.", + "", + "There are ready-to-use toggle switches in the asset-store [settings UI pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=settings-ui-settings-ui)." + ], + "origin": { + "identifier": "SpriteToggleSwitch", + "name": "gdevelop-extension-store" + }, + "tags": [ + "ui", + "widget", + "toggle", + "switch", + "check box" ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Toggle switches now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing toggle switches 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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the switch object.", @@ -8776,12 +9266,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "WasChecked", + "False", + "" ] } ] @@ -8803,12 +9293,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "WasChecked", + "True", + "" ] } ] @@ -8830,11 +9320,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::TogglePropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "Toggle", + "" ] } ] @@ -8867,11 +9358,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] } ], @@ -8914,21 +9406,23 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -8972,20 +9466,22 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -9096,119 +9592,70 @@ "name": "SetChecked", "sentence": "Check _PARAM0_: _PARAM2_", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Avoid a started touch to interfere with a state change from events." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "BooleanVariable" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - } + "parameters": [ + "Value", + "False", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "ButtonFSM", + "IsChecked", + "False", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - } ], - "actions": [ + "events": [ { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" + "comment": "Avoid a started touch to interfere with a state change from events." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } ] } ] @@ -9218,22 +9665,54 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsChecked", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } ] } ] @@ -9274,11 +9753,11 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousIsChecked", + "False", "" ] } @@ -9301,12 +9780,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -9316,11 +9795,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousIsChecked", + "True", + "" ] } ], @@ -9344,11 +9824,12 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousIsChecked", + "True", + "" ] } ], @@ -9388,38 +9869,29 @@ "value": "", "type": "Behavior", "label": "Button finite state machine", - "description": "", - "group": "", "extraInformation": [ "SpriteToggleSwitch::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "false", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], "name": "IsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], + "hidden": true, "name": "PreviousIsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WasChecked" } @@ -9440,61 +9912,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "SpriteToggleSwitch::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -9508,509 +9946,406 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "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::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "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\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ] @@ -10021,49 +10356,188 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "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": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -10132,22 +10606,20 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -10182,11 +10654,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -10231,11 +10702,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -10280,11 +10750,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -10329,11 +10798,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -10355,11 +10823,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10404,11 +10871,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -10453,11 +10919,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10506,7 +10971,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -10537,8 +11002,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -10546,14 +11009,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -10562,9 +11038,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -10572,9 +11045,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -10582,9 +11052,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -10592,9 +11059,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -10604,47 +11068,137 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "ToggleSwitch", "description": "A toggle switch that users can click or touch.", "fullName": "Toggle switch", + "isUsingLegacyInstancesRenderer": false, "name": "SpriteToggleSwitch", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": 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." + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "State", - "0", - "0", - "" - ] + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] } ] }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -10662,10 +11216,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] } ], @@ -10683,11 +11239,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -10697,11 +11254,12 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] } ], @@ -10719,10 +11277,11 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", + "PreviousIsChecked", + "False", "" ] } @@ -10790,20 +11349,21 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "False", "" ] } @@ -10821,11 +11381,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -10835,20 +11396,21 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "True", "" ] } @@ -10866,11 +11428,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "PreviousIsChecked", + "False", + "" ] } ] @@ -11103,10 +11666,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -11129,10 +11694,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -11382,7 +11949,6 @@ "fullName": "Is pressed", "functionType": "Condition", "name": "IsPressed", - "private": true, "sentence": "_PARAM0_ is pressed", "events": [ { @@ -11421,6 +11987,49 @@ ], "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": "SpriteToggleSwitch::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Update the state animation.", "fullName": "Update state animation", @@ -11539,10 +12148,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -11565,10 +12176,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -11649,9 +12262,6 @@ "value": "true", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], "name": "IsChecked" }, { @@ -11659,74 +12269,433 @@ "type": "Boolean", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousIsChecked" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "State", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false + "variants": [ + { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Constraint toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, + { + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\DisableConstraintButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\EnableConstraintButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + } + ] } ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 10.9375, + "windowMask": false, + "selectedLayer": "" + } + }, + { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Noise toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ + ], + "animations": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\DisableNoiseButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\EnableNoiseButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] } ] } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "State" + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 10.9375, + "windowMask": false, + "selectedLayer": "" } - ] - } + } + ] } ] }, @@ -11735,6 +12704,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Extended math support", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZ1bmN0aW9uLXZhcmlhbnQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNDIsNS4yOUMxMS4zMiw1LjE5IDEwLjM1LDYgMTAuMjUsNy4xMUwxMCwxMEgxMi44MlYxMkg5LjgyTDkuMzgsMTcuMDdDOS4xOCwxOS4yNyA3LjI0LDIwLjkgNS4wNCwyMC43QzMuNzksMjAuNTkgMi42NiwxOS45IDIsMTguODNMMy41LDE3LjMzQzMuODMsMTguMzggNC45NiwxOC45NyA2LDE4LjYzQzYuNzgsMTguMzkgNy4zMywxNy43IDcuNCwxNi44OUw3LjgyLDEySDQuODJWMTBIOEw4LjI3LDYuOTNDOC40Niw0LjczIDEwLjM5LDMuMSAxMi42LDMuMjhDMTMuODYsMy4zOSAxNSw0LjA5IDE1LjY2LDUuMTdMMTQuMTYsNi42N0MxMy45MSw1LjkgMTMuMjMsNS4zNiAxMi40Miw1LjI5TTIyLDEzLjY1TDIwLjU5LDEyLjI0TDE3Ljc2LDE1LjA3TDE0LjkzLDEyLjI0TDEzLjUsMTMuNjVMMTYuMzUsMTYuNUwxMy41LDE5LjMxTDE0LjkzLDIwLjcyTDE3Ljc2LDE3Ljg5TDIwLjU5LDIwLjcyTDIyLDE5LjMxTDE5LjE3LDE2LjVMMjIsMTMuNjVaIiAvPjwvc3ZnPg==", "name": "ExtendedMath", @@ -11778,6 +12748,8 @@ "dt0tRnf2kHWJnjkrpnzTzNj9Yc63" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Returns a term from the Fibonacci sequence.", @@ -12654,6 +13626,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Noise generator", + "gdevelopVersion": "", "helpPath": "/tutorials/procedural-generation", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNwcmlua2xlciIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMSA3SDEzVjlIMTFWN001IDIySDlWMTBINVYyMk0xNCAxMUgxNlY5SDE0VjExTTE3IDEwSDE5VjhIMTdWMTBNMTcgNVY3SDE5VjVIMTdNMTQgOEgxNlY2SDE0VjhNMTcgMTNIMTlWMTFIMTdWMTNNNSA3SDUuMzNMNiA5SDhMOC42NyA3SDlWNkg1VjdaIiAvPjwvc3ZnPg==", "name": "Noise", @@ -12689,6 +13662,8 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "fullName": "", @@ -14147,6 +15122,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Color Conversion", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWludmVydC1jb2xvcnMiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsMTkuNThWMTkuNThDMTAuNCwxOS41OCA4Ljg5LDE4Ljk2IDcuNzYsMTcuODNDNi42MiwxNi42OSA2LDE1LjE5IDYsMTMuNThDNiwxMiA2LjYyLDEwLjQ3IDcuNzYsOS4zNEwxMiw1LjFNMTcuNjYsNy45M0wxMiwyLjI3VjIuMjdMNi4zNCw3LjkzQzMuMjIsMTEuMDUgMy4yMiwxNi4xMiA2LjM0LDE5LjI0QzcuOSwyMC44IDkuOTUsMjEuNTggMTIsMjEuNThDMTQuMDUsMjEuNTggMTYuMSwyMC44IDE3LjY2LDE5LjI0QzIwLjc4LDE2LjEyIDIwLjc4LDExLjA1IDE3LjY2LDcuOTNaIiAvPjwvc3ZnPg==", "name": "ColorConversion", @@ -14177,6 +15153,8 @@ "onPsboRtDkUHNOsx7OPr8R8G1oj2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Converts a hexadecimal string into a RGB string. Example input: \"0459AF\".", @@ -15161,12 +16139,13 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Marching Squares (experimental)", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/marching-squares/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXBlYW51dC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDIzQzExLjUzIDIzIDExLjA3IDIyLjk1IDEwLjYxIDIyLjg1QzcuMSAyMi4xIDQuODcgMTguNjQgNS42MiAxNS4xM0M1Ljg3IDEzLjk1IDYuNDUgMTIuODcgNy4yOCAxMkM3LjYyIDExLjY0IDcuNjIgMTEuMDggNy4yOCAxMC43MkM1LjIgOC4xNCA1LjYgNC4zNiA4LjE4IDIuMjhTMTQuNTQuNjA3IDE2LjYyIDMuMTlDMTguMzkgNS4zOCAxOC4zOSA4LjUgMTYuNjIgMTAuNzJDMTYuMzMgMTEuMTMgMTYuMzcgMTEuNyAxNi43MiAxMi4wNkMxOS4xNyAxNC42OCAxOS4wNCAxOC44IDE2LjQxIDIxLjI1QzE1LjIyIDIyLjM3IDEzLjY0IDIzIDEyIDIzTTEyIDNDMTEuMDkgMyAxMC4yIDMuMzEgOS41IDMuODlDOC41NSA0LjY1IDggNS43OSA4IDdDOCA3LjkxIDguMzEgOC43OSA4Ljg4IDkuNUM5Ljg0IDEwLjY0IDkuNzcgMTIuMzMgOC43MyAxMy40MUM3LjAzIDE1LjIyIDcuMTMgMTguMDcgOC45NCAxOS43N1MxMy42IDIxLjM4IDE1LjMgMTkuNTZDMTYuOTIgMTcuODMgMTYuOTIgMTUuMTQgMTUuMyAxMy40MUMxNC4yMyAxMi4zMiAxNC4xNSAxMC42IDE1LjEyIDkuNDFDMTYuNSA3LjY5IDE2LjIyIDUuMTcgMTQuNSAzLjc5QzE0IDMuNDEgMTMuNDcgMy4xNCAxMi44OCAzQzEyLjU5IDMgMTIuMjkgMyAxMiAzTTEyIDZDMTIgNi41NSAxMi40NSA3IDEzIDdTMTQgNi41NSAxNCA2IDEzLjU1IDUgMTMgNSAxMiA1LjQ1IDEyIDZNMTQgMTlDMTQuNTUgMTkgMTUgMTguNTUgMTUgMThTMTQuNTUgMTcgMTQgMTcgMTMgMTcuNDUgMTMgMTggMTMuNDUgMTkgMTQgMTlNMTMgMTZDMTMuNTUgMTYgMTQgMTUuNTUgMTQgMTVTMTMuNTUgMTQgMTMgMTQgMTIgMTQuNDUgMTIgMTUgMTIuNDUgMTYgMTMgMTZNMTEgMThDMTEuNTUgMTggMTIgMTcuNTUgMTIgMTdTMTEuNTUgMTYgMTEgMTYgMTAgMTYuNDUgMTAgMTcgMTAuNDUgMTggMTEgMThaIiAvPjwvc3ZnPg==", "name": "MarchingSquares", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/peanut-outline.svg", "shortDescription": "Allow to build a \"scalar field\" and draw contour lines of it: useful for fog of wars, liquid effects, paint the ground, etc...", - "version": "0.5.7", + "version": "0.6.0", "description": [ "It can be helpful for:", " * Liquid effects like water, blobs or lava ([open the project online](https://editor.gdevelop.io/?project=example://marching-squares-liquids))", @@ -15193,6 +16172,8 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Define the scalar field painter library JavaScript code.", @@ -16797,24 +17778,22 @@ "conditions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::PropertyAreaRightBound" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaRightBound", "<=", - "Object.Behavior::PropertyAreaLeftBound()" + "AreaLeftBound" ] } ], "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaRightBound" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaRightBound", "=", "Object.Behavior::AreaLeft() + SceneWindowWidth()" ] @@ -16826,26 +17805,24 @@ "conditions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::PropertyAreaBottomBound" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaBottomBound", "<=", - "Object.Behavior::PropertyAreaTopBound()" + "AreaTopBound" ] } ], "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaBottomBound" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaBottomBound", "=", - "Object.Behavior::PropertyAreaBottomBound() + SceneWindowHeight()" + "AreaBottomBound + SceneWindowHeight()" ] } ] @@ -17456,7 +18433,7 @@ "functionType": "Action", "group": "Field painting", "name": "AddLine", - "sentence": "Add a line to the field of _PARAM0_ fom _PARAM2_ ; _PARAM3_ to _PARAM4_ ; _PARAM5_ with thickness: _PARAM6_ using: _PARAM8_", + "sentence": "Add a line to the field of _PARAM0_ from _PARAM2_ ; _PARAM3_ to _PARAM4_ ; _PARAM5_ with thickness: _PARAM6_ using: _PARAM8_", "events": [ { "type": "BuiltinCommonInstructions::JsCode", @@ -17539,7 +18516,7 @@ "functionType": "Action", "group": "Field painting", "name": "MaskLine", - "sentence": "Mask a line on the field of _PARAM0_ fom _PARAM2_ ; _PARAM3_ to _PARAM4_ ; _PARAM5_ with thickness: _PARAM6_", + "sentence": "Mask a line on the field of _PARAM0_ from _PARAM2_ ; _PARAM3_ to _PARAM4_ ; _PARAM5_ with thickness: _PARAM6_", "events": [ { "type": "BuiltinCommonInstructions::JsCode", @@ -17795,13 +18772,12 @@ "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyCellWidth" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CellWidth", "=", - "GetArgumentAsNumber(\"CellWidth\")" + "Value" ] }, { @@ -17832,7 +18808,7 @@ }, { "description": "Value", - "name": "CellWidth", + "name": "Value", "type": "expression" } ], @@ -17852,13 +18828,12 @@ "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyCellHeight" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CellHeight", "=", - "GetArgumentAsNumber(\"CellHeight\")" + "Value" ] }, { @@ -17889,7 +18864,7 @@ }, { "description": "Value", - "name": "CellHeight", + "name": "Value", "type": "expression" } ], @@ -17960,12 +18935,12 @@ "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyFillOutside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=" + "FillOutside", + "False", + "" ] } ] @@ -17975,22 +18950,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FillOutside\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyFillOutside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FillOutside", + "True", + "" ] } ] @@ -18011,7 +18988,7 @@ }, { "description": "Fill outside?", - "name": "FillOutside", + "name": "Value", "type": "yesorno" } ], @@ -18031,13 +19008,12 @@ "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyThreshold" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Threshold", "=", - "GetArgumentAsNumber(\"Threshold\")" + "Value" ] } ] @@ -18058,7 +19034,7 @@ }, { "description": "Value", - "name": "Threshold", + "name": "Value", "type": "expression" } ], @@ -18078,46 +19054,52 @@ "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaLeftBound" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaLeftBound", "=", - "GetArgumentAsNumber(\"LeftBound\")" + "LeftBound" ] }, { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaTopBound" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaTopBound", "=", - "GetArgumentAsNumber(\"TopBound\")" + "TopBound" ] }, { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaRightBound" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaRightBound", + "=", + "RightBound" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AreaBottomBound", "=", - "GetArgumentAsNumber(\"RightBound\")" + "BottomBound" ] }, { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaBottomBound" + "value": "MarchingSquares::MarchingSquaresBehavior::RebuildField" }, "parameters": [ "Object", "Behavior", - "=", - "GetArgumentAsNumber(\"BottomBound\")" + "" ] } ] @@ -18176,7 +19158,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaLeftBound()" + "AreaLeftBound" ] } ] @@ -18218,7 +19200,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaTopBound()" + "AreaTopBound" ] } ] @@ -18260,7 +19242,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaRightBound()" + "AreaRightBound" ] } ] @@ -18273,9 +19255,9 @@ "value": "Egal" }, "parameters": [ - "Object.Behavior::PropertyAreaLeftBound()", + "AreaLeftBound", "=", - "Object.Behavior::PropertyAreaRightBound()" + "AreaRightBound" ] } ], @@ -18285,7 +19267,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaLeftBound() + SceneWindowWidth()" + "AreaLeftBound + SceneWindowWidth()" ] } ] @@ -18327,7 +19309,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaBottomBound()" + "AreaBottomBound" ] } ] @@ -18340,9 +19322,9 @@ "value": "Egal" }, "parameters": [ - "Object.Behavior::PropertyAreaTopBound()", + "AreaTopBound", "=", - "Object.Behavior::PropertyAreaBottomBound()" + "AreaBottomBound" ] } ], @@ -18352,7 +19334,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaTopBound() + SceneWindowHeight()" + "AreaTopBound + SceneWindowHeight()" ] } ] @@ -18394,7 +19376,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyCellWidth()" + "CellWidth" ] } ] @@ -18436,7 +19418,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyCellHeight()" + "CellHeight" ] } ] @@ -18560,7 +19542,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyThreshold()" + "Threshold" ] } ] @@ -18939,11 +19921,12 @@ "conditions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::PropertyFillOutside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FillOutside", + "True", + "" ] } ], @@ -19090,9 +20073,6 @@ "type": "Number", "unit": "Pixel", "label": "Area left bound", - "description": "", - "group": "", - "extraInformation": [], "name": "AreaLeftBound" }, { @@ -19100,9 +20080,6 @@ "type": "Number", "unit": "Pixel", "label": "Area top bound", - "description": "", - "group": "", - "extraInformation": [], "name": "AreaTopBound" }, { @@ -19110,9 +20087,6 @@ "type": "Number", "unit": "Pixel", "label": "Area right bound", - "description": "", - "group": "", - "extraInformation": [], "name": "AreaRightBound" }, { @@ -19120,9 +20094,6 @@ "type": "Number", "unit": "Pixel", "label": "Area bottom bound", - "description": "", - "group": "", - "extraInformation": [], "name": "AreaBottomBound" }, { @@ -19130,9 +20101,6 @@ "type": "Number", "unit": "Pixel", "label": "Cell width", - "description": "", - "group": "", - "extraInformation": [], "name": "CellWidth" }, { @@ -19140,18 +20108,12 @@ "type": "Number", "unit": "Pixel", "label": "Cell height", - "description": "", - "group": "", - "extraInformation": [], "name": "CellHeight" }, { "value": "", "type": "Boolean", "label": "Fill outside", - "description": "", - "group": "", - "extraInformation": [], "name": "FillOutside" }, { @@ -19159,18 +20121,12 @@ "type": "Number", "unit": "Dimensionless", "label": "Contour threshold", - "description": "", - "group": "", - "extraInformation": [], "name": "Threshold" }, { "value": "", "type": "Boolean", "label": "Must only draw what is on the screen", - "description": "", - "group": "", - "extraInformation": [], "name": "MustOnlyDrawScreen" } ], @@ -19180,6 +20136,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/music jukebox/music jukebox.json b/examples/music jukebox/music jukebox.json index 6fdfaae97..ea8faa946 100644 --- a/examples/music jukebox/music jukebox.json +++ b/examples/music jukebox/music jukebox.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 209, + "build": 245, "major": 5, - "minor": 4, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Music Jukebox Template", "description": "Interactive Music Player Jukebox example with animated disk & tracklist.\n\nGDevelop Template & Art by Perri \"TeckGeck\" T.F. (TKGK Interactive)\nMusic by Komiku, U.S. Army Blues, Soft and Furious, Loyalty Freak Music, Frederic Lardon & Malaventura\nSound Effects by Kenney Games & TeckGeck\n\nThe Character (Lillian) are under the (Creative Commons ATTRIBUTION 4.0 INTERNATIONAL) licence\nKenney Games assets are under the (Creative Commons Zero, CC0) licence\nAll music is under the (Creative Commons Zero, CC0) licence\n\n**Links**\nhttps://www.kenney.nl/assets\nhttps://www.chosic.com/free-music/all\nhttps://teckgeck.com\nhttps://www.tkgk-interactive.com\n\nhttps://creativecommons.org/publicdomain/zero/1.0\nhttps://creativecommons.org/licenses/by/4.0/", @@ -86,7 +85,9 @@ "TeckGeck" ], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -98,7 +99,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 1.png", "kind": "image", "metadata": "", @@ -107,7 +107,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 2.png", "kind": "image", "metadata": "", @@ -116,7 +115,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 3.png", "kind": "image", "metadata": "", @@ -125,7 +123,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 4.png", "kind": "image", "metadata": "", @@ -134,7 +131,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 5.png", "kind": "image", "metadata": "", @@ -143,7 +139,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 6.png", "kind": "image", "metadata": "", @@ -152,7 +147,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 7.png", "kind": "image", "metadata": "", @@ -161,7 +155,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 8.png", "kind": "image", "metadata": "", @@ -170,7 +163,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Up Arrow.png", "kind": "image", "metadata": "", @@ -179,7 +171,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Down Arrow.png", "kind": "image", "metadata": "", @@ -198,7 +189,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/Music player BG.png", "kind": "image", "metadata": "", @@ -207,7 +197,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Spine/PSX Disk.png", "kind": "image", "metadata": "", @@ -241,7 +230,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 9.png", "kind": "image", "metadata": "", @@ -250,7 +238,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 10.png", "kind": "image", "metadata": "", @@ -359,7 +346,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/SFX on Button.png", "kind": "image", "metadata": "", @@ -368,7 +354,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/SFX off Button.png", "kind": "image", "metadata": "", @@ -377,7 +362,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Music on Button.png", "kind": "image", "metadata": "", @@ -386,7 +370,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Music off Button.png", "kind": "image", "metadata": "", @@ -395,7 +378,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Web Button.png", "kind": "image", "metadata": "", @@ -404,7 +386,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/itchio Button.png", "kind": "image", "metadata": "", @@ -413,7 +394,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/GDgames Button.png", "kind": "image", "metadata": "", @@ -422,7 +402,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GD Image.png", "kind": "image", "metadata": "", @@ -430,8 +409,7 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -468,13 +446,16 @@ "gridType": "rectangular", "gridWidth": 16, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.7370816317994066, - "windowMask": false + "zoomFactor": 0.841642812537315, + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -1634,15 +1615,11 @@ ] }, { - "areaMaxX": 64, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, "assetStoreId": "", "name": "SFX_Button", + "persistentUuid": "2c352984-bd44-4740-bb47-8ded82b74c85", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "SFX toggle", "variables": [], "effects": [], "behaviors": [ @@ -1761,49 +1738,14 @@ } ] } - }, - "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": [] - } - ] + } }, { - "areaMaxX": 64, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, "assetStoreId": "", "name": "Music_Button", + "persistentUuid": "45747a19-66be-4580-ab48-b297285a853a", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Music toggle", "variables": [], "effects": [], "behaviors": [ @@ -1922,38 +1864,7 @@ } ] } - }, - "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, @@ -10462,6 +10373,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -10550,12 +10462,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/toggle-switch", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", "name": "SpriteToggleSwitch", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.3.1", + "version": "2.0.2", "description": [ "Toggle switch that users can click or touch. The switch can be customized with sprites.", "", @@ -10576,10 +10489,39 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Toggle switches now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing toggle switches 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": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the switch object.", @@ -10600,12 +10542,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "WasChecked", + "False", + "" ] } ] @@ -10627,12 +10569,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "WasChecked", + "True", + "" ] } ] @@ -10654,11 +10596,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::TogglePropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "Toggle", + "" ] } ] @@ -10691,11 +10634,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] } ], @@ -10738,21 +10682,23 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -10796,20 +10742,22 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -10920,119 +10868,70 @@ "name": "SetChecked", "sentence": "Check _PARAM0_: _PARAM2_", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Avoid a started touch to interfere with a state change from events." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "BooleanVariable" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - } + "parameters": [ + "Value", + "False", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "ButtonFSM", + "IsChecked", + "False", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - } ], - "actions": [ + "events": [ { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" + "comment": "Avoid a started touch to interfere with a state change from events." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } ] } ] @@ -11042,35 +10941,67 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsChecked", + "True", + "" ] } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", "type": "behavior" @@ -11098,11 +11029,11 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousIsChecked", + "False", "" ] } @@ -11125,12 +11056,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -11140,11 +11071,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousIsChecked", + "True", + "" ] } ], @@ -11168,11 +11100,12 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousIsChecked", + "True", + "" ] } ], @@ -11212,38 +11145,29 @@ "value": "", "type": "Behavior", "label": "Button finite state machine", - "description": "", - "group": "", "extraInformation": [ "SpriteToggleSwitch::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "false", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], "name": "IsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], + "hidden": true, "name": "PreviousIsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WasChecked" } @@ -11264,61 +11188,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "SpriteToggleSwitch::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -11332,494 +11222,430 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" + "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": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "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": { - "value": "CollisionPoint" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 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", + "" + ] + } ] } ], - "actions": [ + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "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": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "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": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -11828,13 +11654,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -11844,50 +11669,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -11956,22 +11882,20 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -12006,11 +11930,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -12055,11 +11978,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -12104,11 +12026,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -12153,11 +12074,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -12179,11 +12099,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -12228,11 +12147,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -12277,11 +12195,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -12330,7 +12247,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -12361,8 +12278,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -12370,14 +12285,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -12386,9 +12314,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -12396,9 +12321,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -12406,9 +12328,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -12416,9 +12335,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -12437,7 +12353,121 @@ "defaultName": "ToggleSwitch", "description": "A toggle switch that users can click or touch.", "fullName": "Toggle switch", + "isUsingLegacyInstancesRenderer": false, "name": "SpriteToggleSwitch", + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, + { + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -12445,36 +12475,6 @@ "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." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "State", - "0", - "0", - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -12492,10 +12492,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] } ], @@ -12513,11 +12515,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -12527,11 +12530,12 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] } ], @@ -12549,10 +12553,11 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", + "PreviousIsChecked", + "False", "" ] } @@ -12620,20 +12625,21 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "False", "" ] } @@ -12651,11 +12657,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -12665,20 +12672,21 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "True", "" ] } @@ -12696,11 +12704,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "PreviousIsChecked", + "False", + "" ] } ] @@ -12933,10 +12942,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -12959,10 +12970,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -13212,7 +13225,6 @@ "fullName": "Is pressed", "functionType": "Condition", "name": "IsPressed", - "private": true, "sentence": "_PARAM0_ is pressed", "events": [ { @@ -13251,6 +13263,49 @@ ], "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": "SpriteToggleSwitch::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Update the state animation.", "fullName": "Update state animation", @@ -13369,10 +13424,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -13395,10 +13452,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -13479,9 +13538,6 @@ "value": "true", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], "name": "IsChecked" }, { @@ -13489,106 +13545,432 @@ "type": "Boolean", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousIsChecked" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "State", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false - } - ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "variants": [ + { + "areaMaxX": 129, + "areaMaxY": 129, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Music toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ + ], + "animations": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Images\\UI UX\\Music off Button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 129, + "y": 0 + }, + { + "x": 129, + "y": 128 + }, + { + "x": 0, + "y": 128 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Images\\UI UX\\Music on Button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 129, + "y": 0 + }, + { + "x": 129, + "y": 128 + }, + { + "x": 0, + "y": 128 + } + ] + ] + } + ] + } + ] } ] } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "State" + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 4.773551654051562, + "windowMask": false, + "selectedLayer": "" } - ] - }, - "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 + "areaMaxX": 129, + "areaMaxY": 129, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "SFX toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, + { + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Images\\UI UX\\SFX off Button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 129, + "y": 1 + }, + { + "x": 129, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Images\\UI UX\\SFX on Button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 129, + "y": 1 + }, + { + "x": 129, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + } + ] } ], - "effects": [] + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 4.773551654051562, + "windowMask": false, + "selectedLayer": "" + } } - ], - "instances": [] + ] } ] }, @@ -13597,12 +13979,13 @@ "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.1.0", + "version": "1.3.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -13644,7 +14027,7 @@ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -13673,11 +14056,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -13686,11 +14068,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -13724,12 +14105,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -13739,11 +14120,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -13760,12 +14142,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -13788,12 +14170,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -13803,11 +14185,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -13818,20 +14199,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": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -13863,11 +14244,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -13889,31 +14269,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": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -13929,22 +14308,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -13955,11 +14332,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -13974,11 +14350,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -14007,20 +14382,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14029,11 +14404,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14045,20 +14419,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14067,11 +14441,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14084,20 +14457,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14106,11 +14479,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14122,20 +14494,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14144,11 +14516,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14176,18 +14547,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -14199,11 +14569,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14212,11 +14581,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14229,11 +14597,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14241,11 +14608,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14254,11 +14620,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14341,22 +14706,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -14391,11 +14754,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14440,11 +14802,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14489,11 +14850,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14538,11 +14898,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14564,11 +14923,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14613,11 +14971,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14662,11 +15019,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14715,7 +15071,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -14746,8 +15102,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -14755,14 +15109,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -14771,9 +15138,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -14781,9 +15145,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -14791,9 +15152,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -14801,9 +15159,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -14833,7 +15188,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] }, @@ -14844,7 +15199,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -14855,7 +15210,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -14903,7 +15258,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "no" ] }, @@ -14914,7 +15269,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -14925,7 +15280,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -14936,11 +15291,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "!=", "\"\"" ] @@ -14964,7 +15318,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] } @@ -14975,11 +15329,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "!=", "\"\"" ] @@ -15003,7 +15356,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "yes" ] } @@ -15014,11 +15367,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "!=", "\"\"" ] @@ -15042,7 +15394,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "yes" ] } @@ -15084,7 +15436,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleEffect()" + "IdleEffect" ] } ] @@ -15121,13 +15473,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15165,7 +15516,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedEffect()" + "FocusedEffect" ] } ] @@ -15202,13 +15553,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15246,7 +15596,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedEffect()" + "PressedEffect" ] } ] @@ -15283,13 +15633,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15316,31 +15665,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -15349,16 +15694,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" } ], @@ -15368,7 +15710,7 @@ "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", "name": "ButtonAnimationName", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -15388,7 +15730,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15398,7 +15740,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15448,7 +15789,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15476,7 +15817,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -15504,7 +15845,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -15517,7 +15858,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15546,7 +15886,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15559,7 +15899,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15584,13 +15923,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15600,7 +15938,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15629,7 +15966,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -15642,7 +15979,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15667,13 +16003,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15683,7 +16018,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15712,7 +16046,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -15725,7 +16059,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15750,13 +16083,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15766,7 +16098,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15780,24 +16111,31 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "choices": [], + "name": "Animation" + }, { "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -15806,16 +16144,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" } ], @@ -15839,13 +16174,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -15896,11 +16230,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -15909,11 +16242,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -15925,7 +16257,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleValue()", + "IdleValue", "" ] } @@ -15952,11 +16284,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -15965,11 +16296,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -15981,7 +16311,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -15992,11 +16322,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -16005,11 +16334,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -16021,7 +16349,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -16044,11 +16372,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -16057,11 +16384,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -16073,7 +16399,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedValue()", + "PressedValue", "" ] } @@ -16096,11 +16422,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] @@ -16114,8 +16439,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeInDuration()", - "Object.Behavior::PropertyFadeInEasing()", + "FadeInDuration", + "FadeInEasing", "" ] } @@ -16126,11 +16451,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] @@ -16144,8 +16468,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeOutDuration()", - "Object.Behavior::PropertyFadeOutEasing()", + "FadeOutDuration", + "FadeOutEasing", "" ] } @@ -16223,46 +16547,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16301,46 +16621,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16378,37 +16694,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "<", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Tween::Ease(GetArgumentAsString(\"Easing\"), Object.Behavior::PropertyTweenInitialValue(), Object.Behavior::PropertyTweenTargetedValue(), Object.Behavior::PropertyTweenTime() / GetArgumentAsNumber(\"Duration\"))" + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] } ] @@ -16418,37 +16731,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", ">=", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"NoTween\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyTweenTargetedValue()" + "TweenTargetedValue" ] } ] @@ -16464,9 +16774,9 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyEffectName()", - "Object.Behavior::PropertyEffectProperty()", - "Object.Behavior::PropertyEffectValue()" + "EffectName", + "EffectProperty", + "EffectValue" ] } ] @@ -16515,7 +16825,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectName()" + "EffectName" ] } ] @@ -16556,7 +16866,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectProperty()" + "EffectProperty" ] } ] @@ -16595,24 +16905,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", - "GetArgumentAsString(\"Value\")" + "NewEffectName" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", - "GetArgumentAsString(\"Value\")" + "NewPropertyName" ] } ] @@ -16632,12 +16940,12 @@ }, { "description": "Effect name", - "name": "EffectName", + "name": "NewEffectName", "type": "string" }, { "description": "Parameter name", - "name": "PropertyName", + "name": "NewPropertyName", "type": "string" } ], @@ -16660,7 +16968,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -16697,13 +17005,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16741,7 +17048,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedValue()" + "FocusedValue" ] } ] @@ -16778,13 +17085,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16822,7 +17128,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedValue()" + "PressedValue" ] } ] @@ -16859,13 +17165,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16903,7 +17208,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -16941,13 +17246,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -16985,7 +17289,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -17023,13 +17327,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -17067,7 +17370,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -17104,13 +17407,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17148,7 +17450,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -17185,13 +17487,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17218,31 +17519,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -17251,16 +17548,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" }, { @@ -17269,58 +17563,153 @@ "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", - "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -17328,42 +17717,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -17372,9 +17859,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -17382,21 +17867,26 @@ "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" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -17405,9 +17895,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -17415,9 +17902,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -17425,9 +17909,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -17435,12 +17916,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -17449,9 +17937,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -17462,7 +17947,7 @@ "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", "name": "ButtonScaleTween", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -17482,7 +17967,7 @@ "Object", "Scale", "=", - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -17492,7 +17977,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17534,11 +18018,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -17547,11 +18030,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -17563,7 +18045,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleScale()", + "IdleScale", "" ] } @@ -17590,11 +18072,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -17603,11 +18084,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -17619,7 +18099,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -17630,11 +18110,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -17643,11 +18122,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -17659,7 +18137,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -17682,11 +18160,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -17695,11 +18172,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -17711,7 +18187,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedScale()", + "PressedScale", "" ] } @@ -17725,7 +18201,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17756,10 +18231,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -17771,7 +18246,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17807,10 +18281,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -17822,7 +18296,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17856,7 +18329,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -17869,7 +18342,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17894,13 +18366,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17910,7 +18381,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17939,7 +18409,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedScale()" + "FocusedScale" ] } ] @@ -17952,7 +18422,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17977,13 +18446,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17993,7 +18461,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18022,7 +18489,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedScale()" + "PressedScale" ] } ] @@ -18035,7 +18502,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18060,13 +18526,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18076,7 +18541,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18105,7 +18569,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -18118,7 +18582,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18143,13 +18606,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18159,7 +18621,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18188,7 +18649,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -18201,7 +18662,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18226,13 +18686,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18242,7 +18701,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18271,7 +18729,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -18285,7 +18743,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18310,13 +18767,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -18326,7 +18782,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18355,7 +18810,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -18369,7 +18824,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18394,13 +18848,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -18410,7 +18863,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18424,26 +18876,34 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "choices": [], + "name": "Scale" + }, { "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -18451,9 +18911,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -18463,7 +18921,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -18471,9 +18928,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -18481,9 +18936,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -18491,51 +18944,147 @@ "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", - "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -18543,42 +19092,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -18586,12 +19233,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -18621,7 +19275,7 @@ }, "parameters": [ "Object", - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -18673,11 +19327,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -18686,11 +19339,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -18702,7 +19354,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleColorTint()", + "IdleColorTint", "" ] } @@ -18729,11 +19381,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -18742,11 +19393,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -18758,7 +19408,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -18769,11 +19419,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -18782,11 +19431,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -18798,7 +19446,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -18821,11 +19469,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -18834,11 +19481,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -18850,7 +19496,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedColorTint()", + "PressedColorTint", "" ] } @@ -18895,9 +19541,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -18945,9 +19591,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -18993,7 +19639,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -19031,13 +19677,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19076,7 +19721,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedColorTint()" + "FocusedColorTint" ] } ] @@ -19114,13 +19759,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19159,7 +19803,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedColorTint()" + "PressedColorTint" ] } ] @@ -19197,13 +19841,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19242,7 +19885,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -19280,13 +19923,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -19325,7 +19967,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -19363,13 +20005,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -19408,7 +20049,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -19447,13 +20088,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19492,7 +20132,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -19531,13 +20171,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19565,31 +20204,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -19598,16 +20233,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" }, { @@ -19615,9 +20247,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -19625,51 +20255,147 @@ "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", - "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -19677,42 +20403,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -19720,12 +20544,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -19737,6 +20568,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/object-slicer/object-slicer.json b/examples/object-slicer/object-slicer.json index 9d6c0c466..b261dded5 100644 --- a/examples/object-slicer/object-slicer.json +++ b/examples/object-slicer/object-slicer.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Object slicer", "description": "Test the Object Slicer extension, which can slice an object into smaller pieces that match the color of original object. \n\nUseful for creating death animations such as explosions, crumbling, dissolve, or teleportation effects.\nPieces should be a solid white color or the color of the piece not match the original color.\n\nTips:\n- Pieces are linked to the original object which can be used in other events (i.e. explode away from the original object)", @@ -88,6 +87,7 @@ ], "playableDevices": [ "keyboard", + "mobile", "mobile" ], "extensionProperties": [], @@ -101,7 +101,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Rubber Ducktopus.png", "kind": "image", "metadata": "", @@ -114,7 +113,6 @@ } }, { - "alwaysLoaded": false, "file": "BlankTile-1-0.png", "kind": "image", "metadata": "", @@ -123,7 +121,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "HoverColor-1.png", "kind": "image", "metadata": "", @@ -132,7 +129,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/tiled_Wall for Blue Floor.png", "kind": "image", "metadata": "", @@ -145,7 +141,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Gordon_Idle_1.png", "kind": "image", "metadata": "", @@ -158,7 +153,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Gordon_Idle_2.png", "kind": "image", "metadata": "", @@ -171,7 +165,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Gordon_Idle_3.png", "kind": "image", "metadata": "", @@ -184,7 +177,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Gordon_Idle_4.png", "kind": "image", "metadata": "", @@ -197,7 +189,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_1.png", "kind": "image", "metadata": "", @@ -210,7 +201,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_10.png", "kind": "image", "metadata": "", @@ -223,7 +213,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_11.png", "kind": "image", "metadata": "", @@ -236,7 +225,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_12.png", "kind": "image", "metadata": "", @@ -249,7 +237,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_13.png", "kind": "image", "metadata": "", @@ -262,7 +249,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_14.png", "kind": "image", "metadata": "", @@ -275,7 +261,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_15.png", "kind": "image", "metadata": "", @@ -288,7 +273,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_2.png", "kind": "image", "metadata": "", @@ -301,7 +285,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_3.png", "kind": "image", "metadata": "", @@ -314,7 +297,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_4.png", "kind": "image", "metadata": "", @@ -327,7 +309,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_5.png", "kind": "image", "metadata": "", @@ -340,7 +321,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_6.png", "kind": "image", "metadata": "", @@ -353,7 +333,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_7.png", "kind": "image", "metadata": "", @@ -366,7 +345,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_8.png", "kind": "image", "metadata": "", @@ -379,7 +357,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_9.png", "kind": "image", "metadata": "", @@ -392,7 +369,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_1.png", "kind": "image", "metadata": "", @@ -405,7 +381,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_10.png", "kind": "image", "metadata": "", @@ -418,7 +393,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_11.png", "kind": "image", "metadata": "", @@ -431,7 +405,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_12.png", "kind": "image", "metadata": "", @@ -444,7 +417,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_13.png", "kind": "image", "metadata": "", @@ -457,7 +429,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_14.png", "kind": "image", "metadata": "", @@ -470,7 +441,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_15.png", "kind": "image", "metadata": "", @@ -483,7 +453,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_16.png", "kind": "image", "metadata": "", @@ -496,7 +465,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_17.png", "kind": "image", "metadata": "", @@ -509,7 +477,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_18.png", "kind": "image", "metadata": "", @@ -522,7 +489,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_19.png", "kind": "image", "metadata": "", @@ -535,7 +501,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_2.png", "kind": "image", "metadata": "", @@ -548,7 +513,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_20.png", "kind": "image", "metadata": "", @@ -561,7 +525,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_21.png", "kind": "image", "metadata": "", @@ -574,7 +537,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_22.png", "kind": "image", "metadata": "", @@ -587,7 +549,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_23.png", "kind": "image", "metadata": "", @@ -600,7 +561,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_24.png", "kind": "image", "metadata": "", @@ -613,7 +573,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_25.png", "kind": "image", "metadata": "", @@ -626,7 +585,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_26.png", "kind": "image", "metadata": "", @@ -639,7 +597,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_27.png", "kind": "image", "metadata": "", @@ -652,7 +609,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_28.png", "kind": "image", "metadata": "", @@ -665,7 +621,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_29.png", "kind": "image", "metadata": "", @@ -678,7 +633,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_3.png", "kind": "image", "metadata": "", @@ -691,7 +645,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_30.png", "kind": "image", "metadata": "", @@ -704,7 +657,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_31.png", "kind": "image", "metadata": "", @@ -717,7 +669,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_32.png", "kind": "image", "metadata": "", @@ -730,7 +681,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_4.png", "kind": "image", "metadata": "", @@ -743,7 +693,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_5.png", "kind": "image", "metadata": "", @@ -756,7 +705,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_6.png", "kind": "image", "metadata": "", @@ -769,7 +717,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_7.png", "kind": "image", "metadata": "", @@ -782,7 +729,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_8.png", "kind": "image", "metadata": "", @@ -795,7 +741,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_9.png", "kind": "image", "metadata": "", @@ -808,7 +753,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -821,7 +765,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -834,7 +777,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -847,7 +789,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -860,7 +801,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -873,7 +813,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -886,7 +825,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -899,7 +837,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -912,7 +849,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -925,7 +861,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Orange Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -938,7 +873,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Orange Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -951,7 +885,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Orange Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -964,7 +897,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_1.png", "kind": "image", "metadata": "", @@ -977,7 +909,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_10.png", "kind": "image", "metadata": "", @@ -990,7 +921,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_11.png", "kind": "image", "metadata": "", @@ -1003,7 +933,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_12.png", "kind": "image", "metadata": "", @@ -1016,7 +945,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_13.png", "kind": "image", "metadata": "", @@ -1029,7 +957,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_14.png", "kind": "image", "metadata": "", @@ -1042,7 +969,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_15.png", "kind": "image", "metadata": "", @@ -1055,7 +981,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_16.png", "kind": "image", "metadata": "", @@ -1068,7 +993,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_17.png", "kind": "image", "metadata": "", @@ -1081,7 +1005,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_18.png", "kind": "image", "metadata": "", @@ -1094,7 +1017,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_19.png", "kind": "image", "metadata": "", @@ -1107,7 +1029,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_2.png", "kind": "image", "metadata": "", @@ -1120,7 +1041,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_3.png", "kind": "image", "metadata": "", @@ -1133,7 +1053,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_4.png", "kind": "image", "metadata": "", @@ -1146,7 +1065,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_5.png", "kind": "image", "metadata": "", @@ -1159,7 +1077,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_6.png", "kind": "image", "metadata": "", @@ -1172,7 +1089,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_7.png", "kind": "image", "metadata": "", @@ -1185,7 +1101,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_8.png", "kind": "image", "metadata": "", @@ -1198,7 +1113,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_9.png", "kind": "image", "metadata": "", @@ -1214,7 +1128,7 @@ "file": "assets/Ranchers-Regular.ttf", "kind": "font", "metadata": "", - "name": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "name": "Ranchers-Regular.ttf", "userAdded": true, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Google Fonts/566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", @@ -1222,7 +1136,6 @@ } }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -1230,10 +1143,12 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -1252,13 +1167,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 0.5685425067868953, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -1604,7 +1522,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "ZombieBoy", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2362,7 +2279,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "0d91b7b0a2a8562a0172b4d5e9bf3d80340f866a030aa7a5f3baf6157840f1c3", "name": "RedHero", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -3388,7 +3304,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Gordon", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -3698,7 +3613,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Captain", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -4888,7 +4802,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "RubberDucktopus", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -4982,7 +4895,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "WhitePixel", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -5050,7 +4962,6 @@ "italic": false, "name": "GreenValue", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5064,6 +4975,28 @@ "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": "Green: 123", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -5072,7 +5005,6 @@ "italic": false, "name": "BlueValue", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5086,6 +5018,28 @@ "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": "Blue: 123", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -5094,7 +5048,6 @@ "italic": false, "name": "AlphaValue", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5108,6 +5061,28 @@ "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": "Alpha: 123", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -5116,7 +5091,6 @@ "italic": false, "name": "RedValue", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5130,13 +5104,34 @@ "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": "Red: 123", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "0;0;0" } }, { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "HoverColor", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -5180,7 +5175,6 @@ "italic": false, "name": "Instructions", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5200,13 +5194,35 @@ ], "behaviors": [], "string": "Click on an object to crumble it", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "font": "Ranchers-Regular.ttf", "textAlignment": "center", "characterSize": 25, "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": "Click on an object to crumble it", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5215,7 +5231,6 @@ "italic": false, "name": "Instructions2", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5235,20 +5250,41 @@ ], "behaviors": [], "string": "\nOutline color matches mouse position", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "font": "Ranchers-Regular.ttf", "textAlignment": "center", "characterSize": 25, "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": "\nOutline color matches mouse position", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } }, { "assetStoreId": "", "height": 128, "name": "WallForBlueFloor", - "tags": "", "texture": "tiled_Wall for Blue Floor.png", "type": "TiledSpriteObject::TiledSprite", "width": 128, @@ -5286,26 +5322,46 @@ "italic": false, "name": "Title", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "Extension: Object slicer", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "font": "Ranchers-Regular.ttf", "textAlignment": "", "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": "Extension: Object slicer", + "font": "Ranchers-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 50, + "lineHeight": 0, + "color": "255;255;255" } }, { "assetStoreId": "", "name": "SliderHorizontalSlices", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -5341,24 +5397,23 @@ "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": "", "name": "SliderVerticalSlices", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -5394,19 +5449,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 + } }, { "assetStoreId": "", @@ -5414,20 +5469,41 @@ "italic": false, "name": "HorizontalStrips", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "Horizontal slices: 123", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "font": "Ranchers-Regular.ttf", "textAlignment": "", "characterSize": 25, "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": "Horizontal slices: 123", + "font": "Ranchers-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5436,27 +5512,49 @@ "italic": false, "name": "VerticalStrips", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "Vertical slices: 123", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "font": "Ranchers-Regular.ttf", "textAlignment": "", "characterSize": 25, "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": "Vertical slices: 123", + "font": "Ranchers-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } }, { "assetStoreId": "b6e192c68f93de7846e94964878d4edf7b8071a1e295788658c044e70aff7543", "name": "Explode_Button", - "tags": "", + "persistentUuid": "f5302489-88f9-44c3-bc46-d8fc9ee91a36", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Red Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -5466,9 +5564,23 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Explode" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 0, "height": 102, @@ -5502,6 +5614,28 @@ "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": "Explode", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -5519,8 +5653,9 @@ { "assetStoreId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", "name": "Transporter_Button", - "tags": "", + "persistentUuid": "c9d194b5-bac0-4d86-973c-12a8af27617a", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -5530,9 +5665,23 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Transporter" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 0, "height": 102, @@ -5566,6 +5715,28 @@ "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": "Transporter", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -5583,8 +5754,9 @@ { "assetStoreId": "3699f3a9dbcacb430dfb90834c239c60a0324b631635c6658396cd524c7adb0a", "name": "OutAndBack_Button", - "tags": "", + "persistentUuid": "b2c5b673-6a05-486d-a9c6-332f6c24b2bc", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Purple Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -5594,9 +5766,23 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Out and Back" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 0, "height": 102, @@ -5630,6 +5816,28 @@ "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": "Out and Back", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -5647,8 +5855,9 @@ { "assetStoreId": "a0b220a4d2b5cc644055848ff63b0f56c2685517bf870112832c9ab4b65aaa2f", "name": "Crumble_Button", - "tags": "", + "persistentUuid": "836d2dd7-834d-4981-95f4-79d1669041af", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Orange Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -5658,9 +5867,23 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Crumble" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 0, "height": 102, @@ -5694,6 +5917,28 @@ "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": "Crumble", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -5709,6 +5954,80 @@ } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "ZombieBoy" + }, + { + "objectName": "RedHero" + }, + { + "objectName": "Gordon" + }, + { + "objectName": "Captain" + }, + { + "objectName": "RubberDucktopus" + }, + { + "objectName": "WhitePixel" + }, + { + "objectName": "GreenValue" + }, + { + "objectName": "BlueValue" + }, + { + "objectName": "AlphaValue" + }, + { + "objectName": "RedValue" + }, + { + "objectName": "HoverColor" + }, + { + "objectName": "Instructions" + }, + { + "objectName": "Instructions2" + }, + { + "objectName": "WallForBlueFloor" + }, + { + "objectName": "Title" + }, + { + "objectName": "SliderHorizontalSlices" + }, + { + "objectName": "SliderVerticalSlices" + }, + { + "objectName": "HorizontalStrips" + }, + { + "objectName": "VerticalStrips" + }, + { + "objectName": "Explode_Button" + }, + { + "objectName": "Transporter_Button" + }, + { + "objectName": "OutAndBack_Button" + }, + { + "objectName": "Crumble_Button" + } + ] + }, "events": [ { "colorB": 224, @@ -6910,9 +7229,11 @@ "ambientLightColorB": 0, "ambientLightColorG": -2147483360, "ambientLightColorR": 158, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -6937,9 +7258,11 @@ "ambientLightColorB": 8342408, "ambientLightColorG": 6043328, "ambientLightColorR": 8808784, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -6966,9 +7289,11 @@ "ambientLightColorB": 134217728, "ambientLightColorG": 6026736, "ambientLightColorR": 12105000, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -6980,10 +7305,26 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, { "name": "DraggableSliderControl", "type": "DraggableSliderControl::DraggableSliderControl" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, { "name": "Physics2", "type": "Physics2::Physics2Behavior", @@ -6991,6 +7332,18 @@ "gravityY": 9.8, "scaleX": 100, "scaleY": 100 + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] } @@ -7002,14 +7355,15 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", - "helpPath": "", + "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.2.0", + "version": "2.1.1", "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.", + "A button that can be used for menus and most labelled buttons of a game. 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)." ], @@ -7024,20 +7378,29 @@ "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": [ { - "fullName": "Any touch pressed", + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", "functionType": "Condition", - "name": "AnyTouchPressed", + "name": "IsInGameEdition", "private": true, - "sentence": "Any touch is pressed", + "sentence": "Events are running for the editor", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "eventsFunctionContext.returnValue = runtimeScene.getGame().getInputManager()._touches.firstKey() !== null;", - "" + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" ], "parameterObjects": "", "useStrict": true, @@ -7062,24 +7425,13 @@ "name": "doStepPostEvents", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "We don't use the touch capability condition because the device could have both touch and cursor." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::AnyTouchPressed" + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, "parameters": [ "", @@ -7087,75 +7439,14 @@ ] } ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "actions": [], "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", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -7169,323 +7460,334 @@ "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" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::AnyTouchPressed" - }, - "parameters": [ - "", - "" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::ShouldCheckMousePosition" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "value": "SourisSurObjet" + "value": "StringVariable" }, "parameters": [ - "Object", - "", - "no", - "" + "State", + "=", + "\"Validated\"" ] } ], "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 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" + "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", + "" + ] + } ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "HasAnyTouchStarted" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "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::Repeat", - "repeatExpression": "StartedTouchCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "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": [], - "subInstructions": [ + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Ignore mouse events when a touch is active because the mouse is probably an echo of touch events.\nThe mouse press could be a touch that has not the right TouchId." + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "MouseButtonPressed" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -7493,137 +7795,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::AnyTouchPressed" + "value": "BooleanVariable" }, "parameters": [ - "", + "MouseIsInside", + "True", "" ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The trigger once must be before the state condition to detect a new press." }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "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\"" - ] - } - ] - } - ] - } - ] - } - ], - "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": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -7632,11 +7817,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -7648,89 +7832,72 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"PressedOutside\"" + "\"Hovered\"" ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"PressedOutside\"" + "\"PressedInside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"PressedInside\"" + "\"PressedOutside\"" ] } ] @@ -7740,269 +7907,239 @@ "conditions": [ { "type": { - "inverted": true, - "value": "MouseButtonPressed" + "value": "BooleanVariable" }, "parameters": [ - "", - "Left" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"PressedInside\"" ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Ignore mouse events when a touch is active because the mouse is probably an echo of touch events.\nThe mouse release could be a touch release that has not the right TouchId." + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "MouseButtonReleased" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::AnyTouchPressed" - }, - "parameters": [ - "", - "" - ] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "HasTouchEnded" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "", + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "\"Validated\"" + "0" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "events": [ { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } ] }, { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "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\"" + ] + } ] } ] } - ] - }, - { - "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": [] + ] + } + ], + "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": [ @@ -8032,11 +8169,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -8081,11 +8217,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -8130,11 +8265,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8179,11 +8313,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8205,11 +8338,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -8254,11 +8386,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -8303,11 +8434,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -8341,66 +8471,30 @@ "objectGroups": [] }, { - "fullName": "Should check mouse position", - "functionType": "Condition", - "name": "ShouldCheckMousePosition", - "private": true, - "sentence": "_PARAM0_ should check mouse position", + "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::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Using a function avoid the OR to unselect Object when the property is not set." - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "MouseButtonPressed" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "TouchId" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -8423,8 +8517,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -8432,14 +8524,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -8448,9 +8553,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -8458,9 +8560,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -8468,9 +8567,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -8478,9 +8574,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -8490,10 +8583,314 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Button", "description": "A button that can be customized.", - "fullName": "Panel sprite button", + "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -8523,7 +8920,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -8535,7 +8932,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -8543,14 +8940,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()" ] }, { @@ -8578,63 +8985,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" + "value": "ChangePlan" }, "parameters": [ - "", - "Label", - "0", - "0", - "" + "Pressed", + "=", + "1" ] }, { "type": { - "value": "ChangePlan" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "2" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "LabelText" ] } ] @@ -8673,18 +9043,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": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -8746,12 +9145,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8786,10 +9186,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -8798,7 +9198,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -8806,7 +9206,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -8817,10 +9217,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -8844,10 +9244,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -8864,10 +9265,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -8896,12 +9298,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8941,10 +9344,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -8973,12 +9377,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -9030,12 +9435,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -9067,137 +9473,1474 @@ } ], "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": [ - { - "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", - "" - ] - } + "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", + "" ] } ], - "parameters": [] + "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": [ + "Labels", + "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": [ + "Labels", + "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": [ + "Labels.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": [ + "Labels", + "+", + "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": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" + } + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Green Button With Stone Frame 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": "Ranchers-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": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": "f8a927cc-1139-440f-8a4e-bc8e56e322bf", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.0114942528735633, + "windowMask": false, + "selectedLayer": "" + } + }, + { + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Orange Button With Stone Frame 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": "Ranchers-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": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } ], - "parameters": [ + "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": [] + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "1ce5beca-7282-43a1-b6cd-4bdecbce827f", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [ + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.0114942528735633, + "windowMask": false, + "selectedLayer": "" + } + }, + { + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Red Button With Stone Frame 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": "Ranchers-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": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { "name": "Background", "objects": [ @@ -9211,443 +10954,1601 @@ "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": [ + "name": "Labels", + "objects": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], - "actions": [ + "name": "Label" + }, { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "BitmapLabel" } ] } ], - "parameters": [ + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "f1940baa-4be1-489e-8fbc-d69709a0eba0", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.0114942528735633, + "windowMask": false, + "selectedLayer": "" + } }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", - "events": [ + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Purple Button With Stone Frame 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": "Ranchers-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": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" } ] } ], - "parameters": [ + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "74b3bb84-0bdf-4e85-a321-8b5462c65e1e", + "width": 283, + "x": 32, + "y": 51, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.0114942528735633, + "windowMask": false, + "selectedLayer": "" + } }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", - "events": [ + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", + "assetStoreOriginalName": "Green Button With Stone Frame", + "name": "Green Button With Stone Frame", + "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": "Roboto-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": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsHovered" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], - "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": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "Background", + "objects": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsFocused" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" } - ], - "actions": [ + ] + }, + { + "name": "Labels", + "objects": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "Label" + }, + { + "name": "BitmapLabel" } ] } ], - "parameters": [ + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "f8a927cc-1139-440f-8a4e-bc8e56e322bf", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] + "editionSettings": [] }, { - "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": [ + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "b6e192c68f93de7846e94964878d4edf7b8071a1e295788658c044e70aff7543", + "assetStoreOriginalName": "Red Button With Stone Frame", + "name": "Red Button With Stone Frame", + "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": "Roboto-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": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsPressed" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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" - } - ], - "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\")" - ] + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false }, { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] }, { - "description": "", - "name": "LabelText", - "type": "string" + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], - "objectGroups": [] - }, - { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", - "sentence": "", - "events": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "Background", + "objects": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "Label.String()" - ] + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" } ] } ], - "expressionType": { - "type": "string" - }, - "parameters": [ + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "f1940baa-4be1-489e-8fbc-d69709a0eba0", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] + "editionSettings": [] }, { - "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": [ + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "3699f3a9dbcacb430dfb90834c239c60a0324b631635c6658396cd524c7adb0a", + "assetStoreOriginalName": "Purple Button With Stone Frame", + "name": "Purple Button With Stone Frame", + "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": "Roboto-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": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } } ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], - "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": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "Background", + "objects": [ { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] + "name": "Idle" }, { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" - ] + "name": "Hovered" }, { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": "74b3bb84-0bdf-4e85-a321-8b5462c65e1e", + "width": 283, + "x": 32, + "y": 51, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] + }, + { + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "a0b220a4d2b5cc644055848ff63b0f56c2685517bf870112832c9ab4b65aaa2f", + "assetStoreOriginalName": "Orange Button With Stone Frame", + "name": "Orange Button With Stone Frame", + "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 } ], - "events": [ + "string": "Button", + "font": "Roboto-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": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } } - ], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "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" + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], - "objectGroups": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { "name": "Background", "objects": [ @@ -9661,171 +12562,86 @@ "name": "Pressed" } ] - } - ] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "LeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "RightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "TopPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "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, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "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": [] + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "1ce5beca-7282-43a1-b6cd-4bdecbce827f", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + ], + "editionSettings": [] } ] } @@ -9836,6 +12652,7 @@ "category": "", "extensionNamespace": "", "fullName": "Checkbox", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNoZWNrYm94LW1hcmtlZCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMCwxN0w1LDEyTDYuNDEsMTAuNThMMTAsMTQuMTdMMTcuNTksNi41OEwxOSw4TTE5LDNINUMzLjg5LDMgMywzLjg5IDMsNVYxOUEyLDIgMCAwLDAgNSwyMUgxOUEyLDIgMCAwLDAgMjEsMTlWNUMyMSwzLjg5IDIwLjEsMyAxOSwzWiIgLz48L3N2Zz4=", "name": "Checkbox", @@ -9871,6 +12688,8 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -12812,59 +15631,41 @@ "value": "0", "type": "Boolean", "label": "Checked", - "description": "", "group": "Checkbox state", - "extraInformation": [], - "hidden": false, "name": "Checked" }, { "value": "", "type": "Number", "label": "Halo size (hover). If blank, this is set to \"SideLength\".", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloRadiusHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityHover" }, { "value": "128", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", "group": "Checkbox state", - "extraInformation": [], - "hidden": false, "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingPressed" }, @@ -12872,9 +15673,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -12882,9 +15680,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -12892,9 +15687,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -12902,9 +15694,6 @@ "value": "0.3", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -12912,9 +15701,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" }, @@ -12922,9 +15708,6 @@ "value": "", "type": "Boolean", "label": "State of the checkbox has changed. (Used in \"ToggleChecked\" function)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ToggleChanged" }, @@ -12932,60 +15715,42 @@ "value": " 24;119;211", "type": "Color", "label": "Primary color of checkbox. (Example: 24;119;211) Fill color when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "PrimaryColor" }, { "value": "255;255;255", "type": "Color", "label": "Secondary color of checkbox. (Example: 255;255;255) Color of checkmark when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "SecondaryColor" }, { "value": "24", "type": "Number", "label": "Length of each side (px) Minimum: 10", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "SideLength" }, { "value": "5", "type": "Number", "label": "Line width of checkmark (px) (Min: 1, Max: 1/4 * SideLength)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "LineWidth" }, { "value": "2", "type": "Number", "label": "Border thickness (px) This border is only visible when the checkbox is unchecked. ", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "BorderThickness" }, { "value": "", "type": "Number", "label": "Halo size (pressed). If blank, this is set to \"HaloRadiusHover * 1.1\"", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloRadiusPressed" } ], @@ -12999,6 +15764,7 @@ "category": "", "extensionNamespace": "", "fullName": "Sine (or ellipsis) Movement", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/extension-sinemovement-and-deptheffect", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNpbmUtd2F2ZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDIxQzEzLjUsMjEgMTIuMzEsMTYuNzYgMTEuMDUsMTIuMjhDMTAuMTQsOS4wNCA5LDUgNy41LDVDNC4xMSw1IDQsMTEuOTMgNCwxMkgyQzIsMTEuNjMgMi4wNiwzIDcuNSwzQzEwLjUsMyAxMS43MSw3LjI1IDEyLjk3LDExLjc0QzEzLjgzLDE0LjggMTUsMTkgMTYuNSwxOUMxOS45NCwxOSAyMC4wMywxMi4wNyAyMC4wMywxMkgyMi4wM0MyMi4wMywxMi4zNyAyMS45NywyMSAxNi41LDIxWiIgLz48L3N2Zz4=", "name": "SineMovement", @@ -13040,6 +15806,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -13894,69 +16662,42 @@ "value": "60", "type": "Number", "label": "Horizontal speed, in degrees per second", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "HorizontalSpeed" }, { "value": "60", "type": "Number", "label": "Vertical speed, in degrees per second", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "VerticalSpeed" }, { "value": "100", "type": "Number", "label": "Horizontal distance: amplitude of the movement on X axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "HorizontalDistance" }, { "value": "0", "type": "Number", "label": "Vertical distance: amplitude of the movement on Y axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "VerticalDistance" }, { "value": "0", "type": "Number", "label": "Center of movement, X position", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "CenterPointX" }, { "value": "0", "type": "Number", "label": "Center of movement, Y position", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "CenterPointY" }, { "value": "0", "type": "Number", "label": "Counter used to change X position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SineProgressX" }, @@ -13964,9 +16705,6 @@ "value": "0", "type": "Number", "label": "Counter used to change Y position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SineProgressY" } @@ -13981,6 +16719,7 @@ "category": "", "extensionNamespace": "", "fullName": "Find the center of a group of objects", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWRvdHMtZ3JpZCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiAxNkMxMy4xIDE2IDE0IDE2LjkgMTQgMThTMTMuMSAyMCAxMiAyMCAxMCAxOS4xIDEwIDE4IDEwLjkgMTYgMTIgMTZNMTIgMTBDMTMuMSAxMCAxNCAxMC45IDE0IDEyUzEzLjEgMTQgMTIgMTQgMTAgMTMuMSAxMCAxMiAxMC45IDEwIDEyIDEwTTEyIDRDMTMuMSA0IDE0IDQuOSAxNCA2UzEzLjEgOCAxMiA4IDEwIDcuMSAxMCA2IDEwLjkgNCAxMiA0TTYgMTZDNy4xIDE2IDggMTYuOSA4IDE4UzcuMSAyMCA2IDIwIDQgMTkuMSA0IDE4IDQuOSAxNiA2IDE2TTYgMTBDNy4xIDEwIDggMTAuOSA4IDEyUzcuMSAxNCA2IDE0IDQgMTMuMSA0IDEyIDQuOSAxMCA2IDEwTTYgNEM3LjEgNCA4IDQuOSA4IDZTNy4xIDggNiA4IDQgNy4xIDQgNiA0LjkgNCA2IDRNMTggMTZDMTkuMSAxNiAyMCAxNi45IDIwIDE4UzE5LjEgMjAgMTggMjAgMTYgMTkuMSAxNiAxOCAxNi45IDE2IDE4IDE2TTE4IDEwQzE5LjEgMTAgMjAgMTAuOSAyMCAxMlMxOS4xIDE0IDE4IDE0IDE2IDEzLjEgMTYgMTIgMTYuOSAxMCAxOCAxME0xOCA0QzE5LjEgNCAyMCA0LjkgMjAgNlMxOS4xIDggMTggOCAxNiA3LjEgMTYgNiAxNi45IDQgMTggNFoiIC8+PC9zdmc+", "name": "FindCenterOfObjects", @@ -14000,6 +16739,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Center point of a group of objects (X)", @@ -14368,6 +17109,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Draggable slider", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "DraggableSliderControl", @@ -14410,6 +17152,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -18028,202 +20772,145 @@ "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ValueMin" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ValueMax" }, { "value": "0", "type": "Number", "label": "Tick spacing", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TickSpacing" }, { "value": "circle", "type": "Choice", "label": "Thumb shape", - "description": "", "group": "Thumb", - "extraInformation": [ - "circle", - "rectangle" + "choices": [ + { + "label": "circle", + "value": "circle" + }, + { + "label": "rectangle", + "value": "rectangle" + } ], - "hidden": false, "name": "ThumbShape" }, { "value": "20", "type": "Number", "label": "Thumb width", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbWidth" }, { "value": "20", "type": "Number", "label": "Thumb height", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbHeight" }, { "value": " 24;119;211", "type": "Color", "label": "Thumb Color", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbColor" }, { "value": "255", "type": "Number", "label": "Thumb opacity", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbOpacity" }, { "value": "200", "type": "Number", "label": "Track length", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "TrackLength" }, { "value": "4", "type": "Number", "label": "Track thickness", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "TrackThickness" }, { "value": "", "type": "String", "label": "Inactive track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "InactiveTrackColor" }, { "value": "96", "type": "Number", "label": "Inactive track opacity", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "InactiveTrackOpacity" }, { "value": " ", "type": "String", "label": "Active track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "ActiveTrackColor" }, { "value": "255", "type": "Number", "label": "Active track opacity", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "ActiveTrackOpacity" }, { "value": "24", "type": "Number", "label": "Halo size (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloRadius" }, { "value": "32", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Rounded track ends", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "RoundedTrack" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingDragged" }, @@ -18231,9 +20918,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Value" }, @@ -18241,9 +20925,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbOffset" }, @@ -18251,9 +20932,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -18261,9 +20939,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -18271,9 +20946,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseX" }, @@ -18281,9 +20953,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseY" }, @@ -18291,9 +20960,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -18301,9 +20967,6 @@ "value": "0.2", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -18311,9 +20974,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" } @@ -18328,6 +20988,7 @@ "category": "", "extensionNamespace": "", "fullName": "Repeat every X seconds", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJlcGVhdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNywxN0g3VjE0TDMsMThMNywyMlYxOUgxOVYxM0gxN003LDdIMTdWMTBMMjEsNkwxNywyVjVINVYxMUg3VjdaIiAvPjwvc3ZnPg==", "name": "RepeatEveryXSeconds", @@ -18343,6 +21004,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Triggers every X seconds.", @@ -18819,39 +21482,24 @@ "value": "MyTimer", "type": "String", "label": "The name of the timer to repeat", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TimerName" }, { "value": "1", "type": "Number", "label": "The time between each trigger (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TimerLength" }, { "value": "-1", "type": "Number", "label": "How many times should the timer trigger? -1 for forever.", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Limit" }, { "value": "0", "type": "Number", "label": "An internal counter", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Counter" } @@ -18866,6 +21514,7 @@ "category": "", "extensionNamespace": "", "fullName": "Explosion force", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/extension-explosion-force", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJvbWIiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuMjUsNkEzLjI1LDMuMjUgMCAwLDEgMTQuNSwyLjc1QTMuMjUsMy4yNSAwIDAsMSAxNy43NSw2QzE3Ljc1LDYuNDIgMTguMDgsNi43NSAxOC41LDYuNzVDMTguOTIsNi43NSAxOS4yNSw2LjQyIDE5LjI1LDZWNS4yNUgyMC43NVY2QTIuMjUsMi4yNSAwIDAsMSAxOC41LDguMjVBMi4yNSwyLjI1IDAgMCwxIDE2LjI1LDZBMS43NSwxLjc1IDAgMCwwIDE0LjUsNC4yNUExLjc1LDEuNzUgMCAwLDAgMTIuNzUsNkgxNFY3LjI5QzE2Ljg5LDguMTUgMTksMTAuODMgMTksMTRBNyw3IDAgMCwxIDEyLDIxQTcsNyAwIDAsMSA1LDE0QzUsMTAuODMgNy4xMSw4LjE1IDEwLDcuMjlWNkgxMS4yNU0yMiw2SDI0VjdIMjJWNk0xOSw0VjJIMjBWNEgxOU0yMC45MSw0LjM4TDIyLjMzLDIuOTZMMjMuMDQsMy42N0wyMS42Miw1LjA5TDIwLjkxLDQuMzhaIiAvPjwvc3ZnPg==", "name": "ExplosionForce", @@ -18900,6 +21549,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Simulate an explosion with physics forces on target objects", @@ -19118,6 +21769,7 @@ "category": "", "extensionNamespace": "", "fullName": "Create multiple copies of an object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdyaWQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAsNFY4SDE0VjRIMTBNMTYsNFY4SDIwVjRIMTZNMTYsMTBWMTRIMjBWMTBIMTZNMTYsMTZWMjBIMjBWMTZIMTZNMTQsMjBWMTZIMTBWMjBIMTRNOCwyMFYxNkg0VjIwSDhNOCwxNFYxMEg0VjE0SDhNOCw4VjRINFY4SDhNMTAsMTRIMTRWMTBIMTBWMTRNNCwySDIwQTIsMiAwIDAsMSAyMiw0VjIwQTIsMiAwIDAsMSAyMCwyMkg0QzIuOTIsMjIgMiwyMS4xIDIsMjBWNEEyLDIgMCAwLDEgNCwyWiIgLz48L3N2Zz4=", "name": "CreateMultipleCopiesOfObject", @@ -19151,6 +21803,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Create multiple copies of an object.\nSelect the object, choose the number of rows and columns, the spacing between rows and columns, the top left starting point, the layer to create the objects on, and the z-order of the objects.", @@ -19576,6 +22230,7 @@ "category": "", "extensionNamespace": "", "fullName": "⚙ DevToolkit", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "DevToolkit", @@ -19586,6 +22241,8 @@ "tags": [], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "fullName": "", @@ -20318,6 +22975,7 @@ "category": "", "extensionNamespace": "", "fullName": "Read pixels", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggZD0iTTIzLDI4Yy0xLjEsMC0yLjEtMC43LTIuNS0xLjhjMC0wLjEsMC0wLjItMC4xLTAuMmgtOC45YzAsMC4xLDAsMC4yLTAuMSwwLjJDMTEuMSwyNy4zLDEwLjEsMjgsOSwyOGMtMC42LDAtMSwwLjQtMSwxDQoJczAuNCwxLDEsMWgxNGMwLjYsMCwxLTAuNCwxLTFTMjMuNiwyOCwyMywyOHoiLz4NCjxwYXRoIGQ9Ik0yNywzSDVDMy4zLDMsMiw0LjMsMiw2djE1YzAsMS43LDEuMywzLDMsM2g2LjloOC4xSDI3YzEuNywwLDMtMS4zLDMtM1Y2QzMwLDQuMywyOC43LDMsMjcsM3ogTTEwLjQsMTlsNC42LTQuNmwxLjMsMS4zDQoJYzAuNCwwLjQsMSwwLjQsMS40LDBsMC4yLTAuMmwzLDMuNUgxMC40eiBNMjMsMThjMCwwLjEsMCwwLjIsMCwwLjJsLTQuMi00LjlDMTguNiwxMy4xLDE4LjMsMTMsMTgsMTNjLTAuMywwLTAuNSwwLjEtMC43LDAuMw0KCUwxNywxMy42bC0xLjMtMS4zYy0wLjQtMC40LTEtMC40LTEuNCwwTDksMTcuNlY5YzAtMC42LDAuNC0xLDEtMWgxMmMwLjYsMCwxLDAuNCwxLDFWMTh6Ii8+DQo8L3N2Zz4NCg==", "name": "ReadPixels", @@ -20343,6 +23001,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Return the alpha component of the pixel at the specified position.", @@ -20643,6 +23303,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Slice an object into pieces", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWtuaWZlIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIwLjYyLDJDMjMuOTcsNy42MSAxMi40NywyMC4xNSAxMi40NywyMC4xNUw5LjYsMTcuMjhMNC45MSwyMkwyLjc3LDE5Ljg2TDIwLjYyLDJaIiAvPjwvc3ZnPg==", "name": "ObjectSlicer", @@ -20667,6 +23328,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Slice an object into smaller pieces that match color of the original object. The new object should be a solid white color.", @@ -21477,6 +24140,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/orbiting-objects/orbiting-objects.json b/examples/orbiting-objects/orbiting-objects.json index 78956ccdb..d683ebc5f 100644 --- a/examples/orbiting-objects/orbiting-objects.json +++ b/examples/orbiting-objects/orbiting-objects.json @@ -1,13 +1,15 @@ { "firstLayout": "Elliptical Orbits", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "portrait", "packageName": "com.example.gamename", @@ -16,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Orbiting Objects", "description": "Try the new elliptical orbit that modifies the Z-order or orbiting objects to make a 3D effect!", @@ -77,10 +78,20 @@ "placement": "bottom-left", "showWatermark": true }, - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], - "authorUsernames": ["VictrisGames"], - "categories": ["mini-games"], - "playableDevices": ["keyboard", "mobile"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "authorUsernames": [ + "VictrisGames" + ], + "categories": [ + "mini-games" + ], + "playableDevices": [ + "keyboard", + "mobile", + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -92,7 +103,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Transparent light joystick border.png", "kind": "image", "metadata": "", @@ -105,7 +115,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Transparent light joystick thumb.png", "kind": "image", "metadata": "", @@ -118,7 +127,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/GDevelop complete logo (classic).png", "kind": "image", "metadata": "", @@ -131,7 +139,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/GDevelop complete logo (white).png", "kind": "image", "metadata": "", @@ -144,7 +151,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/GDevelop G logo (white).png", "kind": "image", "metadata": "", @@ -160,7 +166,7 @@ "file": "assets/LakkiReddy-Regular.ttf", "kind": "font", "metadata": "", - "name": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "name": "LakkiReddy-Regular.ttf", "userAdded": true, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Open Font License/10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", @@ -168,7 +174,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Gas.png", "kind": "image", "metadata": "", @@ -181,7 +186,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Star_LargeNarrow.png", "kind": "image", "metadata": "", @@ -194,7 +198,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Star_LargeWide.png", "kind": "image", "metadata": "", @@ -207,7 +210,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Star_Medium.png", "kind": "image", "metadata": "", @@ -220,7 +222,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Star_Small.png", "kind": "image", "metadata": "", @@ -233,7 +234,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Small Plastic Green Round Slider Border.png", "kind": "image", "metadata": "", @@ -246,7 +246,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Transparent.png", "kind": "image", "metadata": "", @@ -259,7 +258,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Small Plastic Green Round Slider Thumb.png", "kind": "image", "metadata": "", @@ -272,7 +270,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -285,7 +282,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -298,7 +294,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -311,7 +306,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_18.png", "kind": "image", "metadata": "", @@ -324,7 +318,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_102.png", "kind": "image", "metadata": "", @@ -337,7 +330,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_112.png", "kind": "image", "metadata": "", @@ -350,7 +342,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_122.png", "kind": "image", "metadata": "", @@ -363,7 +354,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_132.png", "kind": "image", "metadata": "", @@ -376,7 +366,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_142.png", "kind": "image", "metadata": "", @@ -389,7 +378,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_152.png", "kind": "image", "metadata": "", @@ -402,7 +390,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_162.png", "kind": "image", "metadata": "", @@ -415,7 +402,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_172.png", "kind": "image", "metadata": "", @@ -428,7 +414,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_22.png", "kind": "image", "metadata": "", @@ -441,7 +426,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_32.png", "kind": "image", "metadata": "", @@ -454,7 +438,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_42.png", "kind": "image", "metadata": "", @@ -467,7 +450,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_52.png", "kind": "image", "metadata": "", @@ -480,7 +462,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_62.png", "kind": "image", "metadata": "", @@ -493,7 +474,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_72.png", "kind": "image", "metadata": "", @@ -506,7 +486,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_82.png", "kind": "image", "metadata": "", @@ -519,7 +498,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_92.png", "kind": "image", "metadata": "", @@ -532,7 +510,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_17.png", "kind": "image", "metadata": "", @@ -545,7 +522,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_102.png", "kind": "image", "metadata": "", @@ -558,7 +534,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_112.png", "kind": "image", "metadata": "", @@ -571,7 +546,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_122.png", "kind": "image", "metadata": "", @@ -584,7 +558,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_132.png", "kind": "image", "metadata": "", @@ -597,7 +570,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_142.png", "kind": "image", "metadata": "", @@ -610,7 +582,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_152.png", "kind": "image", "metadata": "", @@ -623,7 +594,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_162.png", "kind": "image", "metadata": "", @@ -636,7 +606,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_22.png", "kind": "image", "metadata": "", @@ -649,7 +618,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_32.png", "kind": "image", "metadata": "", @@ -662,7 +630,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_42.png", "kind": "image", "metadata": "", @@ -675,7 +642,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_52.png", "kind": "image", "metadata": "", @@ -688,7 +654,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_62.png", "kind": "image", "metadata": "", @@ -701,7 +666,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_72.png", "kind": "image", "metadata": "", @@ -714,7 +678,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_82.png", "kind": "image", "metadata": "", @@ -727,7 +690,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_92.png", "kind": "image", "metadata": "", @@ -740,7 +702,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_17.png", "kind": "image", "metadata": "", @@ -753,7 +714,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_102.png", "kind": "image", "metadata": "", @@ -766,7 +726,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_112.png", "kind": "image", "metadata": "", @@ -779,7 +738,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_122.png", "kind": "image", "metadata": "", @@ -792,7 +750,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_132.png", "kind": "image", "metadata": "", @@ -805,7 +762,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_142.png", "kind": "image", "metadata": "", @@ -818,7 +774,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_152.png", "kind": "image", "metadata": "", @@ -831,7 +786,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_162.png", "kind": "image", "metadata": "", @@ -844,7 +798,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_22.png", "kind": "image", "metadata": "", @@ -857,7 +810,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_32.png", "kind": "image", "metadata": "", @@ -870,7 +822,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_42.png", "kind": "image", "metadata": "", @@ -883,7 +834,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_52.png", "kind": "image", "metadata": "", @@ -896,7 +846,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_62.png", "kind": "image", "metadata": "", @@ -909,7 +858,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_72.png", "kind": "image", "metadata": "", @@ -922,7 +870,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_82.png", "kind": "image", "metadata": "", @@ -935,7 +882,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_92.png", "kind": "image", "metadata": "", @@ -948,7 +894,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_12.png", "kind": "image", "metadata": "", @@ -961,7 +906,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_102.png", "kind": "image", "metadata": "", @@ -974,7 +918,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_112.png", "kind": "image", "metadata": "", @@ -987,7 +930,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_22.png", "kind": "image", "metadata": "", @@ -1000,7 +942,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_32.png", "kind": "image", "metadata": "", @@ -1013,7 +954,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_42.png", "kind": "image", "metadata": "", @@ -1026,7 +966,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_52.png", "kind": "image", "metadata": "", @@ -1039,7 +978,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_62.png", "kind": "image", "metadata": "", @@ -1052,7 +990,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_72.png", "kind": "image", "metadata": "", @@ -1065,7 +1002,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_82.png", "kind": "image", "metadata": "", @@ -1078,7 +1014,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_92.png", "kind": "image", "metadata": "", @@ -1091,7 +1026,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_12.png", "kind": "image", "metadata": "", @@ -1104,7 +1038,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_102.png", "kind": "image", "metadata": "", @@ -1117,7 +1050,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_112.png", "kind": "image", "metadata": "", @@ -1130,7 +1062,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_22.png", "kind": "image", "metadata": "", @@ -1143,7 +1074,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_32.png", "kind": "image", "metadata": "", @@ -1156,7 +1086,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_42.png", "kind": "image", "metadata": "", @@ -1169,7 +1098,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_52.png", "kind": "image", "metadata": "", @@ -1182,7 +1110,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_62.png", "kind": "image", "metadata": "", @@ -1195,7 +1122,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_72.png", "kind": "image", "metadata": "", @@ -1208,7 +1134,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_82.png", "kind": "image", "metadata": "", @@ -1221,7 +1146,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_92.png", "kind": "image", "metadata": "", @@ -1234,7 +1158,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_14.png", "kind": "image", "metadata": "", @@ -1247,7 +1170,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_102.png", "kind": "image", "metadata": "", @@ -1260,7 +1182,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_112.png", "kind": "image", "metadata": "", @@ -1273,7 +1194,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_122.png", "kind": "image", "metadata": "", @@ -1286,7 +1206,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_132.png", "kind": "image", "metadata": "", @@ -1299,7 +1218,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_22.png", "kind": "image", "metadata": "", @@ -1312,7 +1230,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_32.png", "kind": "image", "metadata": "", @@ -1325,7 +1242,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_42.png", "kind": "image", "metadata": "", @@ -1338,7 +1254,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_52.png", "kind": "image", "metadata": "", @@ -1351,7 +1266,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_62.png", "kind": "image", "metadata": "", @@ -1364,7 +1278,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_72.png", "kind": "image", "metadata": "", @@ -1377,7 +1290,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_82.png", "kind": "image", "metadata": "", @@ -1390,7 +1302,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_92.png", "kind": "image", "metadata": "", @@ -1403,7 +1314,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_12.png", "kind": "image", "metadata": "", @@ -1416,7 +1326,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_22.png", "kind": "image", "metadata": "", @@ -1429,7 +1338,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_32.png", "kind": "image", "metadata": "", @@ -1442,7 +1350,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_42.png", "kind": "image", "metadata": "", @@ -1455,7 +1362,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_52.png", "kind": "image", "metadata": "", @@ -1468,7 +1374,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_62.png", "kind": "image", "metadata": "", @@ -1481,7 +1386,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_72.png", "kind": "image", "metadata": "", @@ -1494,7 +1398,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_82.png", "kind": "image", "metadata": "", @@ -1507,7 +1410,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_12.png", "kind": "image", "metadata": "", @@ -1520,7 +1422,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_102.png", "kind": "image", "metadata": "", @@ -1533,7 +1434,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_22.png", "kind": "image", "metadata": "", @@ -1546,7 +1446,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_32.png", "kind": "image", "metadata": "", @@ -1559,7 +1458,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_42.png", "kind": "image", "metadata": "", @@ -1572,7 +1470,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_52.png", "kind": "image", "metadata": "", @@ -1585,7 +1482,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_62.png", "kind": "image", "metadata": "", @@ -1598,7 +1494,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_72.png", "kind": "image", "metadata": "", @@ -1611,7 +1506,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_82.png", "kind": "image", "metadata": "", @@ -1624,7 +1518,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_92.png", "kind": "image", "metadata": "", @@ -1637,7 +1530,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_13.png", "kind": "image", "metadata": "", @@ -1650,7 +1542,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_102.png", "kind": "image", "metadata": "", @@ -1663,7 +1554,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_112.png", "kind": "image", "metadata": "", @@ -1676,7 +1566,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_122.png", "kind": "image", "metadata": "", @@ -1689,7 +1578,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_22.png", "kind": "image", "metadata": "", @@ -1702,7 +1590,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_32.png", "kind": "image", "metadata": "", @@ -1715,7 +1602,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_42.png", "kind": "image", "metadata": "", @@ -1728,7 +1614,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_52.png", "kind": "image", "metadata": "", @@ -1741,7 +1626,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_62.png", "kind": "image", "metadata": "", @@ -1754,7 +1638,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_72.png", "kind": "image", "metadata": "", @@ -1767,7 +1650,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_82.png", "kind": "image", "metadata": "", @@ -1780,7 +1662,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_92.png", "kind": "image", "metadata": "", @@ -1793,7 +1674,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_12.png", "kind": "image", "metadata": "", @@ -1806,7 +1686,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_22.png", "kind": "image", "metadata": "", @@ -1819,7 +1698,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_32.png", "kind": "image", "metadata": "", @@ -1832,7 +1710,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_42.png", "kind": "image", "metadata": "", @@ -1845,7 +1722,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_52.png", "kind": "image", "metadata": "", @@ -1858,7 +1734,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_62.png", "kind": "image", "metadata": "", @@ -1871,7 +1746,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_72.png", "kind": "image", "metadata": "", @@ -1884,7 +1758,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_82.png", "kind": "image", "metadata": "", @@ -1897,7 +1770,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_12.png", "kind": "image", "metadata": "", @@ -1910,7 +1782,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_102.png", "kind": "image", "metadata": "", @@ -1923,7 +1794,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_22.png", "kind": "image", "metadata": "", @@ -1936,7 +1806,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_32.png", "kind": "image", "metadata": "", @@ -1949,7 +1818,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_42.png", "kind": "image", "metadata": "", @@ -1962,7 +1830,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_52.png", "kind": "image", "metadata": "", @@ -1975,7 +1842,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_62.png", "kind": "image", "metadata": "", @@ -1988,7 +1854,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_72.png", "kind": "image", "metadata": "", @@ -2001,7 +1866,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_82.png", "kind": "image", "metadata": "", @@ -2014,7 +1878,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_92.png", "kind": "image", "metadata": "", @@ -2027,7 +1890,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Crystal2.png", "kind": "image", "metadata": "", @@ -2050,7 +1912,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -2058,10 +1919,12 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -2080,13 +1943,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.44036845014237413, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -2296,14 +2162,15 @@ { "assetStoreId": "14597a6b9020c730f9fd07fdf2b0deaba2505f0c33fd78ccd2e982b5ecee350b", "name": "TransparentLightJoystick", - "tags": "", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", "variables": [], "effects": [], "behaviors": [], "content": {}, "childrenContent": { "Border": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -2338,6 +2205,7 @@ ] }, "Thumb": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -2379,7 +2247,6 @@ "italic": false, "name": "Text0", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2404,13 +2271,35 @@ } ], "string": "0", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 550, "color": { "b": 28, "g": 231, "r": 248 + }, + "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": "0", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 550, + "lineHeight": 0, + "color": "248;231;28" } }, { @@ -2419,7 +2308,6 @@ "italic": false, "name": "HorizontalSize_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2444,13 +2332,35 @@ } ], "string": "Width", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 50, "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": "Width", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 50, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2459,7 +2369,6 @@ "italic": false, "name": "Title_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2471,13 +2380,35 @@ } ], "string": "Orbiting Objects Extension\n(Elliptical orbit)", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 70, "color": { "b": 224, "g": 16, "r": 189 + }, + "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": "Orbiting Objects Extension\n(Elliptical orbit)", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 70, + "lineHeight": 0, + "color": "189;16;224" } }, { @@ -2486,7 +2417,6 @@ "italic": false, "name": "VerticalSize_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2511,13 +2441,35 @@ } ], "string": "Height", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 50, "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": "Height", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 50, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2526,7 +2478,6 @@ "italic": false, "name": "Foreground_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2551,13 +2502,35 @@ } ], "string": "Foreground\nSide", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 40, "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": "Foreground\nSide", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2566,7 +2539,6 @@ "italic": false, "name": "Text2", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2591,13 +2563,35 @@ } ], "string": "2", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 300, "color": { "b": 28, "g": 231, "r": 248 + }, + "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": "2", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 300, + "lineHeight": 0, + "color": "248;231;28" } }, { @@ -2606,7 +2600,6 @@ "italic": false, "name": "Text3", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2631,13 +2624,35 @@ } ], "string": "3", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 300, "color": { "b": 28, "g": 231, "r": 248 + }, + "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": "3", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 300, + "lineHeight": 0, + "color": "248;231;28" } }, { @@ -2646,7 +2661,6 @@ "italic": false, "name": "JoystickChallenge_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2658,19 +2672,41 @@ } ], "string": "#JoystickChallenge", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-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": "#JoystickChallenge", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 80, + "lineHeight": 0, + "color": "255;255;255" } }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "41720015614a457303209ae93ed21ff1ebc2c8d77a5341d7f033e88cde53fc4e", "name": "GdevelopCompleteLogoClassic", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2709,9 +2745,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "3c439a5142f6ea19bc70afbbcb66c824c55af7fac5f64b1b79ab603b68d70195", "name": "GdevelopCompleteLogoWhite", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2750,9 +2786,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "6e0bb6ed3d9b15390d252ea815ed2e0a3bc72036cb7efc1efcc7d72f3c7610f4", "name": "GdevelopGLogoWhite", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2799,6 +2835,7 @@ "emitterForceMax": 50, "emitterForceMin": 50, "flow": 200, + "jumpForwardInTimeOnCreation": 0, "maxParticleNb": 1000, "name": "Gas", "particleAlpha1": 100, @@ -2811,6 +2848,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 224, "particleBlue2": 255, + "particleColor1": "189;16;224", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 16, @@ -2826,7 +2865,6 @@ "rendererParam1": 1, "rendererParam2": 1, "rendererType": "Quad", - "tags": "", "tank": -1, "textureParticleName": "Gas.png", "type": "ParticleSystem::ParticleEmitter", @@ -2836,9 +2874,9 @@ "behaviors": [] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "574655a4565bd983af8f5dd98e0fd8cda3bd67cf929c00d3db317e898322e06b", "name": "Star", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2979,8 +3017,8 @@ { "assetStoreId": "05b0eb2d13ff37b70927d0184d4705e9c39c0b8fece7463127c4fe9eb65bb422", "name": "HorizontalSize_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Small Plastic Green Round Slider", "variables": [], "effects": [], "behaviors": [], @@ -3026,6 +3064,28 @@ "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, "Thumb": { @@ -3043,8 +3103,8 @@ { "assetStoreId": "05b0eb2d13ff37b70927d0184d4705e9c39c0b8fece7463127c4fe9eb65bb422", "name": "VerticalSize_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Small Plastic Green Round Slider", "variables": [], "effects": [], "behaviors": [], @@ -3090,6 +3150,28 @@ "b": 221, "g": 221, "r": 221 + }, + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "221;221;221" } }, "Thumb": { @@ -3107,8 +3189,9 @@ { "assetStoreId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", "name": "ForegroundTop_Button", - "tags": "", + "persistentUuid": "3daac84e-badc-46d5-844f-118b9f2fe10b", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -3118,9 +3201,23 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Top" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 0, "height": 102, @@ -3154,6 +3251,28 @@ "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": "Top", + "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -3171,8 +3290,8 @@ { "assetStoreId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", "name": "ForegroundBottom_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -3182,9 +3301,23 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Bottom" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 0, "height": 102, @@ -3218,6 +3351,28 @@ "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": "Bottom", + "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -3235,8 +3390,8 @@ { "assetStoreId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", "name": "ForegroundLeft_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -3246,9 +3401,23 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Left" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 0, "height": 102, @@ -3282,6 +3451,28 @@ "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": "Left", + "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -3299,8 +3490,8 @@ { "assetStoreId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", "name": "ForegroundRight_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -3310,9 +3501,23 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 + "HoveredFadeOutDuration": 0.2, + "LabelText": "Right" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 0, "height": 102, @@ -3346,6 +3551,28 @@ "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": "Right", + "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -3361,6 +3588,71 @@ } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "TransparentLightJoystick" + }, + { + "objectName": "Text0" + }, + { + "objectName": "HorizontalSize_Text" + }, + { + "objectName": "Title_Text" + }, + { + "objectName": "VerticalSize_Text" + }, + { + "objectName": "Foreground_Text" + }, + { + "objectName": "Text2" + }, + { + "objectName": "Text3" + }, + { + "objectName": "JoystickChallenge_Text" + }, + { + "objectName": "GdevelopCompleteLogoClassic" + }, + { + "objectName": "GdevelopCompleteLogoWhite" + }, + { + "objectName": "GdevelopGLogoWhite" + }, + { + "objectName": "Gas" + }, + { + "objectName": "Star" + }, + { + "objectName": "HorizontalSize_Slider" + }, + { + "objectName": "VerticalSize_Slider" + }, + { + "objectName": "ForegroundTop_Button" + }, + { + "objectName": "ForegroundBottom_Button" + }, + { + "objectName": "ForegroundLeft_Button" + }, + { + "objectName": "ForegroundRight_Button" + } + ] + }, "events": [ { "colorB": 228, @@ -3379,7 +3671,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [], @@ -3392,25 +3686,41 @@ "type": { "value": "ParticleSystem::SetFlow" }, - "parameters": ["Gas", "=", "150"] + "parameters": [ + "Gas", + "=", + "150" + ] }, { "type": { "value": "ParticleSystem::EmitterForceMax" }, - "parameters": ["Gas", "=", "50"] + "parameters": [ + "Gas", + "=", + "50" + ] }, { "type": { "value": "ParticleSystem::EmitterForceMin" }, - "parameters": ["Gas", "=", "50"] + "parameters": [ + "Gas", + "=", + "50" + ] }, { "type": { "value": "ModVarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Bottom\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Bottom\"" + ] } ] }, @@ -3454,7 +3764,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": ["ForegroundTop_Button", ""] + "parameters": [ + "ForegroundTop_Button", + "" + ] } ], "actions": [ @@ -3462,7 +3775,11 @@ "type": { "value": "ModVarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Top\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Top\"" + ] } ] }, @@ -3473,7 +3790,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": ["ForegroundBottom_Button", ""] + "parameters": [ + "ForegroundBottom_Button", + "" + ] } ], "actions": [ @@ -3481,7 +3801,11 @@ "type": { "value": "ModVarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Bottom\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Bottom\"" + ] } ] }, @@ -3492,7 +3816,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": ["ForegroundLeft_Button", ""] + "parameters": [ + "ForegroundLeft_Button", + "" + ] } ], "actions": [ @@ -3500,7 +3827,11 @@ "type": { "value": "ModVarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Left\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Left\"" + ] } ] }, @@ -3511,7 +3842,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": ["ForegroundRight_Button", ""] + "parameters": [ + "ForegroundRight_Button", + "" + ] } ], "actions": [ @@ -3519,7 +3853,11 @@ "type": { "value": "ModVarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Right\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Right\"" + ] } ] }, @@ -3531,7 +3869,11 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetOpacity" }, - "parameters": ["Buttons", "=", "128"] + "parameters": [ + "Buttons", + "=", + "128" + ] } ] }, @@ -3542,7 +3884,11 @@ "type": { "value": "VarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Top\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Top\"" + ] } ], "actions": [ @@ -3550,7 +3896,11 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetOpacity" }, - "parameters": ["ForegroundTop_Button", "=", "255"] + "parameters": [ + "ForegroundTop_Button", + "=", + "255" + ] } ], "events": [ @@ -3569,13 +3919,23 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["HorizontalSize_Slider", "=", "300", ""] + "parameters": [ + "HorizontalSize_Slider", + "=", + "300", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["VerticalSize_Slider", "=", "75", ""] + "parameters": [ + "VerticalSize_Slider", + "=", + "75", + "" + ] } ] } @@ -3588,7 +3948,11 @@ "type": { "value": "VarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Bottom\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Bottom\"" + ] } ], "actions": [ @@ -3596,7 +3960,11 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetOpacity" }, - "parameters": ["ForegroundBottom_Button", "=", "255"] + "parameters": [ + "ForegroundBottom_Button", + "=", + "255" + ] } ], "events": [ @@ -3615,13 +3983,23 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["HorizontalSize_Slider", "=", "300", ""] + "parameters": [ + "HorizontalSize_Slider", + "=", + "300", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["VerticalSize_Slider", "=", "75", ""] + "parameters": [ + "VerticalSize_Slider", + "=", + "75", + "" + ] } ] } @@ -3634,7 +4012,11 @@ "type": { "value": "VarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Left\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Left\"" + ] } ], "actions": [ @@ -3642,7 +4024,11 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetOpacity" }, - "parameters": ["ForegroundLeft_Button", "=", "255"] + "parameters": [ + "ForegroundLeft_Button", + "=", + "255" + ] } ], "events": [ @@ -3661,13 +4047,23 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["HorizontalSize_Slider", "=", "75", ""] + "parameters": [ + "HorizontalSize_Slider", + "=", + "75", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["VerticalSize_Slider", "=", "300", ""] + "parameters": [ + "VerticalSize_Slider", + "=", + "300", + "" + ] } ] } @@ -3680,7 +4076,11 @@ "type": { "value": "VarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Right\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Right\"" + ] } ], "actions": [ @@ -3688,7 +4088,11 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetOpacity" }, - "parameters": ["ForegroundRight_Button", "=", "255"] + "parameters": [ + "ForegroundRight_Button", + "=", + "255" + ] } ], "events": [ @@ -3707,13 +4111,23 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["HorizontalSize_Slider", "=", "75", ""] + "parameters": [ + "HorizontalSize_Slider", + "=", + "75", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["VerticalSize_Slider", "=", "300", ""] + "parameters": [ + "VerticalSize_Slider", + "=", + "300", + "" + ] } ] } @@ -3765,9 +4179,16 @@ "ambientLightColorB": 10038552, "ambientLightColorG": 6067680, "ambientLightColorR": 9764888, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Background", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -3776,9 +4197,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 8065944, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -3796,9 +4224,37 @@ } ], "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": "ShakeObject_PositionAngle", "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] }, @@ -3817,13 +4273,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 0.4986558268409531, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -4133,7 +4592,6 @@ { "assetStoreId": "", "name": "SpeedSlider", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4164,23 +4622,117 @@ "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 + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "DistanceSlider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": " 24;119;211", + "ThumbOpacity": 255, + "TrackWidth": 200, + "TrackHeight": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "RoundedTrack": true + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "OffsetSlider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": " 24;119;211", + "ThumbOpacity": 255, + "TrackWidth": 200, + "TrackHeight": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "RoundedTrack": true + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, "absoluteCoordinates": false, - "clearBetweenFrames": true + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } }, { "assetStoreId": "", - "name": "DistanceSlider", - "tags": "", + "name": "RotationSlider", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4211,117 +4763,23 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, "absoluteCoordinates": false, - "clearBetweenFrames": true - }, - { - "assetStoreId": "", - "name": "OffsetSlider", - "tags": "", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": " 24;119;211", - "ThumbOpacity": 255, - "TrackWidth": 200, - "TrackHeight": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "RoundedTrack": true - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, + "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 - }, - { - "assetStoreId": "", - "name": "RotationSlider", - "tags": "", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": " 24;119;211", - "ThumbOpacity": 255, - "TrackWidth": 200, - "TrackHeight": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "RoundedTrack": true - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "b": 0 + } }, { "assetStoreId": "", "name": "QtySlider", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4352,18 +4810,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 + "b": 0 + } }, { "assetStoreId": "", @@ -4371,7 +4830,6 @@ "italic": false, "name": "OrbitDistance", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4385,6 +4843,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Distance: 100", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4393,7 +4873,6 @@ "italic": false, "name": "OrbitSpeed", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4407,6 +4886,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Speed: 100", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4415,7 +4916,6 @@ "italic": false, "name": "StartingOffset", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4429,6 +4929,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Offset: 123", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4437,7 +4959,6 @@ "italic": false, "name": "OrbitRotation", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4451,6 +4972,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Rotation: 10", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4459,7 +5002,6 @@ "italic": false, "name": "OrbitMode", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4473,6 +5015,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Only active during left-click?", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4481,7 +5045,6 @@ "italic": false, "name": "ResetAfterDeletionText", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4495,6 +5058,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Reset position after reducing quantity?", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4503,7 +5088,6 @@ "italic": false, "name": "RightClickInstructions", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4517,6 +5101,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Right-click to delete orbiting objects?", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4525,7 +5131,6 @@ "italic": false, "name": "Title", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4539,6 +5144,28 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Extension: Orbiting Objects", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 50, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4547,7 +5174,6 @@ "italic": false, "name": "OrbitQuantity", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4561,12 +5187,33 @@ "b": 0, "g": 0, "r": 0 + }, + "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": "Quantity: 10", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { "assetStoreId": "", "name": "RightClickDelete", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4600,23 +5247,23 @@ "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 + "b": 0 + } }, { "assetStoreId": "", "name": "ResetAfterDeletion", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4650,23 +5297,23 @@ "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 + "b": 0 + } }, { "assetStoreId": "", "name": "LeftClickAnimate", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4700,23 +5347,24 @@ "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 + "b": 0 + } }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "69613f0acdefed2b5aeaeddc7eb0036d5f1926e97b87a7bae837f9c9c94222c9", "name": "Santa", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -6226,9 +6874,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "825abcfda20c825cd2876bd73588886607a2787c57000758522b5463e02cf577", "name": "Dino", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -7114,9 +7762,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "ea0d1ca2d62d7786253980d9f593997ffb33b29be81c75305b70ae109c37acc8", "name": "Crystal", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -7155,6 +7803,71 @@ ] } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "SpeedSlider" + }, + { + "objectName": "DistanceSlider" + }, + { + "objectName": "OffsetSlider" + }, + { + "objectName": "RotationSlider" + }, + { + "objectName": "QtySlider" + }, + { + "objectName": "OrbitDistance" + }, + { + "objectName": "OrbitSpeed" + }, + { + "objectName": "StartingOffset" + }, + { + "objectName": "OrbitRotation" + }, + { + "objectName": "OrbitMode" + }, + { + "objectName": "ResetAfterDeletionText" + }, + { + "objectName": "RightClickInstructions" + }, + { + "objectName": "Title" + }, + { + "objectName": "OrbitQuantity" + }, + { + "objectName": "RightClickDelete" + }, + { + "objectName": "ResetAfterDeletion" + }, + { + "objectName": "LeftClickAnimate" + }, + { + "objectName": "Santa" + }, + { + "objectName": "Dino" + }, + { + "objectName": "Crystal" + } + ] + }, "events": [ { "colorB": 228, @@ -7172,7 +7885,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [], @@ -7240,7 +7955,11 @@ "type": { "value": "SetGameResolutionSize" }, - "parameters": ["", "1280", "720"] + "parameters": [ + "", + "1280", + "720" + ] } ] } @@ -7410,8 +8129,7 @@ "textG": 0, "textR": 0 }, - "comment": "Animate orbiting objects only when left button is clicked on a Santa", - "comment2": "" + "comment": "Animate orbiting objects only when left button is clicked on a Santa" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7420,19 +8138,31 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["LeftClickAnimate", "ToggleSwitch", ""] + "parameters": [ + "LeftClickAnimate", + "ToggleSwitch", + "" + ] }, { "type": { "value": "MouseButtonPressed" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] }, { "type": { "value": "SourisSurObjet" }, - "parameters": ["Santa", "", "", ""] + "parameters": [ + "Santa", + "", + "", + "" + ] } ], "actions": [], @@ -7444,7 +8174,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["ResetAfterDeletion", "ToggleSwitch", ""] + "parameters": [ + "ResetAfterDeletion", + "ToggleSwitch", + "" + ] } ], "actions": [], @@ -7508,7 +8242,11 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["ResetAfterDeletion", "ToggleSwitch", ""] + "parameters": [ + "ResetAfterDeletion", + "ToggleSwitch", + "" + ] } ], "actions": [], @@ -7574,7 +8312,11 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["LeftClickAnimate", "ToggleSwitch", ""] + "parameters": [ + "LeftClickAnimate", + "ToggleSwitch", + "" + ] } ], "actions": [], @@ -7586,72 +8328,80 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["ResetAfterDeletion", "ToggleSwitch", ""] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "OrbitingObjects::AnimateOrbitingObjects" - }, - "parameters": [ - "", - "Santa", - "Crystal", - "Variable(SliderQty)", - "Variable(SliderSpeed)", - "Variable(SliderDistance)", - "Variable(SliderRotation)", - "\"\"", - "150", - "0", - "yes", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "OrbitingObjects::AnimateOrbitingObjects" - }, - "parameters": [ - "", - "Santa", - "Dino", - "Variable(SliderQty)", - "Variable(SliderSpeed)", - "Variable(SliderDistance)", - "Variable(SliderRotation)", - "\"\"", - "100", - "Variable(SliderOffset)", - "yes" - ] - } + "parameters": [ + "ResetAfterDeletion", + "ToggleSwitch", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "OrbitingObjects::AnimateOrbitingObjects" + }, + "parameters": [ + "", + "Santa", + "Crystal", + "Variable(SliderQty)", + "Variable(SliderSpeed)", + "Variable(SliderDistance)", + "Variable(SliderRotation)", + "\"\"", + "150", + "0", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "OrbitingObjects::AnimateOrbitingObjects" + }, + "parameters": [ + "", + "Santa", + "Dino", + "Variable(SliderQty)", + "Variable(SliderSpeed)", + "Variable(SliderDistance)", + "Variable(SliderRotation)", + "\"\"", + "100", + "Variable(SliderOffset)", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ToggleSwitch::ToggleSwitch::IsChecked" + }, + "parameters": [ + "ResetAfterDeletion", + "ToggleSwitch", + "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "ToggleSwitch::ToggleSwitch::IsChecked" - }, - "parameters": ["ResetAfterDeletion", "ToggleSwitch", ""] - } ], "actions": [], "events": [ @@ -7718,8 +8468,7 @@ "textG": 0, "textR": 0 }, - "comment": "Changing offset requires object quantity to change", - "comment2": "" + "comment": "Changing offset requires object quantity to change" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7728,13 +8477,20 @@ "type": { "value": "MouseButtonPressed" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] }, { "type": { "value": "DraggableSliderControl::DraggableSliderControl::IsBeingDragged" }, - "parameters": ["OffsetSlider", "DraggableSliderControl", ""] + "parameters": [ + "OffsetSlider", + "DraggableSliderControl", + "" + ] } ], "actions": [ @@ -7742,7 +8498,12 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetValue" }, - "parameters": ["QtySlider", "DraggableSliderControl", "0", ""] + "parameters": [ + "QtySlider", + "DraggableSliderControl", + "0", + "" + ] } ] }, @@ -7756,8 +8517,7 @@ "textG": 0, "textR": 0 }, - "comment": "Delete orbiting objects", - "comment2": "" + "comment": "Delete orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7766,7 +8526,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["RightClickDelete", "ToggleSwitch", ""] + "parameters": [ + "RightClickDelete", + "ToggleSwitch", + "" + ] } ], "actions": [], @@ -7778,7 +8542,10 @@ "type": { "value": "MouseButtonPressed" }, - "parameters": ["", "Right"] + "parameters": [ + "", + "Right" + ] }, { "type": { @@ -7790,7 +8557,12 @@ "type": { "value": "SourisSurObjet" }, - "parameters": ["Santa", "", "", ""] + "parameters": [ + "Santa", + "", + "", + "" + ] } ], "actions": [ @@ -7798,13 +8570,25 @@ "type": { "value": "OrbitingObjects::DeleteOrbitingObjects" }, - "parameters": ["", "Santa", "Crystal", "\"Crystals\"", ""] + "parameters": [ + "", + "Santa", + "Crystal", + "\"Crystals\"", + "" + ] }, { "type": { "value": "OrbitingObjects::DeleteOrbitingObjects" }, - "parameters": ["", "Santa", "Dino", "\"Dino2\"", ""] + "parameters": [ + "", + "Santa", + "Dino", + "\"Dino2\"", + "" + ] } ] } @@ -7819,9 +8603,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -7840,13 +8631,37 @@ ], "behaviorsSharedData": [ { - "name": "Checkbox", - "type": "Checkbox::Checkbox" + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" }, { "name": "DraggableSliderControl", "type": "DraggableSliderControl::DraggableSliderControl" }, + { + "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": "ToggleSwitch", "type": "ToggleSwitch::ToggleSwitch" @@ -7868,13 +8683,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.311387517316283, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -8021,14 +8839,15 @@ { "assetStoreId": "14597a6b9020c730f9fd07fdf2b0deaba2505f0c33fd78ccd2e982b5ecee350b", "name": "TransparentLightJoystick", - "tags": "", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", "variables": [], "effects": [], "behaviors": [], "content": {}, "childrenContent": { "Border": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -8063,6 +8882,7 @@ ] }, "Thumb": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -8104,7 +8924,6 @@ "italic": false, "name": "Touches_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -8129,13 +8948,35 @@ } ], "string": "0", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 645, "color": { "b": 28, "g": 231, "r": 248 + }, + "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": "0", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 645, + "lineHeight": 0, + "color": "248;231;28" } }, { @@ -8144,7 +8985,6 @@ "italic": false, "name": "JoystickChallenge_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -8156,19 +8996,41 @@ } ], "string": "#JoystickChallenge", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-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": "#JoystickChallenge", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 80, + "lineHeight": 0, + "color": "255;255;255" } }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "41720015614a457303209ae93ed21ff1ebc2c8d77a5341d7f033e88cde53fc4e", "name": "GdevelopCompleteLogoClassic", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -8207,9 +9069,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "3c439a5142f6ea19bc70afbbcb66c824c55af7fac5f64b1b79ab603b68d70195", "name": "GdevelopCompleteLogoWhite", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -8248,9 +9110,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "6e0bb6ed3d9b15390d252ea815ed2e0a3bc72036cb7efc1efcc7d72f3c7610f4", "name": "GdevelopGLogoWhite", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -8297,6 +9159,7 @@ "emitterForceMax": 50, "emitterForceMin": 50, "flow": 100, + "jumpForwardInTimeOnCreation": 0, "maxParticleNb": 1000, "name": "Gas", "particleAlpha1": 100, @@ -8309,6 +9172,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 224, "particleBlue2": 255, + "particleColor1": "189;16;224", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 16, @@ -8324,7 +9189,6 @@ "rendererParam1": 1, "rendererParam2": 1, "rendererType": "Quad", - "tags": "", "tank": -1, "textureParticleName": "Gas.png", "type": "ParticleSystem::ParticleEmitter", @@ -8334,9 +9198,9 @@ "behaviors": [] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "574655a4565bd983af8f5dd98e0fd8cda3bd67cf929c00d3db317e898322e06b", "name": "Star", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -8475,6 +9339,35 @@ ] } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "TransparentLightJoystick" + }, + { + "objectName": "Touches_Text" + }, + { + "objectName": "JoystickChallenge_Text" + }, + { + "objectName": "GdevelopCompleteLogoClassic" + }, + { + "objectName": "GdevelopCompleteLogoWhite" + }, + { + "objectName": "GdevelopGLogoWhite" + }, + { + "objectName": "Gas" + }, + { + "objectName": "Star" + } + ] + }, "events": [ { "colorB": 228, @@ -8492,7 +9385,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -8500,7 +9395,11 @@ "type": { "value": "SetGameResolutionSize" }, - "parameters": ["", "720", "1280"] + "parameters": [ + "", + "720", + "1280" + ] } ] } @@ -8524,7 +9423,11 @@ "type": { "value": "ModVarScene" }, - "parameters": ["ActiveJoystickQty", "=", "0"] + "parameters": [ + "ActiveJoystickQty", + "=", + "0" + ] } ] }, @@ -8535,7 +9438,12 @@ "type": { "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::JoystickForce" }, - "parameters": ["TransparentLightJoystick", ">", "0.5", ""] + "parameters": [ + "TransparentLightJoystick", + ">", + "0.5", + "" + ] } ], "actions": [ @@ -8573,8 +9481,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start and stop music", - "comment2": "" + "comment": "Start and stop music" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8583,7 +9490,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "0"] + "parameters": [ + "ActiveJoystickQty", + "=", + "0" + ] } ], "actions": [ @@ -8591,7 +9502,10 @@ "type": { "value": "StopSoundCanal" }, - "parameters": ["", "1"] + "parameters": [ + "", + "1" + ] } ] }, @@ -8602,7 +9516,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", ">", "0"] + "parameters": [ + "ActiveJoystickQty", + ">", + "0" + ] }, { "type": { @@ -8637,8 +9555,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set volume", - "comment2": "" + "comment": "Set volume" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8647,7 +9564,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "1"] + "parameters": [ + "ActiveJoystickQty", + "=", + "1" + ] } ], "actions": [ @@ -8655,7 +9576,11 @@ "type": { "value": "ModGlobalVolume" }, - "parameters": ["", "=", "20"] + "parameters": [ + "", + "=", + "20" + ] } ] }, @@ -8666,7 +9591,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "2"] + "parameters": [ + "ActiveJoystickQty", + "=", + "2" + ] } ], "actions": [ @@ -8674,7 +9603,11 @@ "type": { "value": "ModGlobalVolume" }, - "parameters": ["", "=", "40"] + "parameters": [ + "", + "=", + "40" + ] } ] }, @@ -8685,7 +9618,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "3"] + "parameters": [ + "ActiveJoystickQty", + "=", + "3" + ] } ], "actions": [ @@ -8693,7 +9630,11 @@ "type": { "value": "ModGlobalVolume" }, - "parameters": ["", "=", "60"] + "parameters": [ + "", + "=", + "60" + ] } ] }, @@ -8704,7 +9645,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "4"] + "parameters": [ + "ActiveJoystickQty", + "=", + "4" + ] } ], "actions": [ @@ -8712,7 +9657,11 @@ "type": { "value": "ModGlobalVolume" }, - "parameters": ["", "=", "80"] + "parameters": [ + "", + "=", + "80" + ] } ] }, @@ -8723,7 +9672,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "5"] + "parameters": [ + "ActiveJoystickQty", + "=", + "5" + ] } ], "actions": [ @@ -8731,7 +9684,11 @@ "type": { "value": "ModGlobalVolume" }, - "parameters": ["", "=", "100"] + "parameters": [ + "", + "=", + "100" + ] } ] } @@ -8754,7 +9711,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "<", "5"] + "parameters": [ + "ActiveJoystickQty", + "<", + "5" + ] }, { "type": { @@ -8768,19 +9729,32 @@ "type": { "value": "ParticleSystem::EmitterForceMax" }, - "parameters": ["Gas", "=", "50"] + "parameters": [ + "Gas", + "=", + "50" + ] }, { "type": { "value": "ParticleSystem::EmitterForceMin" }, - "parameters": ["Gas", "=", "50"] + "parameters": [ + "Gas", + "=", + "50" + ] }, { "type": { "value": "OrbitingObjects::DeleteOrbitingObjects" }, - "parameters": ["", "Gas", "Star", ""] + "parameters": [ + "", + "Gas", + "Star", + "" + ] } ] }, @@ -8791,7 +9765,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "5"] + "parameters": [ + "ActiveJoystickQty", + "=", + "5" + ] } ], "actions": [ @@ -8831,13 +9809,21 @@ "type": { "value": "ParticleSystem::EmitterForceMax" }, - "parameters": ["Gas", "=", "1000"] + "parameters": [ + "Gas", + "=", + "1000" + ] }, { "type": { "value": "ParticleSystem::EmitterForceMin" }, - "parameters": ["Gas", "=", "1000"] + "parameters": [ + "Gas", + "=", + "1000" + ] } ] } @@ -8850,7 +9836,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "0"] + "parameters": [ + "ActiveJoystickQty", + "=", + "0" + ] }, { "type": { @@ -8864,13 +9854,21 @@ "type": { "value": "TextObject::String" }, - "parameters": ["Touches_Text", "=", "\"0\""] + "parameters": [ + "Touches_Text", + "=", + "\"0\"" + ] }, { "type": { "value": "ParticleSystem::SetFlow" }, - "parameters": ["Gas", "=", "10"] + "parameters": [ + "Gas", + "=", + "10" + ] } ] }, @@ -8884,8 +9882,7 @@ "textG": 0, "textR": 0 }, - "comment": "Shake and flow based on number of active joysticks", - "comment2": "" + "comment": "Shake and flow based on number of active joysticks" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8894,7 +9891,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", ">", "0"] + "parameters": [ + "ActiveJoystickQty", + ">", + "0" + ] } ], "actions": [ @@ -8918,7 +9919,11 @@ "type": { "value": "ParticleSystem::SetFlow" }, - "parameters": ["Gas", "=", "50 * Variable(ActiveJoystickQty)"] + "parameters": [ + "Gas", + "=", + "50 * Variable(ActiveJoystickQty)" + ] }, { "type": { @@ -8941,9 +9946,16 @@ "ambientLightColorB": 10038552, "ambientLightColorG": 6067680, "ambientLightColorR": 9764888, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Background", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -8952,9 +9964,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 8065944, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -8972,9 +9991,37 @@ } ], "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": "ShakeObject_PositionAngle", "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] } @@ -8986,6 +10033,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch (for Shape Painter)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjIsMUgxMEM2LjEsMSwzLDQuMSwzLDhzMy4xLDcsNyw3aDEyYzMuOSwwLDctMy4xLDctN1MyNS45LDEsMjIsMXogTTIyLDEyYy0yLjIsMC00LTEuOC00LTRzMS44LTQsNC00czQsMS44LDQsNA0KCVMyNC4yLDEyLDIyLDEyeiIvPg0KPHBhdGggZD0iTTIyLDE3SDEwYy0zLjksMC03LDMuMS03LDdzMy4xLDcsNyw3aDEyYzMuOSwwLDctMy4xLDctN1MyNS45LDE3LDIyLDE3eiBNMTAsMjhjLTIuMiwwLTQtMS44LTQtNHMxLjgtNCw0LTRzNCwxLjgsNCw0DQoJUzEyLjIsMjgsMTAsMjh6Ii8+DQo8L3N2Zz4NCg==", "name": "ToggleSwitch", @@ -9018,8 +10066,12 @@ "toggle", "switch" ], - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -9053,8 +10105,7 @@ "textG": 0, "textR": 0 }, - "comment": "Fix bad inputs that create malformed toggle switches", - "comment2": "" + "comment": "Fix bad inputs that create malformed toggle switches" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9211,8 +10262,7 @@ "textG": 0, "textR": 0 }, - "comment": "Animate the thumb to the right place", - "comment2": "" + "comment": "Animate the thumb to the right place" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9222,7 +10272,10 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9246,7 +10299,12 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyThumbOffset" }, - "parameters": ["Object", "Behavior", ">", "0.01"] + "parameters": [ + "Object", + "Behavior", + ">", + "0.01" + ] } ], "actions": [ @@ -9254,7 +10312,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -9267,7 +10329,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9304,7 +10369,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -9320,8 +10389,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect hover/touch/click (but only if the layer and object is visible, and the object is not already being dragged)", - "comment2": "" + "comment": "Detect hover/touch/click (but only if the layer and object is visible, and the object is not already being dragged)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9330,20 +10398,28 @@ "type": { "value": "LayerVisible" }, - "parameters": ["Object", "Object.Layer()"] + "parameters": [ + "Object", + "Object.Layer()" + ] }, { "type": { "value": "Visible" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] }, { "type": { "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyDisabled" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { @@ -9365,7 +10441,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9373,7 +10452,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyWasHovered" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -9385,7 +10468,10 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9393,7 +10479,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyWasHovered" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -9405,7 +10495,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyIsHovered" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -9466,7 +10560,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyIsHovered" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -9477,14 +10575,20 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyWasHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9492,7 +10596,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -9504,13 +10612,19 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyWasHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9518,7 +10632,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -9532,8 +10650,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect mouse clicks near track, start dragging", - "comment2": "" + "comment": "Detect mouse clicks near track, start dragging" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9542,7 +10659,10 @@ "type": { "value": "SourisBouton" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] }, { "type": { @@ -9560,7 +10680,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::IsHoveredOver" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -9568,7 +10692,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::ToggleChecked" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { @@ -9584,7 +10712,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyIsPressed" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -9602,8 +10734,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset scene variable", - "comment2": "" + "comment": "Reset scene variable" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9612,7 +10743,10 @@ "type": { "value": "MouseButtonReleased" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] } ], "actions": [ @@ -9630,7 +10764,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyIsPressed" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -9653,7 +10791,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyNeedRedaw" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9661,13 +10802,19 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] }, { "type": { "value": "PrimitiveDrawing::Drawer::ClearShapes" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] } ], "events": [ @@ -9681,8 +10828,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set inactive track parameters (by default, use thumb color)", - "comment2": "" + "comment": "Set inactive track parameters (by default, use thumb color)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9691,7 +10837,12 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyInactiveTrackColor" }, - "parameters": ["Object", "Behavior", "=", "\"\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] } ], "actions": [ @@ -9714,7 +10865,12 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyInactiveTrackColor" }, - "parameters": ["Object", "Behavior", "=", "\"\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] } ], "actions": [ @@ -9747,7 +10903,11 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "Object", + "=", + "0" + ] } ] }, @@ -9761,8 +10921,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw half circle at end (optional)", - "comment2": "" + "comment": "Draw half circle at end (optional)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9795,8 +10954,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw inactive track", - "comment2": "" + "comment": "Draw inactive track" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9826,8 +10984,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set active track parameters (by default, use thumb color)", - "comment2": "" + "comment": "Set active track parameters (by default, use thumb color)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9836,7 +10993,12 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyActiveTrackColor" }, - "parameters": ["Object", "Behavior", "=", "\"\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] } ], "actions": [ @@ -9859,7 +11021,12 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyActiveTrackColor" }, - "parameters": ["Object", "Behavior", "=", "\"\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] } ], "actions": [ @@ -9900,8 +11067,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw half circle at end (optional)", - "comment2": "" + "comment": "Draw half circle at end (optional)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9934,8 +11100,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw active track", - "comment2": "" + "comment": "Draw active track" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9965,8 +11130,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw halo when the mouse is hovering over thumb ", - "comment2": "" + "comment": "Draw halo when the mouse is hovering over thumb " }, { "type": "BuiltinCommonInstructions::Standard", @@ -9975,7 +11139,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -10002,7 +11169,11 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "Object", + "=", + "0" + ] }, { "type": { @@ -10027,8 +11198,7 @@ "textG": 0, "textR": 0 }, - "comment": "Use darker halo while being pressed", - "comment2": "" + "comment": "Use darker halo while being pressed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10037,7 +11207,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyIsPressed" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -10064,7 +11237,11 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "Object", + "=", + "0" + ] }, { "type": { @@ -10089,8 +11266,7 @@ "textG": 0, "textR": 0 }, - "comment": "Drop Shadow", - "comment2": "" + "comment": "Drop Shadow" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10100,7 +11276,10 @@ "type": { "value": "PrimitiveDrawing::FillColor" }, - "parameters": ["Object", "\"50;50;93\""] + "parameters": [ + "Object", + "\"50;50;93\"" + ] }, { "type": { @@ -10139,7 +11318,10 @@ "type": { "value": "PrimitiveDrawing::FillColor" }, - "parameters": ["Object", "\"0;0;0\""] + "parameters": [ + "Object", + "\"0;0;0\"" + ] }, { "type": { @@ -10180,8 +11362,7 @@ "textG": 0, "textR": 0 }, - "comment": "Prepare thumb settings", - "comment2": "" + "comment": "Prepare thumb settings" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10191,13 +11372,21 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "128"] + "parameters": [ + "Object", + "=", + "128" + ] }, { "type": { "value": "PrimitiveDrawing::OutlineSize" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "Object", + "=", + "0" + ] }, { "type": { @@ -10218,7 +11407,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -10260,7 +11452,10 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -10304,8 +11499,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw Circle thumb", - "comment2": "" + "comment": "Draw Circle thumb" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10362,8 +11556,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure object doesn't get re-drawn every frame", - "comment2": "" + "comment": "Make sure object doesn't get re-drawn every frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10373,7 +11566,10 @@ "type": { "value": "PrimitiveDrawing::ClearBetweenFrames" }, - "parameters": ["Object", "no"] + "parameters": [ + "Object", + "no" + ] } ] } @@ -10420,7 +11616,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10472,7 +11672,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10524,7 +11728,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10576,7 +11784,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10628,7 +11840,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10680,7 +11896,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10732,7 +11952,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10784,7 +12008,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10836,7 +12064,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10888,7 +12120,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10940,7 +12176,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10992,7 +12232,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11044,7 +12288,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11096,7 +12344,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11148,59 +12400,67 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "ToggleSwitch::ToggleSwitch", - "type": "behavior" - }, - { - "description": "Thumb color", - "name": "Color", - "type": "color" - } - ], - "objectGroups": [] - }, - { - "description": "Change the thumb color (when checked).", - "fullName": "Thumb color (when checked)", - "functionType": "Action", - "name": "SetActiveThumbColor", - "sentence": "Change the thumb color of _PARAM0_ (when checked) to _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ToggleSwitch::ToggleSwitch::SetPropertyActiveThumbColor" - }, "parameters": [ "Object", "Behavior", - "=", - "GetArgumentAsString(\"Color\")" + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ToggleSwitch::ToggleSwitch", + "type": "behavior" + }, + { + "description": "Thumb color", + "name": "Color", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Change the thumb color (when checked).", + "fullName": "Thumb color (when checked)", + "functionType": "Action", + "name": "SetActiveThumbColor", + "sentence": "Change the thumb color of _PARAM0_ (when checked) to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ToggleSwitch::ToggleSwitch::SetPropertyActiveThumbColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" ] - }, - { - "type": { - "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" - }, - "parameters": ["Object", "Behavior", "yes"] } ] } @@ -11241,13 +12501,21 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] }, { "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyToggleChanged" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] }, @@ -11258,7 +12526,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -11266,13 +12537,21 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyChecked" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] }, { "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyToggleChanged" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -11284,14 +12563,20 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyToggleChanged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -11299,7 +12584,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyChecked" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11335,7 +12624,9 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": ["\"State\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ @@ -11343,7 +12634,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyDisabled" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -11354,7 +12649,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"State\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ @@ -11362,7 +12659,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyDisabled" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -11374,7 +12675,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11415,7 +12720,9 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": ["\"State\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ @@ -11423,7 +12730,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyChecked" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -11434,7 +12745,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"State\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ @@ -11442,7 +12755,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyChecked" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -11454,7 +12771,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11497,8 +12818,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set default result", - "comment2": "" + "comment": "Set default result" }, { "type": "BuiltinCommonInstructions::Standard", @@ -11508,7 +12828,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11522,8 +12844,7 @@ "textG": 0, "textR": 0 }, - "comment": "Check position of mouse", - "comment2": "" + "comment": "Check position of mouse" }, { "type": "BuiltinCommonInstructions::Standard", @@ -11532,7 +12853,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -11540,7 +12864,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11576,7 +12902,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTrackWidth()"] + "parameters": [ + "Object.Behavior::PropertyTrackWidth()" + ] } ] } @@ -11615,7 +12943,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTrackHeight()"] + "parameters": [ + "Object.Behavior::PropertyTrackHeight()" + ] } ] } @@ -11777,7 +13107,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyThumbOpacity()"] + "parameters": [ + "Object.Behavior::PropertyThumbOpacity()" + ] } ] } @@ -11980,7 +13312,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyHaloRadius()"] + "parameters": [ + "Object.Behavior::PropertyHaloRadius()" + ] } ] } @@ -12141,7 +13475,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyDisabled" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -12149,7 +13486,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -12161,7 +13500,10 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyDisabled" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -12169,7 +13511,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] } @@ -12204,7 +13548,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -12212,7 +13559,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -12224,7 +13573,10 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -12232,7 +13584,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] } @@ -12300,129 +13654,78 @@ "value": "10", "type": "Number", "label": "Radius of the thumb (px) Example: 10", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ThumbRadius" }, { "value": "24;119;211", "type": "String", "label": "Active thumb color string. Example: 24;119;211", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ActiveThumbColor" }, { "value": "255", "type": "Number", "label": "Opacity of the thumb. Example: 255", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ThumbOpacity" }, { "value": "20", "type": "Number", "label": "Width of the track (pixels) Example: 20", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TrackWidth" }, { "value": "14", "type": "Number", "label": "Height of the track (pixels) Example: 14", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "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": [], - "hidden": false, "name": "InactiveTrackColor" }, { "value": "255", "type": "Number", "label": "Opacity of the track that is RIGHT of the thumb. Example: 255", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "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": [], - "hidden": false, "name": "ActiveTrackColor" }, { "value": "128", "type": "Number", "label": "Opacity of the track that is LEFT of the thumb. Example: 128", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ActiveTrackOpacity" }, { "value": "24", "type": "Number", "label": "Size of halo when the mouse hovers and clicks on the thumb. Example: 24", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "HaloRadius" }, { "value": "32", "type": "Number", "label": "Opacity of halo when the mouse hovers on the thumb. Example: 32", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityHover" }, { "value": "64", "type": "Number", "label": "Opacity of the halo that appears when the toggle switch is pressed. Example: 64", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "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" }, @@ -12430,29 +13733,18 @@ "value": "", "type": "Boolean", "label": "Checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Checked" }, { "value": "", "type": "Boolean", "label": "Disabled", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Disabled" }, { "value": "", "type": "Boolean", "label": "State has been changed (used in ToggleChecked function)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ToggleChanged" }, @@ -12460,19 +13752,12 @@ "value": "255;255;255", "type": "String", "label": "Inactive thumb color string. Example: 255;255;255", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "InactiveThumbColor" }, { "value": "", "type": "Boolean", "label": "Click or press has started on toggle switch", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsPressed" }, @@ -12480,39 +13765,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": [], - "hidden": false, "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": [], - "hidden": false, "name": "ThumbShadowOffsetX" }, { "value": "32", "type": "Number", "label": "Opacity of shadow on thumb. Example: 32", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ThumbShadowOpacity" }, { "value": "true", "type": "Boolean", "label": "Need redraw", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedaw" }, @@ -12520,9 +13790,6 @@ "value": "", "type": "Boolean", "label": "Is hovered", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -12530,9 +13797,6 @@ "value": "", "type": "Boolean", "label": "Was hovered", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WasHovered" } @@ -12543,228 +13807,131 @@ "eventsBasedObjects": [] }, { - "author": "", + "author": "Tristan Rhodes (https://victrisgames.itch.io/), D8H", "category": "User interface", "extensionNamespace": "", - "fullName": "Toggle switch", - "helpPath": "/objects/toggle-switch", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", - "name": "SpriteToggleSwitch", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", - "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.2.2", + "fullName": "Checkbox (for Shape Painter)", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNoZWNrYm94LW1hcmtlZCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMCwxN0w1LDEyTDYuNDEsMTAuNThMMTAsMTQuMTdMMTcuNTksNi41OEwxOSw4TTE5LDNINUMzLjg5LDMgMywzLjg5IDMsNVYxOUEyLDIgMCAwLDAgNSwyMUgxOUEyLDIgMCAwLDAgMjEsMTlWNUMyMSwzLjg5IDIwLjEsMyAxOSwzWiIgLz48L3N2Zz4=", + "name": "Checkbox", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/checkbox-marked.svg", + "shortDescription": "Checkbox that can be toggled by a left-click or touch.", + "version": "0.1.1", "description": [ - "Toggle switch that users can click or touch. The switch can be customized with sprites.", + "Users can click on the checkbox to add and remove the checkmark. ", + "", + "How to use:", + "- Add this extension to a shape painter object", + "- Use condition \"Is checked\" to find out the state of the checkbox", "", - "There are ready-to-use toggle switches in the asset-store [settings UI pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=settings-ui-settings-ui)." + "Tips:", + "- Checkbox state can also be changed by an action.", + "- Checkbox can be disabled so that users cannot interact with it ", + "- To remove halo, Set \"halo hover\" and \"halo pressed\" opacity to 0" ], "origin": { - "identifier": "SpriteToggleSwitch", + "identifier": "Checkbox", "name": "gdevelop-extension-store" }, - "tags": ["ui", "widget", "toggle", "switch"], + "tags": [ + "checkbox", + "shape painter", + "ui", + "widget", + "toggle", + "switch" + ], "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", - "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "The finite state machine used internally by the switch object.", - "fullName": "Switch finite state machine", - "name": "SwitchFSM", - "objectType": "", - "private": true, + "description": "Checkbox that can be toggled by a left-click or touch.", + "fullName": "Checkbox", + "name": "Checkbox", + "objectType": "PrimitiveDrawing::Drawer", "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPreEvents", + "name": "onCreated", "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" - }, - "parameters": ["Object", "ButtonFSM", ""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" - }, - "parameters": ["Object", "Behavior", "no"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure object doesn't get re-drawn every frame" }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the toggle switch is checked.", - "fullName": "Is checked", - "functionType": "Condition", - "group": "Switch finite state machine configuration", - "name": "IsChecked", - "sentence": "_PARAM0_ is checked", - "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "PrimitiveDrawing::ClearBetweenFrames" }, - "parameters": ["True"] + "parameters": [ + "Object", + "no" + ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check (or uncheck) the toggle switch.", - "fullName": "Check (or uncheck)", - "functionType": "Action", - "group": "Switch finite state machine configuration", - "name": "SetChecked", - "sentence": "Check _PARAM0_: _PARAM2_", - "events": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Start halo at same size as thumb" + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertySideLength()/2" + ] } ] }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "Checkbox::Checkbox::UpdateHitbox" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -12773,70 +13940,22 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "supplementaryInformation": "Checkbox::Checkbox", "type": "behavior" - }, - { - "defaultValue": "yes", - "description": "IsChecked", - "name": "Value", - "optional": true, - "type": "yesorno" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "Button finite state machine", - "description": "", - "group": "", - "extraInformation": ["SpriteToggleSwitch::ButtonFSM"], - "hidden": false, - "name": "ButtonFSM" - }, - { - "value": "false", - "type": "Boolean", - "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "IsChecked" }, - { - "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "WasChecked" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", - "private": true, - "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -12844,199 +13963,179 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Finite state machine", + "name": "Checkbox logic", "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.", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "Checkbox::Checkbox::IsEnabled" }, "parameters": [ "Object", "Behavior", - "=", - "\"Validated\"" + "" ] } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "actions": [], "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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" + "value": "Checkbox::Checkbox::PropertyIsBeingPressed" }, "parameters": [ "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "Behavior" ] } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "actions": [], + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "!=", "0"] + "comment": "Grow halo even more when pressed" }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyHaloRadiusPressed()" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "yes"] + "comment": "Detect press ending" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect hover and touch/click" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "HasAnyTouchOrMouseStarted" + "inverted": true, + "value": "Checkbox::Checkbox::PropertyIsBeingPressed" }, - "parameters": [""] + "parameters": [ + "Object", + "Behavior" + ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ + "comment": "Detect mouse clicks near checkbox" + }, { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisBouton" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], "actions": [], "events": [ { @@ -13044,189 +14143,321 @@ "conditions": [ { "type": { - "value": "CollisionPoint" + "value": "SourisX" }, "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "", + ">", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisX" + }, + "parameters": [ + "", + "<", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + ">", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + "<", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" }, "parameters": [ "Object", "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "yes" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, "parameters": [ "Object", "Behavior", "yes" ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" + "value": "Checkbox::Checkbox::ToggleChecked" }, "parameters": [ "Object", "Behavior", - "+", - "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": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Reset hover detection " }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "comment": "Grow halo when hovered" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SourisBouton" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "SourisX" + }, + "parameters": [ + "", + ">", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisX" + }, + "parameters": [ + "", + "<", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + ">", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + "<", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyHaloRadiusHover()" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "comment": "Shrink halo to zero when not hovered" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::PropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertySideLength()/2" + ] + } ] } ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Redraw checkbox only when halo is not at final size" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" + "value": "Egal" }, - "parameters": ["Object", "Behavior"] - }, + "parameters": [ + "abs(Object.Behavior::PropertyCurrentHaloRadius() - Object.Behavior::PropertyTargetHaloRadius())", + "<", + "1" + ] + } + ], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" }, "parameters": [ "Object", "Behavior", "=", - "\"Idle\"" + "Object.Behavior::PropertyTargetHaloRadius()" ] - } - ], - "actions": [ + }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, "parameters": [ "Object", "Behavior", - "=", - "\"Hovered\"" + "yes" ] } ] @@ -13236,131 +14467,257 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedInside\"" + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" }, "parameters": [ "Object", "Behavior", "=", - "\"PressedOutside\"" + "lerp(Object.Behavior::PropertyCurrentHaloRadius(), Object.Behavior::PropertyTargetHaloRadius(), Object.Behavior::PropertyHaloGrowSpeed())" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedInside\"" + "yes" ] } ] } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Checkbox drawing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "LayerVisible" + }, + "parameters": [ + "", + "Object.Layer()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Drawer::ClearShapes" + }, + "parameters": [ + "Object" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Fix inputs", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasTouchEnded" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" + "comment": "Fix inputs that create malformed checkboxes" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertySideLength()", + "<", + "10" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertySideLength" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "10" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyLineWidth()", + "<", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyLineWidth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyLineWidth()", + ">", + "Object.Behavior::PropertySideLength()/3" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyLineWidth" }, "parameters": [ "Object", "Behavior", "=", - "\"PressedInside\"" + "Object.Behavior::PropertySideLength()/3" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyHaloRadiusHover()", + "=", + "0" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "Checkbox::Checkbox::SetPropertyHaloRadiusHover" }, "parameters": [ "Object", "Behavior", "=", - "\"Validated\"" + "Object.Behavior::PropertySideLength()" ] } ] @@ -13370,281 +14727,630 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyHaloRadiusPressed()", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyHaloRadiusPressed" }, "parameters": [ "Object", "Behavior", "=", - "\"PressedInside\"" + "Object.Behavior::PropertyHaloRadiusHover() * 1.1" ] - }, + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Draw Halo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set halo radius, if not specified" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "Checkbox::Checkbox::PropertyHaloRadiusHover" }, "parameters": [ "Object", "Behavior", "=", - "\"Validated\"" + "0" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "Checkbox::Checkbox::SetHaloRadiusHover" }, "parameters": [ "Object", "Behavior", - "=", - "\"Idle\"" + "Object.Behavior::PropertySideLength()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if halo is bigger than checkbox" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertySideLength()/2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Prepare halo" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyPrimaryColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineOpacity" + }, + "parameters": [ + "Object", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw halo (it will grow or shrink as needed)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::PropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyHaloOpacityHover()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySideLength()/2", + "Object.Behavior::PropertySideLength()/2", + "Object.Behavior::PropertyCurrentHaloRadius()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use a more opaque halo while being dragged (it will grow or shrink as needed)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyHaloOpacityClick()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySideLength()/2", + "Object.Behavior::PropertySideLength()/2", + "Object.Behavior::PropertyCurrentHaloRadius()" + ] + } ] } ] } - ] - } - ], - "parameters": [] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "onDeActivate", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Draw checkbox square", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change shape painter based on properties" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyPrimaryColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyPrimaryColor()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySecondaryColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyPrimaryColor()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::OutlineSize" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyBorderThickness()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "255" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineOpacity" + }, + "parameters": [ + "Object", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "0", + "0", + "Object.Behavior::PropertySideLength()", + "Object.Behavior::PropertySideLength()" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Draw checkmark", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Prepare color of checkmark" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySecondaryColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw left-side of checkmark" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::LineV2" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySideLength() * 1/10", + "Object.Behavior::PropertySideLength() * 1/2", + "Object.Behavior::PropertySideLength() * 1/3", + "Object.Behavior::PropertySideLength() * 3/4", + "Object.Behavior::PropertyLineWidth()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw right-side of checkmark" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::LineV2" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertySideLength() * 1/3 - (Object.Behavior::PropertyLineWidth()*0.5/sqrt(2))", + "Object.Behavior::PropertySideLength() * 3/4 + (Object.Behavior::PropertyLineWidth()*0.5/sqrt(2))", + "Object.Behavior::PropertySideLength() * 9/10", + "Object.Behavior::PropertySideLength() * 2/10", + "Object.Behavior::PropertyLineWidth()" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] + "parameters": [] } ], "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", + "supplementaryInformation": "Checkbox::Checkbox", "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": "Check (or uncheck) the checkbox.", + "fullName": "Check (or uncheck) the checkbox", + "functionType": "Action", + "group": "Checkbox state", + "name": "SetChecked", + "sentence": "Add checkmark to _PARAM0_: _PARAM2_ ", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "inverted": true, + "value": "GetArgumentAsBoolean" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "Checkbox::Checkbox::SetPropertyChecked" }, - "parameters": ["True"] + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"ValueMin\")" + ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "GetArgumentAsBoolean" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "Checkbox::Checkbox::SetPropertyChecked" }, - "parameters": ["True"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedOutside\"" + "yes" ] } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } ] } ], @@ -13652,92 +15358,154 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", + "supplementaryInformation": "Checkbox::Checkbox", "type": "behavior" + }, + { + "description": "Check the checkbox?", + "name": "State", + "type": "yesorno" } ], "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": "Enable or disable interactions with the checkbox. Users cannot interact while it is disabled.", + "fullName": "Enable interactions with checkbox", + "functionType": "Action", + "group": "Checkbox behavior", + "name": "SetEnabled", + "sentence": "Enable interactions of _PARAM0_: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "inverted": true, + "value": "GetArgumentAsBoolean" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "\"Enable\"" ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "Checkbox::Checkbox::SetPropertyEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop dragging (so the checkbox won't be dragging when it gets enabled)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["True"] + "comment": "Reset halo size (so halo won't appear when checkbox gets enabled)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 2" + ] + } + ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Enable\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyEnabled" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedOutside\"" + "yes" ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["True"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -13746,200 +15514,79 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", + "supplementaryInformation": "Checkbox::Checkbox", "type": "behavior" + }, + { + "description": "Enable", + "name": "Enable", + "type": "yesorno" } ], "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": "SpriteToggleSwitch::ButtonFSM", - "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": [ - { - "defaultName": "ToggleSwitch", - "description": "A toggle switch that users can click or touch.", - "fullName": "Toggle switch", - "name": "SpriteToggleSwitch", - "eventsFunctions": [ - { - "fullName": "", + "description": "If checked, change to unchecked. If unchecked, change to checked.", + "fullName": "Toggle checkmark", "functionType": "Action", - "name": "onCreated", - "sentence": "", + "name": "ToggleChecked", + "sentence": "Toggle checkmark on _PARAM0_", "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.", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "Create" + "value": "Checkbox::Checkbox::SetPropertyToggleChanged" }, - "parameters": ["", "State", "0", "0", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Pass the configuration to the behavior.\nThe PreviousIsChecked property allows to detect a change of \"intial value\" on hot reload.", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "Checkbox::Checkbox::PropertyChecked" }, - "parameters": ["Object"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + "value": "Checkbox::Checkbox::SetPropertyChecked" }, - "parameters": ["State", "SwitchFSM", "", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "Checkbox::Checkbox::SetPropertyToggleChanged" }, - "parameters": ["Object", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -13949,23 +15596,34 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "Checkbox::Checkbox::PropertyChecked" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::PropertyToggleChanged" }, - "parameters": ["Object"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" - }, - "parameters": ["State", "SwitchFSM", "no", ""] - }, - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "Checkbox::Checkbox::SetPropertyChecked" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -13975,18 +15633,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" - }, - "parameters": ["Object", ""] - }, - { - "type": { - "value": "ChangeSprite" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, "parameters": [ - "State", - "=", - "State.AnimationFrameCount() - 1" + "Object", + "Behavior", + "yes" ] } ] @@ -13996,94 +15648,50 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "fullName": "", + "description": "Change the primary color of checkbox.", + "fullName": "Primary color of checkbox", "functionType": "Action", - "name": "onHotReloading", - "sentence": "", + "group": "Checkbox appearance", + "name": "SetPrimaryColor", + "sentence": "Change the primary color of _PARAM0_: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" - }, - "parameters": ["Object"] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" - }, - "parameters": ["Object", "SwitchFSM", ""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" - }, - "parameters": ["Object", "yes", "no"] - }, - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" - }, - "parameters": ["Object", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" - }, - "parameters": ["Object"] - }, - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" - }, - "parameters": ["Object", "SwitchFSM", ""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" + "value": "Checkbox::Checkbox::SetPropertyPrimaryColor" }, - "parameters": ["Object", "SwitchFSM", "no"] + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Color\")" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "no"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -14092,17 +15700,30 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "description": "Primary color", + "name": "Color", + "type": "color" } ], "objectGroups": [] }, { - "fullName": "", + "description": "Change the secondary color of checkbox.", + "fullName": "Secondary color of checkbox", "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", + "group": "Checkbox appearance", + "name": "SetSecondaryColor", + "sentence": "Change the secondary color of _PARAM0_: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14110,9 +15731,24 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" + "value": "Checkbox::Checkbox::SetPropertySecondaryColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -14121,35 +15757,55 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "description": "Secondary color", + "name": "Color", + "type": "color" } ], "objectGroups": [] }, { - "description": "Check if the toggle switch is checked.", - "fullName": "Is checked", - "functionType": "Condition", - "name": "IsChecked", - "sentence": "_PARAM0_ is checked", + "description": "Change the halo opacity when pressed.", + "fullName": "Halo opacity when pressed", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetHaloOpacityPressed", + "sentence": "Change the halo opacity of _PARAM0_ when pressed: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + "value": "Checkbox::Checkbox::SetPropertyHaloOpacityClick" }, - "parameters": ["State", "SwitchFSM", ""] - } - ], - "actions": [ + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, { "type": { - "value": "SetReturnBoolean" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["True"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -14158,55 +15814,55 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "description": "Halo opacity", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Check (or uncheck) the toggle switch.", - "fullName": "Check (or uncheck)", + "description": "Change the halo opacity when hovered.", + "fullName": "Halo opacity when hovered", "functionType": "Action", - "name": "SetChecked", - "sentence": "Check _PARAM0_: _PARAM1_", + "group": "Checkbox appearance", + "name": "SetHaloOpacityHover", + "sentence": "Change the halo opacity of _PARAM0_ when hovered: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" - }, - "parameters": ["State", "SwitchFSM", "no", ""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" + "value": "Checkbox::Checkbox::SetPropertyHaloOpacityHover" }, - "parameters": ["\"Value\""] - } - ], - "actions": [ + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["State", "SwitchFSM", "yes", ""] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -14215,43 +15871,55 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" }, { - "defaultValue": "yes", - "description": "IsChecked", + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "description": "Halo opacity", "name": "Value", - "optional": true, - "type": "yesorno" + "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "private": true, - "sentence": "_PARAM0_ is idle", + "description": "Change the halo radius when pressed.", + "fullName": "Halo radius when pressed", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetHaloRadiusPressed", + "sentence": "Change the halo radius of _PARAM0_ when pressed: _PARAM2_ px", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsIdle" + "value": "Checkbox::Checkbox::SetPropertyHaloRadiusPressed" }, - "parameters": ["State", "ButtonFSM", ""] - } - ], - "actions": [ + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, { "type": { - "value": "SetReturnBoolean" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["True"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -14260,36 +15928,55 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "description": "Halo radius", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "private": true, - "sentence": "_PARAM0_ is clicked", + "description": "Change the halo radius when hovered. This size is also used to detect interaction with the checkbox.", + "fullName": "Halo radius when hovered", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetHaloRadiusHover", + "sentence": "Change the halo radius of _PARAM0_ when hovered: _PARAM2_ px", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" + "value": "Checkbox::Checkbox::SetPropertyHaloRadiusHover" }, - "parameters": ["State", "ButtonFSM", ""] - } - ], - "actions": [ + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, { "type": { - "value": "SetReturnBoolean" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["True"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -14298,35 +15985,55 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "description": "Halo radius", + "name": "Value", + "type": "expression" } ], "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 border thickness of checkbox.", + "fullName": "Border thickness of checkbox", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetBorderThickness", + "sentence": "Change the border thickness of _PARAM0_: _PARAM2_ px", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsHovered" + "value": "Checkbox::Checkbox::SetPropertyBorderThickness" }, - "parameters": ["State", "ButtonFSM", ""] - } - ], - "actions": [ + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, { "type": { - "value": "SetReturnBoolean" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["True"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -14335,36 +16042,71 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "description": "Track thickness", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "private": true, - "sentence": "_PARAM0_ is focused", + "description": "Change the side length of checkbox.", + "fullName": "Side length of checkbox", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetSideLength", + "sentence": "Change the side length of _PARAM0_: _PARAM2_ px", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertySideLength" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsFocused" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "Checkbox::Checkbox::UpdateHitbox" }, - "parameters": ["True"] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -14373,36 +16115,55 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "description": "Track width (px)", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "private": true, - "sentence": "_PARAM0_ is pressed", + "description": "Change the line width of checkmark.", + "fullName": "Line width of checkmark", + "functionType": "Action", + "group": "Checkbox appearance", + "name": "SetLineWidth", + "sentence": "Change the line width of _PARAM0_: _PARAM2_ px", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsPressed" + "value": "Checkbox::Checkbox::SetPropertyLineWidth" }, - "parameters": ["State", "ButtonFSM", ""] - } - ], - "actions": [ + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, { "type": { - "value": "SetReturnBoolean" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["True"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -14411,80 +16172,101 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + }, + { + "description": "Line width (px)", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Update the state animation.", - "fullName": "Update state animation", - "functionType": "Action", - "name": "UpdateStateAnimation", - "private": true, - "sentence": "Update the state animation of _PARAM0_", + "description": "Check if the checkbox is checked.", + "fullName": "Is checked", + "functionType": "Condition", + "group": "Checkbox state", + "name": "IsChecked", + "sentence": "_PARAM0_ is checked", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" - }, - "parameters": ["Object", "ButtonFSM", ""] - }, - { - "type": { - "value": "AnimationName" + "value": "Checkbox::Checkbox::PropertyChecked" }, - "parameters": ["State", "\"Unchecked\""] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ { "type": { - "value": "SetAnimationName" - }, - "parameters": ["State", "\"Checked\""] - }, - { - "type": { - "value": "PlayAnimation" + "value": "SetReturnBoolean" }, - "parameters": ["State"] + "parameters": [ + "True" + ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the checkbox interations are enabled.", + "fullName": "Interactions enabled", + "functionType": "Condition", + "group": "Checkbox", + "name": "IsEnabled", + "sentence": "Interactions of _PARAM0_ are enabled", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" - }, - "parameters": ["Object", "ButtonFSM", ""] - }, - { - "type": { - "value": "AnimationName" + "value": "Checkbox::Checkbox::PropertyEnabled" }, - "parameters": ["State", "\"Checked\""] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ { "type": { - "value": "SetAnimationName" - }, - "parameters": ["State", "\"Unchecked\""] - }, - { - "type": { - "value": "PlayAnimation" + "value": "SetReturnBoolean" }, - "parameters": ["State"] + "parameters": [ + "True" + ] } ] } @@ -14493,306 +16275,254 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "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": "Return the color used to draw the outline of the checkbox (when unchecked) and the fill color (when checked).", + "fullName": "Primary color of checkbox", + "functionType": "StringExpression", + "group": "Checkbox appearance", + "name": "PrimaryColor", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"ShouldActivate\""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnString" }, - "parameters": ["State", "ButtonFSM", "yes"] + "parameters": [ + "Object.Behavior::PropertyPrimaryColor()" + ] } ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the color used to fill the checkbox (when unchecked) and to draw the checkmark (when checked).", + "fullName": "Secondary color of checkbox", + "functionType": "StringExpression", + "group": "Checkbox appearance", + "name": "SecondaryColor", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"ShouldActivate\""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnString" }, - "parameters": ["State", "ButtonFSM", "no"] + "parameters": [ + "Object.Behavior::PropertySecondaryColor()" + ] } ] } ], + "expressionType": { + "type": "string" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" }, { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "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", + "description": "Return the radius of the halo while the checkbox is touched or clicked.", + "fullName": "Halo radius while touched or clicked", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "HaloRadiusPressed", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": ["State", "ButtonFSM"] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, - "parameters": ["True"] + "parameters": [ + "Object.Behavior::PropertyHaloRadiusPressed()" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "IsChecked" - }, - { - "value": "", - "type": "Boolean", - "label": "", - "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "PreviousIsChecked" - } - ], - "objects": [ - { - "assetStoreId": "", - "name": "State", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 }, { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" } ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "author": "Tristan Rhodes (https://victrisgames.itch.io/), D8H", - "category": "User interface", - "extensionNamespace": "", - "fullName": "Checkbox (for Shape Painter)", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNoZWNrYm94LW1hcmtlZCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMCwxN0w1LDEyTDYuNDEsMTAuNThMMTAsMTQuMTdMMTcuNTksNi41OEwxOSw4TTE5LDNINUMzLjg5LDMgMywzLjg5IDMsNVYxOUEyLDIgMCAwLDAgNSwyMUgxOUEyLDIgMCAwLDAgMjEsMTlWNUMyMSwzLjg5IDIwLjEsMyAxOSwzWiIgLz48L3N2Zz4=", - "name": "Checkbox", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/checkbox-marked.svg", - "shortDescription": "Checkbox that can be toggled by a left-click or touch.", - "version": "0.1.1", - "description": [ - "Users can click on the checkbox to add and remove the checkmark. ", - "", - "How to use:", - "- Add this extension to a shape painter object", - "- Use condition \"Is checked\" to find out the state of the checkbox", - "", - "Tips:", - "- Checkbox state can also be changed by an action.", - "- Checkbox can be disabled so that users cannot interact with it ", - "- To remove halo, Set \"halo hover\" and \"halo pressed\" opacity to 0" - ], - "origin": { - "identifier": "Checkbox", - "name": "gdevelop-extension-store" - }, - "tags": ["checkbox", "shape painter", "ui", "widget", "toggle", "switch"], - "authorIds": [ - "gqDaZjCfevOOxBYkK6zlhtZnXCg1", - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "Checkbox that can be toggled by a left-click or touch.", - "fullName": "Checkbox", - "name": "Checkbox", - "objectType": "PrimitiveDrawing::Drawer", - "eventsFunctions": [ + "objectGroups": [] + }, { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", + "description": "Return the opacity of the halo while the checkbox is touched or clicked.", + "fullName": "Halo opacity (while touched or clicked)", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "HaloOpacityPressed", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure object doesn't get re-drawn every frame", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "PrimitiveDrawing::ClearBetweenFrames" + "value": "SetReturnNumber" }, - "parameters": ["Object", "no"] + "parameters": [ + "Object.Behavior::HaloOpacityPressed()" + ] } ] - }, + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Start halo at same size as thumb", - "comment2": "" + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the radius of the halo when the mouse is hovering near the checkbox.", + "fullName": "Halo radius (during hover)", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "HaloRadiusHover", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertySideLength()/2" + "Object.Behavior::PropertyHaloRadiusHover()" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Checkbox::Checkbox", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the opacity of the halo when the mouse is hovering near the checkbox.", + "fullName": "Halo opacity (during hover)", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "HaloOpacityHover", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "Checkbox::Checkbox::UpdateHitbox" + "value": "SetReturnNumber" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object.Behavior::PropertyHaloOpacityHover()" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -14810,518 +16540,31 @@ "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Checkbox logic", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::IsEnabled" - }, - "parameters": ["Object", "Behavior", ""] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyIsBeingPressed" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Grow halo even more when pressed", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertyHaloRadiusPressed()" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect press ending", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "MouseButtonReleased" - }, - "parameters": ["", "Left"] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect hover and touch/click", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyIsBeingPressed" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect mouse clicks near checkbox", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisBouton" - }, - "parameters": ["", "Left"] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisX" - }, - "parameters": [ - "", - ">", - "(Object.X() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisX" - }, - "parameters": [ - "", - "<", - "(Object.X() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisY" - }, - "parameters": [ - "", - ">", - "(Object.Y() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisY" - }, - "parameters": [ - "", - "<", - "(Object.Y() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::ToggleChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset hover detection ", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyIsHovered" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Grow halo when hovered", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SourisBouton" - }, - "parameters": ["", "Left"] - }, - { - "type": { - "value": "SourisX" - }, - "parameters": [ - "", - ">", - "(Object.X() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisX" - }, - "parameters": [ - "", - "<", - "(Object.X() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisY" - }, - "parameters": [ - "", - ">", - "(Object.Y() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisY" - }, - "parameters": [ - "", - "<", - "(Object.Y() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyIsHovered" - }, - "parameters": ["Object", "Behavior", "yes"] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertyHaloRadiusHover()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Shrink halo to zero when not hovered", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyIsHovered" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertySideLength()/2" - ] - } - ] - } - ] - } - ] - }, + "description": "Return the line width of checkmark (pixels).", + "fullName": "Line width", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "LineWidth", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "Object.Behavior::PropertyTargetHaloRadius()" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Redraw checkbox only when halo is not at final size", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "abs(Object.Behavior::PropertyCurrentHaloRadius() - Object.Behavior::PropertyTargetHaloRadius())", - "<", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertyTargetHaloRadius()" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "Object.Behavior::PropertyTargetHaloRadius()" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "lerp(Object.Behavior::PropertyCurrentHaloRadius(), Object.Behavior::PropertyTargetHaloRadius(), Object.Behavior::PropertyHaloGrowSpeed())" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyLineWidth()" ] } - ], - "parameters": [] + ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -15339,1840 +16582,23 @@ "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", + "description": "Return the side length of checkbox (pixels).", + "fullName": "Side length ", + "functionType": "Expression", + "group": "Checkbox appearance", + "name": "SideLength", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Checkbox drawing", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "Visible" - }, - "parameters": ["Object"] - }, - { - "type": { - "value": "LayerVisible" - }, - "parameters": ["", "Object.Layer()"] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "no"] - }, - { - "type": { - "value": "PrimitiveDrawing::Drawer::ClearShapes" - }, - "parameters": ["Object"] - } - ], - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Fix inputs", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Fix inputs that create malformed checkboxes", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertySideLength()", - "<", - "10" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertySideLength" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "10" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertyLineWidth()", - "<", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyLineWidth" - }, - "parameters": ["Object", "Behavior", "=", "1"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertyLineWidth()", - ">", - "Object.Behavior::PropertySideLength()/3" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyLineWidth" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertySideLength()/3" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertyHaloRadiusHover()", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyHaloRadiusHover" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertySideLength()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertyHaloRadiusPressed()", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyHaloRadiusPressed" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertyHaloRadiusHover() * 1.1" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Draw Halo", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Set halo radius, if not specified", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyHaloRadiusHover" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetHaloRadiusHover" - }, - "parameters": [ - "Object", - "Behavior", - "Object.Behavior::PropertySideLength()", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if halo is bigger than checkbox", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "Object.Behavior::PropertySideLength()/2" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Prepare halo", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyPrimaryColor()" - ] - }, - { - "type": { - "value": "PrimitiveDrawing::OutlineOpacity" - }, - "parameters": ["Object", "=", "0"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Draw halo (it will grow or shrink as needed)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyIsBeingPressed" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillOpacity" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyHaloOpacityHover()" - ] - }, - { - "type": { - "value": "PrimitiveDrawing::Circle" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertySideLength()/2", - "Object.Behavior::PropertySideLength()/2", - "Object.Behavior::PropertyCurrentHaloRadius()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Use a more opaque halo while being dragged (it will grow or shrink as needed)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyIsBeingPressed" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillOpacity" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyHaloOpacityClick()" - ] - }, - { - "type": { - "value": "PrimitiveDrawing::Circle" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertySideLength()/2", - "Object.Behavior::PropertySideLength()/2", - "Object.Behavior::PropertyCurrentHaloRadius()" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Draw checkbox square", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change shape painter based on properties", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::IsChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyPrimaryColor()" - ] - }, - { - "type": { - "value": "PrimitiveDrawing::OutlineColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyPrimaryColor()" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::IsChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertySecondaryColor()" - ] - }, - { - "type": { - "value": "PrimitiveDrawing::OutlineColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyPrimaryColor()" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::OutlineSize" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyBorderThickness()" - ] - }, - { - "type": { - "value": "PrimitiveDrawing::FillOpacity" - }, - "parameters": ["Object", "=", "255"] - }, - { - "type": { - "value": "PrimitiveDrawing::OutlineOpacity" - }, - "parameters": ["Object", "=", "255"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::Rectangle" - }, - "parameters": [ - "Object", - "0", - "0", - "Object.Behavior::PropertySideLength()", - "Object.Behavior::PropertySideLength()" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Draw checkmark", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::IsChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Prepare color of checkmark", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::OutlineColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertySecondaryColor()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Draw left-side of checkmark", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::LineV2" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertySideLength() * 1/10", - "Object.Behavior::PropertySideLength() * 1/2", - "Object.Behavior::PropertySideLength() * 1/3", - "Object.Behavior::PropertySideLength() * 3/4", - "Object.Behavior::PropertyLineWidth()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Draw right-side of checkmark", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::LineV2" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertySideLength() * 1/3 - (Object.Behavior::PropertyLineWidth()*0.5/sqrt(2))", - "Object.Behavior::PropertySideLength() * 3/4 + (Object.Behavior::PropertyLineWidth()*0.5/sqrt(2))", - "Object.Behavior::PropertySideLength() * 9/10", - "Object.Behavior::PropertySideLength() * 2/10", - "Object.Behavior::PropertyLineWidth()" - ] - } - ] - } - ] - } - ], - "parameters": [] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check (or uncheck) the checkbox.", - "fullName": "Check (or uncheck) the checkbox", - "functionType": "Action", - "group": "Checkbox state", - "name": "SetChecked", - "sentence": "Add checkmark to _PARAM0_: _PARAM2_ ", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"State\""] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyChecked" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"ValueMin\")" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"State\""] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyChecked" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "description": "Check the checkbox?", - "name": "State", - "type": "yesorno" - } - ], - "objectGroups": [] - }, - { - "description": "Enable or disable interactions with the checkbox. Users cannot interact while it is disabled.", - "fullName": "Enable interactions with checkbox", - "functionType": "Action", - "group": "Checkbox behavior", - "name": "SetEnabled", - "sentence": "Enable interactions of _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Enable\""] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyEnabled" - }, - "parameters": ["Object", "Behavior", "no"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Stop dragging (so the checkbox won't be dragging when it gets enabled)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset halo size (so halo won't appear when checkbox gets enabled)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 2" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Enable\""] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyEnabled" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "description": "Enable", - "name": "Enable", - "type": "yesorno" - } - ], - "objectGroups": [] - }, - { - "description": "If checked, change to unchecked. If unchecked, change to checked.", - "fullName": "Toggle checkmark", - "functionType": "Action", - "name": "ToggleChecked", - "sentence": "Toggle checkmark on _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyToggleChanged" - }, - "parameters": ["Object", "Behavior", ""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyChecked" - }, - "parameters": ["Object", "Behavior", ""] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyToggleChanged" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyChecked" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyToggleChanged" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyChecked" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Change the primary color of checkbox.", - "fullName": "Primary color of checkbox", - "functionType": "Action", - "group": "Checkbox appearance", - "name": "SetPrimaryColor", - "sentence": "Change the primary color of _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyPrimaryColor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"Color\")" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "description": "Primary color", - "name": "Color", - "type": "color" - } - ], - "objectGroups": [] - }, - { - "description": "Change the secondary color of checkbox.", - "fullName": "Secondary color of checkbox", - "functionType": "Action", - "group": "Checkbox appearance", - "name": "SetSecondaryColor", - "sentence": "Change the secondary color of _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertySecondaryColor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"Color\")" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "description": "Secondary color", - "name": "Color", - "type": "color" - } - ], - "objectGroups": [] - }, - { - "description": "Change the halo opacity when pressed.", - "fullName": "Halo opacity when pressed", - "functionType": "Action", - "group": "Checkbox appearance", - "name": "SetHaloOpacityPressed", - "sentence": "Change the halo opacity of _PARAM0_ when pressed: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyHaloOpacityClick" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "description": "Halo opacity", - "name": "Value", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Change the halo opacity when hovered.", - "fullName": "Halo opacity when hovered", - "functionType": "Action", - "group": "Checkbox appearance", - "name": "SetHaloOpacityHover", - "sentence": "Change the halo opacity of _PARAM0_ when hovered: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyHaloOpacityHover" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "description": "Halo opacity", - "name": "Value", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Change the halo radius when pressed.", - "fullName": "Halo radius when pressed", - "functionType": "Action", - "group": "Checkbox appearance", - "name": "SetHaloRadiusPressed", - "sentence": "Change the halo radius of _PARAM0_ when pressed: _PARAM2_ px", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyHaloRadiusPressed" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "description": "Halo radius", - "name": "Value", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Change the halo radius when hovered. This size is also used to detect interaction with the checkbox.", - "fullName": "Halo radius when hovered", - "functionType": "Action", - "group": "Checkbox appearance", - "name": "SetHaloRadiusHover", - "sentence": "Change the halo radius of _PARAM0_ when hovered: _PARAM2_ px", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyHaloRadiusHover" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "description": "Halo radius", - "name": "Value", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Change the border thickness of checkbox.", - "fullName": "Border thickness of checkbox", - "functionType": "Action", - "group": "Checkbox appearance", - "name": "SetBorderThickness", - "sentence": "Change the border thickness of _PARAM0_: _PARAM2_ px", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyBorderThickness" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "description": "Track thickness", - "name": "Value", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Change the side length of checkbox.", - "fullName": "Side length of checkbox", - "functionType": "Action", - "group": "Checkbox appearance", - "name": "SetSideLength", - "sentence": "Change the side length of _PARAM0_: _PARAM2_ px", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertySideLength" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::UpdateHitbox" - }, - "parameters": ["Object", "Behavior", ""] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "description": "Track width (px)", - "name": "Value", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Change the line width of checkmark.", - "fullName": "Line width of checkmark", - "functionType": "Action", - "group": "Checkbox appearance", - "name": "SetLineWidth", - "sentence": "Change the line width of _PARAM0_: _PARAM2_ px", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyLineWidth" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "description": "Line width (px)", - "name": "Value", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the checkbox is checked.", - "fullName": "Is checked", - "functionType": "Condition", - "group": "Checkbox state", - "name": "IsChecked", - "sentence": "_PARAM0_ is checked", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the checkbox interations are enabled.", - "fullName": "Interactions enabled", - "functionType": "Condition", - "group": "Checkbox", - "name": "IsEnabled", - "sentence": "Interactions of _PARAM0_ are enabled", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyEnabled" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the color used to draw the outline of the checkbox (when unchecked) and the fill color (when checked).", - "fullName": "Primary color of checkbox", - "functionType": "StringExpression", - "group": "Checkbox appearance", - "name": "PrimaryColor", - "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": ["Object.Behavior::PropertyPrimaryColor()"] - } - ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the color used to fill the checkbox (when unchecked) and to draw the checkmark (when checked).", - "fullName": "Secondary color of checkbox", - "functionType": "StringExpression", - "group": "Checkbox appearance", - "name": "SecondaryColor", - "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "Object.Behavior::PropertySecondaryColor()" - ] - } - ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the radius of the halo while the checkbox is touched or clicked.", - "fullName": "Halo radius while touched or clicked", - "functionType": "Expression", - "group": "Checkbox appearance", - "name": "HaloRadiusPressed", - "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyHaloRadiusPressed()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the opacity of the halo while the checkbox is touched or clicked.", - "fullName": "Halo opacity (while touched or clicked)", - "functionType": "Expression", - "group": "Checkbox appearance", - "name": "HaloOpacityPressed", - "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.Behavior::HaloOpacityPressed()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the radius of the halo when the mouse is hovering near the checkbox.", - "fullName": "Halo radius (during hover)", - "functionType": "Expression", - "group": "Checkbox appearance", - "name": "HaloRadiusHover", - "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyHaloRadiusHover()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the opacity of the halo when the mouse is hovering near the checkbox.", - "fullName": "Halo opacity (during hover)", - "functionType": "Expression", - "group": "Checkbox appearance", - "name": "HaloOpacityHover", - "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyHaloOpacityHover()" + "Object.Behavior::PropertySideLength()" ] } ] @@ -17197,86 +16623,6 @@ ], "objectGroups": [] }, - { - "description": "Return the line width of checkmark (pixels).", - "fullName": "Line width", - "functionType": "Expression", - "group": "Checkbox appearance", - "name": "LineWidth", - "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.Behavior::PropertyLineWidth()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the side length of checkbox (pixels).", - "fullName": "Side length ", - "functionType": "Expression", - "group": "Checkbox appearance", - "name": "SideLength", - "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.Behavior::PropertySideLength()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, { "description": "Return the border thickness of checkbox (pixels).", "fullName": "Border thickness", @@ -17334,7 +16680,10 @@ "type": { "value": "Checkbox::Checkbox::PropertyIsBeingPressed" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -17342,7 +16691,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -17398,8 +16749,7 @@ "textG": 0, "textR": 0 }, - "comment": "Include border in the collision mask", - "comment2": "" + "comment": "Include border in the collision mask" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17442,59 +16792,41 @@ "value": "0", "type": "Boolean", "label": "Checked", - "description": "", "group": "Checkbox state", - "extraInformation": [], - "hidden": false, "name": "Checked" }, { "value": "", "type": "Number", "label": "Halo size (hover). If blank, this is set to \"SideLength\".", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloRadiusHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityHover" }, { "value": "128", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", "group": "Checkbox state", - "extraInformation": [], - "hidden": false, "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingPressed" }, @@ -17502,9 +16834,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -17512,9 +16841,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -17522,9 +16848,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -17532,9 +16855,6 @@ "value": "0.3", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -17542,9 +16862,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" }, @@ -17552,9 +16869,6 @@ "value": "", "type": "Boolean", "label": "State of the checkbox has changed. (Used in \"ToggleChecked\" function)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ToggleChanged" }, @@ -17562,60 +16876,42 @@ "value": " 24;119;211", "type": "Color", "label": "Primary color of checkbox. (Example: 24;119;211) Fill color when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "PrimaryColor" }, { "value": "255;255;255", "type": "Color", "label": "Secondary color of checkbox. (Example: 255;255;255) Color of checkmark when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "SecondaryColor" }, { "value": "24", "type": "Number", "label": "Length of each side (px) Minimum: 10", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "SideLength" }, { "value": "5", "type": "Number", "label": "Line width of checkmark (px) (Min: 1, Max: 1/4 * SideLength)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "LineWidth" }, { "value": "2", "type": "Number", "label": "Border thickness (px) This border is only visible when the checkbox is unchecked. ", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "BorderThickness" }, { "value": "", "type": "Number", "label": "Halo size (pressed). If blank, this is set to \"HaloRadiusHover * 1.1\"", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloRadiusPressed" } ], @@ -17629,6 +16925,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Draggable slider (for Shape Painter)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "DraggableSliderControl", @@ -17659,12 +16956,20 @@ "identifier": "DraggableSliderControl", "name": "gdevelop-extension-store" }, - "tags": ["draggable", "slider", "shape painter", "ui", "widget"], + "tags": [ + "draggable", + "slider", + "shape painter", + "ui", + "widget" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -17689,8 +16994,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure object doesn't get re-drawn every frame", - "comment2": "" + "comment": "Make sure object doesn't get re-drawn every frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17700,7 +17004,10 @@ "type": { "value": "PrimitiveDrawing::ClearBetweenFrames" }, - "parameters": ["Object", "no"] + "parameters": [ + "Object", + "no" + ] } ] }, @@ -17714,8 +17021,7 @@ "textG": 0, "textR": 0 }, - "comment": "Use correct min value (instead of always starting at 0)", - "comment2": "" + "comment": "Use correct min value (instead of always starting at 0)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17744,8 +17050,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set track height function (which enforces valid thumb sizes)", - "comment2": "" + "comment": "Set track height function (which enforces valid thumb sizes)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17774,8 +17079,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start halo at same size as thumb", - "comment2": "" + "comment": "Start halo at same size as thumb" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17802,7 +17106,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -17845,7 +17153,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::IsEnabled" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [], @@ -17860,8 +17172,7 @@ "textG": 0, "textR": 0 }, - "comment": "Track where the mouse is (in relation to object)", - "comment2": "" + "comment": "Track where the mouse is (in relation to object)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17901,8 +17212,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move slider when being dragged", - "comment2": "" + "comment": "Move slider when being dragged" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17911,7 +17221,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -17930,7 +17243,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ], "events": [ @@ -17944,8 +17261,7 @@ "textG": 0, "textR": 0 }, - "comment": "End sliding and update variables", - "comment2": "" + "comment": "End sliding and update variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17954,7 +17270,10 @@ "type": { "value": "MouseButtonReleased" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] } ], "actions": [ @@ -17962,7 +17281,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -17976,8 +17299,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update \"Value\" based on the location of the thumb", - "comment2": "" + "comment": "Update \"Value\" based on the location of the thumb" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18006,8 +17328,7 @@ "textG": 0, "textR": 0 }, - "comment": "Grow halo even more when pressed", - "comment2": "" + "comment": "Grow halo even more when pressed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18038,8 +17359,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect hover/touch/click (but only if the layer and object is visible, and the object is not already being dragged)", - "comment2": "" + "comment": "Detect hover/touch/click (but only if the layer and object is visible, and the object is not already being dragged)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18049,7 +17369,10 @@ "inverted": true, "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [], @@ -18064,8 +17387,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect mouse clicks near track, start dragging", - "comment2": "" + "comment": "Detect mouse clicks near track, start dragging" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18074,7 +17396,10 @@ "type": { "value": "SourisBouton" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] }, { "type": { @@ -18164,8 +17489,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset hover detection ", - "comment2": "" + "comment": "Reset hover detection " }, { "type": "BuiltinCommonInstructions::Standard", @@ -18175,7 +17499,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsHovered" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -18189,8 +17517,7 @@ "textG": 0, "textR": 0 }, - "comment": "Grow halo when hovered", - "comment2": "" + "comment": "Grow halo when hovered" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18200,7 +17527,10 @@ "inverted": true, "value": "SourisBouton" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] }, { "type": { @@ -18248,7 +17578,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsHovered" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] }, { "type": { @@ -18273,8 +17607,7 @@ "textG": 0, "textR": 0 }, - "comment": "Shrink halo to zero when not hovered", - "comment2": "" + "comment": "Shrink halo to zero when not hovered" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18284,7 +17617,10 @@ "inverted": true, "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -18332,8 +17668,7 @@ "textG": 0, "textR": 0 }, - "comment": "Redraw slider only when halo is not at final size", - "comment2": "" + "comment": "Redraw slider only when halo is not at final size" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18365,7 +17700,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -18400,7 +17739,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -18448,19 +17791,27 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyNeedRedraw" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { "value": "Visible" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] }, { "type": { "value": "LayerVisible" }, - "parameters": ["", "Object.Layer()"] + "parameters": [ + "", + "Object.Layer()" + ] } ], "actions": [ @@ -18468,13 +17819,19 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] }, { "type": { "value": "PrimitiveDrawing::Drawer::ClearShapes" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] } ], "events": [ @@ -18497,8 +17854,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set inactive track parameters (by default, use thumb color)", - "comment2": "" + "comment": "Set inactive track parameters (by default, use thumb color)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18572,7 +17928,11 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "Object", + "=", + "0" + ] } ] }, @@ -18586,8 +17946,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw inactive track", - "comment2": "" + "comment": "Draw inactive track" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18617,8 +17976,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw half circle at end of track (inactive side)", - "comment2": "" + "comment": "Draw half circle at end of track (inactive side)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18627,7 +17985,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -18670,8 +18031,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set active track parameters (by default, use thumb color)", - "comment2": "" + "comment": "Set active track parameters (by default, use thumb color)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18753,8 +18113,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw active track (2 pixels bigger than property) ", - "comment2": "" + "comment": "Draw active track (2 pixels bigger than property) " }, { "type": "BuiltinCommonInstructions::Standard", @@ -18784,8 +18143,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw half circle at end of track (active side)", - "comment2": "" + "comment": "Draw half circle at end of track (active side)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18794,7 +18152,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -18854,8 +18215,7 @@ "textG": 0, "textR": 0 }, - "comment": "Prepare halo", - "comment2": "" + "comment": "Prepare halo" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18874,7 +18234,11 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "Object", + "=", + "0" + ] } ] }, @@ -18888,8 +18252,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw halo (it will grow or shrink as needed)", - "comment2": "" + "comment": "Draw halo (it will grow or shrink as needed)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18899,7 +18262,10 @@ "inverted": true, "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -18936,8 +18302,7 @@ "textG": 0, "textR": 0 }, - "comment": "Use a more opaque halo while being dragged (it will grow or shrink as needed)", - "comment2": "" + "comment": "Use a more opaque halo while being dragged (it will grow or shrink as needed)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18946,7 +18311,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -18997,8 +18365,7 @@ "textG": 0, "textR": 0 }, - "comment": "Prepare thumb settings", - "comment2": "" + "comment": "Prepare thumb settings" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19035,8 +18402,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw Circle thumb", - "comment2": "" + "comment": "Draw Circle thumb" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19077,8 +18443,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw Rectangle thumb", - "comment2": "" + "comment": "Draw Rectangle thumb" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19150,7 +18515,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -19158,7 +18526,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -19194,7 +18564,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyEnabled" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -19202,7 +18575,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -19239,7 +18614,9 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": ["\"Enable\""] + "parameters": [ + "\"Enable\"" + ] } ], "actions": [ @@ -19247,7 +18624,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyEnabled" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ], "events": [ @@ -19261,8 +18642,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop dragging (so the slider won't be dragging when it gets enabled)", - "comment2": "" + "comment": "Stop dragging (so the slider won't be dragging when it gets enabled)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19272,7 +18652,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -19286,8 +18670,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset halo size (so halo won't appear when slider gets enabled)", - "comment2": "" + "comment": "Reset halo size (so halo won't appear when slider gets enabled)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19315,7 +18698,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"Enable\""] + "parameters": [ + "\"Enable\"" + ] } ], "actions": [ @@ -19323,7 +18708,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyEnabled" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -19335,7 +18724,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -19377,7 +18770,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValue()"] + "parameters": [ + "Object.Behavior::PropertyValue()" + ] } ] } @@ -19416,7 +18811,12 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyTickSpacing" }, - "parameters": ["Object", "Behavior", "<=", "0"] + "parameters": [ + "Object", + "Behavior", + "<=", + "0" + ] } ], "actions": [ @@ -19440,7 +18840,12 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyTickSpacing" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] } ], "actions": [ @@ -19525,8 +18930,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set the proper offset (it moves the slider)", - "comment2": "" + "comment": "Set the proper offset (it moves the slider)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19547,7 +18951,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -19589,7 +18997,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValueMin()"] + "parameters": [ + "Object.Behavior::PropertyValueMin()" + ] } ] } @@ -19687,7 +19097,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValueMax()"] + "parameters": [ + "Object.Behavior::PropertyValueMax()" + ] } ] } @@ -19769,7 +19181,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTrackLength()"] + "parameters": [ + "Object.Behavior::PropertyTrackLength()" + ] } ] } @@ -19809,7 +19223,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyThumbHeight()"] + "parameters": [ + "Object.Behavior::PropertyThumbHeight()" + ] } ] } @@ -19907,7 +19323,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTickSpacing()"] + "parameters": [ + "Object.Behavior::PropertyTickSpacing()" + ] } ] } @@ -20021,13 +19439,21 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -20041,8 +19467,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move thumb to correct place (based on new track size)", - "comment2": "" + "comment": "Move thumb to correct place (based on new track size)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -20110,7 +19535,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -20124,8 +19553,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure thumb width is not smaller than track height + 2 pixels (to prevent track ends from showing)", - "comment2": "" + "comment": "Make sure thumb width is not smaller than track height + 2 pixels (to prevent track ends from showing)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -20225,8 +19653,7 @@ "textG": 0, "textR": 0 }, - "comment": "Thumb cannot be less than track thickness (plus 2 pixels)", - "comment2": "" + "comment": "Thumb cannot be less than track thickness (plus 2 pixels)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -20253,13 +19680,21 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20303,8 +19738,7 @@ "textG": 0, "textR": 0 }, - "comment": "Thumb cannot be less than track thickness (plus 2 pixels)", - "comment2": "" + "comment": "Thumb cannot be less than track thickness (plus 2 pixels)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -20331,13 +19765,21 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20390,7 +19832,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20443,7 +19889,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20496,7 +19946,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20549,7 +20003,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -20563,8 +20021,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure thumb width is not smaller than track height (to prevent track ends from showing)", - "comment2": "" + "comment": "Make sure thumb width is not smaller than track height (to prevent track ends from showing)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -20573,7 +20030,12 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" }, - "parameters": ["Object", "Behavior", "=", "\"rectangle\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"rectangle\"" + ] }, { "type": { @@ -20639,7 +20101,11 @@ "type": { "value": "Egal" }, - "parameters": ["GetArgumentAsNumber(\"Value\")", "=", "0"] + "parameters": [ + "GetArgumentAsNumber(\"Value\")", + "=", + "0" + ] } ], "actions": [ @@ -20647,7 +20113,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -20658,7 +20128,11 @@ "type": { "value": "Egal" }, - "parameters": ["GetArgumentAsNumber(\"Value\")", "=", "1"] + "parameters": [ + "GetArgumentAsNumber(\"Value\")", + "=", + "1" + ] } ], "actions": [ @@ -20666,7 +20140,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -20678,7 +20156,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20731,7 +20213,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20784,7 +20270,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20837,7 +20327,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20890,7 +20384,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20943,7 +20441,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20996,7 +20498,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -21082,199 +20588,145 @@ "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ValueMin" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ValueMax" }, { "value": "0", "type": "Number", "label": "Tick spacing", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TickSpacing" }, { "value": "circle", "type": "Choice", "label": "Thumb shape", - "description": "", "group": "Thumb", - "extraInformation": ["circle", "rectangle"], - "hidden": false, + "choices": [ + { + "label": "circle", + "value": "circle" + }, + { + "label": "rectangle", + "value": "rectangle" + } + ], "name": "ThumbShape" }, { "value": "20", "type": "Number", "label": "Thumb width", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbWidth" }, { "value": "20", "type": "Number", "label": "Thumb height", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbHeight" }, { "value": " 24;119;211", "type": "Color", "label": "Thumb Color", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbColor" }, { "value": "255", "type": "Number", "label": "Thumb opacity", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbOpacity" }, { "value": "200", "type": "Number", "label": "Track length", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "TrackLength" }, { "value": "4", "type": "Number", "label": "Track thickness", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "TrackThickness" }, { "value": "", "type": "String", "label": "Inactive track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "InactiveTrackColor" }, { "value": "96", "type": "Number", "label": "Inactive track opacity", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "InactiveTrackOpacity" }, { "value": " ", "type": "String", "label": "Active track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "ActiveTrackColor" }, { "value": "255", "type": "Number", "label": "Active track opacity", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "ActiveTrackOpacity" }, { "value": "24", "type": "Number", "label": "Halo size (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloRadius" }, { "value": "32", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Rounded track ends", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "RoundedTrack" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingDragged" }, @@ -21282,9 +20734,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Value" }, @@ -21292,9 +20741,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbOffset" }, @@ -21302,9 +20748,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -21312,9 +20755,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -21322,9 +20762,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseX" }, @@ -21332,9 +20769,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseY" }, @@ -21342,9 +20776,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -21352,9 +20783,6 @@ "value": "0.2", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -21362,9 +20790,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" } @@ -21379,14 +20804,15 @@ "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.2", + "version": "2.1.1", "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.", + "A button that can be used for menus and most labelled buttons of a game. 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)." ], @@ -21394,10 +20820,46 @@ "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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -21413,57 +20875,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -21477,463 +20909,406 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ] }, { - "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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } + ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], - "actions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": ["Object", "Behavior", "=", "0"] + "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::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "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": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "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": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "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": [ + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" + "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\"" + ] + } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ] @@ -21944,49 +21319,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "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": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -22016,15 +21530,63 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "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": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -22056,9 +21618,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -22066,7 +21632,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22098,9 +21666,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -22108,7 +21680,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22140,9 +21714,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -22150,7 +21728,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22182,9 +21762,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -22192,7 +21776,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -22201,11 +21787,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -22216,7 +21801,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22248,11 +21835,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -22263,7 +21849,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22295,11 +21883,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -22310,7 +21897,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22345,107 +21934,412 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + ], + "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", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ { - "description": "Object", - "name": "Object", - "type": "object" + "name": "Label" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "name": "BitmapLabel" } - ], - "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" + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } ], - "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" - }, + "effects": [] + } + ], + "instances": [ { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" + "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": [] } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", - "name": "PanelSpriteButton", + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -22463,8 +22357,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown.", - "comment2": "" + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -22474,80 +22367,94 @@ "type": { "value": "Create" }, - "parameters": ["", "Idle", "0", "0", ""] + "parameters": [ + "", + "Hovered", + "0", + "0", + "" + ] }, { "type": { "value": "Create" }, - "parameters": ["", "Hovered", "0", "0", ""] + "parameters": [ + "", + "Pressed", + "0", + "0", + "" + ] }, { "type": { - "value": "Create" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, - "parameters": ["", "Pressed", "0", "0", ""] + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] }, { "type": { - "value": "Cache" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, - "parameters": ["Hovered"] + "parameters": [ + "Pressed", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Pressed"] + "parameters": [ + "Hovered" + ] }, { "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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" + "value": "Cache" }, - "parameters": ["", "Label", "0", "0", ""] + "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": [ + "Labels", + "Text", + "=", + "LabelText" + ] } ] } @@ -22583,15 +22490,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": [ + "Labels", + "Text", + "=", + "LabelText" + ] } ] } @@ -22631,8 +22570,7 @@ "textG": 0, "textR": 0 }, - "comment": "Show the right background accordingly to the new state.", - "comment2": "" + "comment": "Show the right background accordingly to the new state." }, { "type": "BuiltinCommonInstructions::Standard", @@ -22641,7 +22579,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -22653,25 +22594,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": [ @@ -22682,19 +22629,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", @@ -22702,7 +22655,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -22713,9 +22666,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "HoveredFadeOutDuration", + "=", + "0" + ] } ], "actions": [ @@ -22723,7 +22680,9 @@ "type": { "value": "Cache" }, - "parameters": ["Hovered"] + "parameters": [ + "Hovered" + ] } ] } @@ -22734,9 +22693,14 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, - "parameters": ["Hovered", "=", "0"] + "parameters": [ + "Hovered", + "Opacity", + "=", + "0" + ] } ], "actions": [ @@ -22744,13 +22708,20 @@ "type": { "value": "Cache" }, - "parameters": ["Hovered"] + "parameters": [ + "Hovered" + ] }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, - "parameters": ["Hovered", "=", "255"] + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] } ] }, @@ -22761,7 +22732,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -22773,43 +22747,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" + ] } ] }, @@ -22820,7 +22811,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -22832,31 +22826,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", + "" + ] } ] }, @@ -22867,7 +22869,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -22879,140 +22884,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.", - "comment2": "" - }, - { - "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", ""] } ] } @@ -23028,22 +22932,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -23059,7 +22948,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsIdle" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -23067,7 +22960,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -23096,7 +22991,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsClicked" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -23104,7 +23003,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -23133,7 +23034,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsHovered" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -23141,7 +23046,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -23170,7 +23077,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsFocused" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -23178,7 +23089,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -23207,7 +23120,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsPressed" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -23215,47 +23132,9 @@ "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\")" + "True" ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": ["Object", ""] } ] } @@ -23266,91 +23145,17 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "", - "name": "LabelText", - "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", + "description": "Change the text of the button label.", "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", + "name": "SetLabelText", "private": true, - "sentence": "Center the label of _PARAM0_", + "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -23358,75 +23163,53 @@ "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": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Labels", + "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": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": ["Object", ""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "MettreY" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Labels", + "Text", + "=", + "Value" ] } ] @@ -23440,22 +23223,42 @@ "type": "object" } ], - "objectGroups": [ + "objectGroups": [] + }, + { + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", + "events": [ { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "Pressed" + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Labels.Text::Value()" + ] } ] } - ] + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { "description": "De/activate interactions with the button.", @@ -23469,9 +23272,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -23479,7 +23286,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Idle", "ButtonFSM", "yes"] + "parameters": [ + "Idle", + "ButtonFSM", + "yes" + ] } ] }, @@ -23489,9 +23300,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -23499,7 +23314,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Idle", "ButtonFSM", "no"] + "parameters": [ + "Idle", + "ButtonFSM", + "no" + ] } ] } @@ -23533,7 +23352,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Idle", "ButtonFSM"] + "parameters": [ + "Idle", + "ButtonFSM" + ] } ], "actions": [ @@ -23541,7 +23363,90 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "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": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] } ] } @@ -23559,157 +23464,698 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": ["Label"], - "hidden": false, - "name": "LeftPadding" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": ["Label"], - "hidden": false, - "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"], - "hidden": false, - "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"], - "hidden": false, - "name": "BottomPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "HoveredFadeOutDuration" + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" + } + ], + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "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, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "variants": [ + { + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Green Button With Stone Frame 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": "LakkiReddy-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": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [], - "behaviors": [ + "layers": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] + ], + "instances": [ + { + "angle": 0, + "customSize": 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": "f8a927cc-1139-440f-8a4e-bc8e56e322bf", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.0114942528735633, + "windowMask": false, + "selectedLayer": "" + } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", + "assetStoreOriginalName": "Green Button With Stone Frame", + "name": "Green Button With Stone Frame", + "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": "Roboto-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": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "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": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": "f8a927cc-1139-440f-8a4e-bc8e56e322bf", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -23720,12 +24166,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -23735,13 +24182,49 @@ "identifier": "PanelSpriteSlider", "name": "gdevelop-extension-store" }, - "tags": ["draggable", "slider", "ui", "widget"], + "tags": [ + "draggable", + "slider", + "ui", + "widget" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders 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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -23765,7 +24248,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValue()"] + "parameters": [ + "CurrentValue" + ] } ] } @@ -23800,21 +24285,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "StepSize", + "=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -23824,21 +24312,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "StepSize", + "!=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -23875,7 +24366,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMinValue()"] + "parameters": [ + "MinValue" + ] } ] } @@ -23911,13 +24404,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -23966,7 +24458,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxValue()"] + "parameters": [ + "MaxValue" + ] } ] } @@ -24002,13 +24496,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -24097,7 +24590,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyStepSize()"] + "parameters": [ + "StepSize" + ] } ] } @@ -24133,13 +24628,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -24178,40 +24672,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Value" + "name": "CurrentValue" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -24231,512 +24709,464 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "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": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "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": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasAnyTouchOrMouseStarted" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [""] - } - ], - "actions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" + "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 }, - "parameters": ["Object", "Behavior", "=", "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::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "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": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "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": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -24745,13 +25175,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -24761,50 +25190,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -24834,15 +25364,23 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -24874,9 +25412,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -24884,7 +25426,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -24916,9 +25460,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -24926,7 +25474,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -24958,9 +25508,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -24968,7 +25522,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -25000,9 +25556,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -25010,7 +25570,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -25019,11 +25581,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -25034,7 +25595,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -25066,11 +25629,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -25081,7 +25643,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -25113,11 +25677,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -25128,7 +25691,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -25163,7 +25728,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -25193,8 +25760,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -25202,14 +25767,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -25218,9 +25796,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -25228,9 +25803,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -25238,9 +25810,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -25248,9 +25817,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -25260,10 +25826,267 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -25271,31 +26094,28 @@ "name": "onCreated", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload.", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "Thumb", + "Draggable", + "" ] } ] @@ -25310,8 +26130,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances.", - "comment2": "" + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25319,39 +26138,71 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": ["", "Background", "0", "0", ""] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "FillBar", "0", "0", ""] + "parameters": [ + "FillBar", + "Anchor", + "" + ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "Thumb", "0", "0", ""] + "parameters": [ + "Thumb", + "Anchor", + "" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Background", "=", "1"] + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - FillBar.Width()" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["FillBar", "=", "2"] - }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - FillBar.Height()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Thumb", "=", "3"] + "parameters": [ + "PreviousInitialValue", + "=", + "InitialValue" + ] } ] }, @@ -25365,8 +26216,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the label that is displayed over the thumb.", - "comment2": "" + "comment": "Create the label that is displayed over the thumb." }, { "type": "BuiltinCommonInstructions::Standard", @@ -25376,25 +26226,21 @@ "type": { "value": "Create" }, - "parameters": ["", "Label", "0", "0", ""] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": ["Label", "=", "4"] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": ["Label", "no"] + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -25408,8 +26254,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass the configuration to the behavior.", - "comment2": "" + "comment": "Pass the configuration to the behavior." }, { "type": "BuiltinCommonInstructions::Standard", @@ -25419,7 +26264,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -25428,7 +26276,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -25442,19 +26290,28 @@ "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Thumb", ""] + "parameters": [ + "Thumb", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["FillBar", ""] + "parameters": [ + "FillBar", + "" + ] } ] } @@ -25479,17 +26336,14 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] }, @@ -25498,24 +26352,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -25525,7 +26379,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -25549,86 +26403,323 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": ["Background", "ButtonFSM"] - } - ], - "actions": [], + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" + "value": "BehaviorActivated" }, - "parameters": ["Thumb", "Draggable"] - }, + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [], + "events": [ { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "value": "DraggableBehavior::Dragged" }, - "parameters": ["Background", "ButtonFSM", ""] - }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" }, - "parameters": ["Object"] + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] } ], "actions": [ @@ -25636,302 +26727,62 @@ "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "ResetObjectTimer" }, - "parameters": ["Label", "\"HideBack\""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "CompareObjectTimer" }, - "parameters": ["Object"] + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": ["Object"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": ["Label", ""] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": ["Label"] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - } - ] - } - ], - "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 parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\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.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" - ] - } - ] } ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": ["Object", "=", "1"] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, "parameters": [] } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": ["Object", ""] - } ] } ], @@ -25966,19 +26817,30 @@ "type": { "value": "DraggableBehavior::Dragged" }, - "parameters": ["Thumb", "Draggable"] + "parameters": [ + "Thumb", + "Draggable" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressed" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] } ] } @@ -25988,7 +26850,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -26018,7 +26882,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::Value()"] + "parameters": [ + "FillBar.Slider::Value()" + ] } ] } @@ -26055,7 +26921,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -26063,7 +26929,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -26100,7 +26969,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MinValue()"] + "parameters": [ + "FillBar.Slider::MinValue()" + ] } ] } @@ -26137,21 +27008,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -26188,7 +27056,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MaxValue()"] + "parameters": [ + "FillBar.Slider::MaxValue()" + ] } ] } @@ -26225,21 +27095,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -26276,7 +27143,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::StepSize()"] + "parameters": [ + "FillBar.Slider::StepSize()" + ] } ] } @@ -26313,7 +27182,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -26349,9 +27218,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] } ], "actions": [ @@ -26359,7 +27232,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -26388,23 +27263,33 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "ShowLabelAtChanges", + "False", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -26413,23 +27298,34 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] } ] } @@ -26449,53 +27345,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -26511,7 +27360,13 @@ "type": { "value": "PanelSpriteSlider::Slider::Size" }, - "parameters": ["FillBar", "Slider", ">", "0", ""] + "parameters": [ + "FillBar", + "Slider", + ">", + "0", + "" + ] } ], "actions": [], @@ -26522,10 +27377,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -26543,14 +27399,18 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { "type": { "value": "SetCenterY" }, - "parameters": ["Thumb", "=", "FillBar.CenterY()"] + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] } ] }, @@ -26560,10 +27420,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -26572,7 +27433,11 @@ "type": { "value": "SetCenterX" }, - "parameters": ["Label", "=", "Thumb.CenterX()"] + "parameters": [ + "Label", + "=", + "Thumb.CenterX()" + ] }, { "type": { @@ -26581,14 +27446,18 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, - "parameters": ["Label", "=", "-Object.Angle()"] + "parameters": [ + "Label", + "=", + "-Object.Angle()" + ] } ] } @@ -26605,74 +27474,6 @@ ], "objectGroups": [] }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.PropertyBarLeftPadding()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "fullName": "", "functionType": "Expression", @@ -26689,7 +27490,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -26726,8 +27527,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass configuration to the behavior and update children.", - "comment2": "" + "comment": "Pass configuration to the behavior and update children." }, { "type": "BuiltinCommonInstructions::Standard", @@ -26740,9 +27540,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -26752,7 +27551,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -26763,7 +27562,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -26792,9 +27591,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -26802,13 +27605,21 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "yes"] + "parameters": [ + "Thumb", + "Draggable", + "yes" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "yes"] + "parameters": [ + "Background", + "ButtonFSM", + "yes" + ] } ] }, @@ -26818,9 +27629,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -26828,19 +27643,29 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "no"] + "parameters": [ + "Thumb", + "Draggable", + "no" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "no"] + "parameters": [ + "Background", + "ButtonFSM", + "no" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] } @@ -26874,7 +27699,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Background", "ButtonFSM"] + "parameters": [ + "Background", + "ButtonFSM" + ] } ], "actions": [ @@ -26882,7 +27710,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -26903,100 +27733,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -27004,8 +27833,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -27014,8 +27841,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -27024,8 +27853,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["FillBar"], + "extraInformation": [ + "FillBar" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -27034,111 +27865,295 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Label"], + "extraInformation": [ + "Label" + ], + "choices": [], "hidden": true, "name": "ShowLabel" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" + } + ], + "variants": [ + { + "areaMaxX": 583, + "areaMaxY": 63, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "05b0eb2d13ff37b70927d0184d4705e9c39c0b8fece7463127c4fe9eb65bb422", + "assetStoreOriginalName": "Small Plastic Green Round Slider", + "name": "Small Plastic Green Round Slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 221, + "g": 221, + "r": 221 + }, + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "221;221;221" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 59, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "Small Plastic Green Round Slider Thumb.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 63, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 16, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "Transparent.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 16, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 31, + "height": 63, + "leftMargin": 31, + "name": "Background", + "rightMargin": 31, + "texture": "Small Plastic Green Round Slider Border.png", + "tiled": false, + "topMargin": 31, + "type": "PanelSpriteObject::PanelSprite", + "width": 583, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Thumb", + "persistentUuid": "66c86c92-2307-478b-b235-9fd684f1b6dc", + "width": 0, + "x": 520, + "y": 2, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0.9961685823754789, + "height": 16, + "layer": "", + "name": "FillBar", + "persistentUuid": "8ab1d9ff-14ee-4041-930f-b3792501b635", + "width": 520, + "x": 31, + "y": 23, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -27149,6 +28164,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Make objects orbit around a center object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBkPSJNMTYsOWMtMy45LDAtNywzLjEtNyw3czMuMSw3LDcsN3M3LTMuMSw3LTdTMTkuOSw5LDE2LDl6Ii8+DQoJPHBhdGggZD0iTTI3LjcsOC4zQzI3LjksNy45LDI4LDcuNSwyOCw3YzAtMS43LTEuMy0zLTMtM2MtMC41LDAtMC45LDAuMS0xLjMsMC4zQzIxLjQsMi44LDE4LjgsMiwxNiwyQzguMywyLDIsOC4zLDIsMTYNCgkJczYuMywxNCwxNCwxNHMxNC02LjMsMTQtMTRDMzAsMTMuMiwyOS4yLDEwLjYsMjcuNyw4LjN6IE0xNiwyOEM5LjQsMjgsNCwyMi42LDQsMTZTOS40LDQsMTYsNGMyLjIsMCw0LjQsMC42LDYuMywxLjgNCgkJQzIyLjEsNi4xLDIyLDYuNiwyMiw3YzAsMS43LDEuMywzLDMsM2MwLjQsMCwwLjktMC4xLDEuMi0wLjNjMS4yLDEuOSwxLjgsNCwxLjgsNi4zQzI4LDIyLjYsMjIuNiwyOCwxNiwyOHoiLz4NCjwvZz4NCjwvc3ZnPg0K", "name": "OrbitingObjects", @@ -27195,6 +28211,8 @@ "IRIhkkTTl2UHhfjrLTTH5GYwkYu1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Move objects in orbit around a center object.", @@ -27228,8 +28246,7 @@ "textG": 0, "textR": 0 }, - "comment": "Note: Must use the Action form of \"Take into account\" so that this variable is set to 0 when there are no linked objects", - "comment2": "" + "comment": "Note: Must use the Action form of \"Take into account\" so that this variable is set to 0 when there are no linked objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27239,7 +28256,11 @@ "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, - "parameters": ["", "OrbitingObject", "CenterObject"] + "parameters": [ + "", + "OrbitingObject", + "CenterObject" + ] }, { "type": { @@ -27312,8 +28333,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create orbiting objects and link them to the center object", - "comment2": "" + "comment": "Create orbiting objects and link them to the center object" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27363,8 +28383,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update counter", - "comment2": "" + "comment": "Update counter" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27405,8 +28424,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reassign OrbitOrder", - "comment2": "" + "comment": "Reassign OrbitOrder" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27486,8 +28504,7 @@ "textG": 0, "textR": 0 }, - "comment": "Match the angle used by the rest of the orbiting objects", - "comment2": "" + "comment": "Match the angle used by the rest of the orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27517,8 +28534,7 @@ "textG": 0, "textR": 0 }, - "comment": "Spread out orbiting objects evenly", - "comment2": "" + "comment": "Spread out orbiting objects evenly" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27604,7 +28620,10 @@ "type": { "value": "Delete" }, - "parameters": ["OrbitingObject", ""] + "parameters": [ + "OrbitingObject", + "" + ] } ] } @@ -27620,8 +28639,7 @@ "textG": 0, "textR": 0 }, - "comment": "Spread out orbiting objects evenly", - "comment2": "" + "comment": "Spread out orbiting objects evenly" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27630,7 +28648,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"ResetObjectsAfterDeletion\""] + "parameters": [ + "\"ResetObjectsAfterDeletion\"" + ] } ], "actions": [ @@ -27669,7 +28689,11 @@ "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, - "parameters": ["", "OrbitingObject", "CenterObject"] + "parameters": [ + "", + "OrbitingObject", + "CenterObject" + ] } ], "actions": [], @@ -27684,8 +28708,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate new angle for this frame", - "comment2": "" + "comment": "Calculate new angle for this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27714,8 +28737,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep the angle between (0 to 360)", - "comment2": "" + "comment": "Keep the angle between (0 to 360)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27756,8 +28778,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move object to new angle", - "comment2": "" + "comment": "Move object to new angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27786,8 +28807,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle of rotating objects", - "comment2": "" + "comment": "Change angle of rotating objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27815,8 +28835,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save the current angle so it can be used for new orbiting objects", - "comment2": "" + "comment": "Save the current angle so it can be used for new orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27932,8 +28951,7 @@ "textG": 0, "textR": 0 }, - "comment": "Note: Use the Action (instead of a Condition) for \"Take into account\" to make the action run even when there are no linked objects", - "comment2": "" + "comment": "Note: Use the Action (instead of a Condition) for \"Take into account\" to make the action run even when there are no linked objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27943,7 +28961,11 @@ "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, - "parameters": ["", "OrbitingObject", "CenterObject"] + "parameters": [ + "", + "OrbitingObject", + "CenterObject" + ] }, { "type": { @@ -28016,8 +29038,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create orbiting objects and link them to the center object", - "comment2": "" + "comment": "Create orbiting objects and link them to the center object" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28057,8 +29078,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update counter", - "comment2": "" + "comment": "Update counter" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28099,8 +29119,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reassign OrbitOrder", - "comment2": "" + "comment": "Reassign OrbitOrder" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28180,8 +29199,7 @@ "textG": 0, "textR": 0 }, - "comment": "Match the angle used by the rest of the orbiting objects", - "comment2": "" + "comment": "Match the angle used by the rest of the orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28211,8 +29229,7 @@ "textG": 0, "textR": 0 }, - "comment": "Spread out orbiting objects evenly", - "comment2": "" + "comment": "Spread out orbiting objects evenly" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28298,7 +29315,10 @@ "type": { "value": "Delete" }, - "parameters": ["OrbitingObject", ""] + "parameters": [ + "OrbitingObject", + "" + ] } ] } @@ -28314,8 +29334,7 @@ "textG": 0, "textR": 0 }, - "comment": "Spread out orbiting objects evenly", - "comment2": "" + "comment": "Spread out orbiting objects evenly" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28324,7 +29343,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"ResetObjectsAfterDeletion\""] + "parameters": [ + "\"ResetObjectsAfterDeletion\"" + ] } ], "actions": [ @@ -28363,7 +29384,11 @@ "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, - "parameters": ["", "OrbitingObject", "CenterObject"] + "parameters": [ + "", + "OrbitingObject", + "CenterObject" + ] } ], "actions": [], @@ -28378,8 +29403,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate new angle for this frame", - "comment2": "" + "comment": "Calculate new angle for this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28408,8 +29432,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep the angle between (0 to 360)", - "comment2": "" + "comment": "Keep the angle between (0 to 360)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28450,8 +29473,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move object to new angle", - "comment2": "" + "comment": "Move object to new angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28481,8 +29503,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle of rotating objects", - "comment2": "" + "comment": "Change angle of rotating objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28510,8 +29531,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save the current angle so it can be used for new orbiting objects", - "comment2": "" + "comment": "Save the current angle so it can be used for new orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28549,8 +29569,7 @@ "textG": 0, "textR": 0 }, - "comment": "Foreground = Bottom (Default)", - "comment2": "" + "comment": "Foreground = Bottom (Default)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28607,8 +29626,7 @@ "textG": 0, "textR": 0 }, - "comment": "Foreground = Top", - "comment2": "" + "comment": "Foreground = Top" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28647,8 +29665,7 @@ "textG": 0, "textR": 0 }, - "comment": "Foreground = Left", - "comment2": "" + "comment": "Foreground = Left" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28687,8 +29704,7 @@ "textG": 0, "textR": 0 }, - "comment": "Foreground = Right", - "comment2": "" + "comment": "Foreground = Right" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28812,8 +29828,7 @@ "textG": 0, "textR": 0 }, - "comment": "Delete orbiting objects", - "comment2": "" + "comment": "Delete orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28822,7 +29837,11 @@ "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, - "parameters": ["", "OrbitingObject", "CenterObject"] + "parameters": [ + "", + "OrbitingObject", + "CenterObject" + ] } ], "actions": [ @@ -28830,7 +29849,10 @@ "type": { "value": "Delete" }, - "parameters": ["OrbitingObject", ""] + "parameters": [ + "OrbitingObject", + "" + ] } ] } @@ -28862,6 +29884,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Shake Object (position, angle, scale)", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", @@ -28904,8 +29927,12 @@ "rotate", "angle" ], - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -28940,8 +29967,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start/Reset duration timer", - "comment2": "" + "comment": "Start/Reset duration timer" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28968,8 +29994,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass input parameters to global variables so that onScenePostEvents can use them", - "comment2": "" + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29042,8 +30067,7 @@ "textG": 0, "textR": 0 }, - "comment": "Determine if the shake should keep going until stopped", - "comment2": "" + "comment": "Determine if the shake should keep going until stopped" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29068,7 +30092,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"ShakeForever\""] + "parameters": [ + "\"ShakeForever\"" + ] } ], "actions": [ @@ -29094,8 +30120,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add default values if none were provided", - "comment2": "" + "comment": "Add default values if none were provided" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29165,8 +30190,7 @@ "textG": 0, "textR": 0 }, - "comment": "If duration is less than a single shake, increase duration to make 1 full shake", - "comment2": "" + "comment": "If duration is less than a single shake, increase duration to make 1 full shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29207,8 +30231,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect initial shake", - "comment2": "" + "comment": "Detect initial shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29249,8 +30272,7 @@ "textG": 0, "textR": 0 }, - "comment": "Initiate the onScenePostEvents function", - "comment2": "" + "comment": "Initiate the onScenePostEvents function" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29370,8 +30392,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep object shaking forever (if desired)", - "comment2": "" + "comment": "Keep object shaking forever (if desired)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29429,8 +30450,7 @@ "textG": 0, "textR": 0 }, - "comment": "Run once before every shake movement", - "comment2": "" + "comment": "Run once before every shake movement" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29507,8 +30527,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29605,8 +30624,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29660,8 +30678,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Position Shake", - "comment2": "" + "comment": "Calculate Position Shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29709,8 +30726,7 @@ "textG": 0, "textR": 0 }, - "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]", - "comment2": "" + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" }, { "type": "BuiltinCommonInstructions::Comment", @@ -29722,8 +30738,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect", - "comment2": "" + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29812,8 +30827,7 @@ "textG": 0, "textR": 0 }, - "comment": "After initial shake pick a random direction", - "comment2": "" + "comment": "After initial shake pick a random direction" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29904,8 +30918,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Rotation (angle) shake ", - "comment2": "" + "comment": "Calculate Rotation (angle) shake " }, { "type": "BuiltinCommonInstructions::Standard", @@ -29934,8 +30947,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"even\" shake, rotate clockwise", - "comment2": "" + "comment": "Every \"even\" shake, rotate clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -29947,8 +30959,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29988,8 +30999,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, rotate counter-clockwise", - "comment2": "" + "comment": "Every \"odd\" shake, rotate counter-clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -30001,8 +31011,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30044,8 +31053,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save that initial shake has been processed", - "comment2": "" + "comment": "Save that initial shake has been processed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30088,8 +31096,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate the fraction of shake that occured during this frame", - "comment2": "" + "comment": "Calculate the fraction of shake that occured during this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30118,8 +31125,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase change for the first half of the shake (move away from original values)", - "comment2": "" + "comment": "Increase change for the first half of the shake (move away from original values)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30148,8 +31154,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30218,8 +31223,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30261,8 +31265,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30301,8 +31304,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30335,8 +31337,7 @@ "textG": 0, "textR": 0 }, - "comment": "Decrease change the second half of the shake (return to original position)", - "comment2": "" + "comment": "Decrease change the second half of the shake (return to original position)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30364,8 +31365,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30434,8 +31434,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30477,8 +31476,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30517,8 +31515,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30568,8 +31565,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)", - "comment2": "" + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30654,8 +31650,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30752,8 +31747,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30835,7 +31829,11 @@ "type": { "value": "ShakeObject::ShakeObject_PositionAngle::IsShaking" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -30895,7 +31893,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -30951,8 +31951,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start/Reset duration timer", - "comment2": "" + "comment": "Start/Reset duration timer" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30979,8 +31978,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass input parameters to global variables so that onScenePostEvents can use them", - "comment2": "" + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31064,8 +32062,7 @@ "textG": 0, "textR": 0 }, - "comment": "Determine if the shake should keep going until stopped", - "comment2": "" + "comment": "Determine if the shake should keep going until stopped" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31090,7 +32087,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"ShakeForever\""] + "parameters": [ + "\"ShakeForever\"" + ] } ], "actions": [ @@ -31116,8 +32115,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add default values if none were provided", - "comment2": "" + "comment": "Add default values if none were provided" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31187,8 +32185,7 @@ "textG": 0, "textR": 0 }, - "comment": "If duration is less than a single shake, increase duration to make 1 full shake", - "comment2": "" + "comment": "If duration is less than a single shake, increase duration to make 1 full shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31229,8 +32226,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect initial shake", - "comment2": "" + "comment": "Detect initial shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31271,8 +32267,7 @@ "textG": 0, "textR": 0 }, - "comment": "Initiate the onScenePostEvents function", - "comment2": "" + "comment": "Initiate the onScenePostEvents function" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31398,8 +32393,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep object shaking forever (if desired)", - "comment2": "" + "comment": "Keep object shaking forever (if desired)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31457,8 +32451,7 @@ "textG": 0, "textR": 0 }, - "comment": "Run once before every shake movement", - "comment2": "" + "comment": "Run once before every shake movement" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31536,8 +32529,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31662,8 +32654,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31728,8 +32719,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Position Shake", - "comment2": "" + "comment": "Calculate Position Shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31777,8 +32767,7 @@ "textG": 0, "textR": 0 }, - "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]", - "comment2": "" + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" }, { "type": "BuiltinCommonInstructions::Comment", @@ -31790,8 +32779,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect", - "comment2": "" + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31880,8 +32868,7 @@ "textG": 0, "textR": 0 }, - "comment": "After initial shake pick a random direction", - "comment2": "" + "comment": "After initial shake pick a random direction" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31972,8 +32959,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Rotation (angle) shake ", - "comment2": "" + "comment": "Calculate Rotation (angle) shake " }, { "type": "BuiltinCommonInstructions::Standard", @@ -32002,8 +32988,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"even\" shake, rotate clockwise", - "comment2": "" + "comment": "Every \"even\" shake, rotate clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -32015,8 +33000,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32056,8 +33040,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, rotate counter-clockwise", - "comment2": "" + "comment": "Every \"odd\" shake, rotate counter-clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -32069,8 +33052,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32112,8 +33094,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Scale shake", - "comment2": "" + "comment": "Calculate Scale shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32142,8 +33123,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate object scale displacement, with linear decay over time", - "comment2": "" + "comment": "Calculate object scale displacement, with linear decay over time" }, { "type": "BuiltinCommonInstructions::Comment", @@ -32155,8 +33135,7 @@ "textG": 0, "textR": 0 }, - "comment": "ScaleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100", - "comment2": "" + "comment": "ScaleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100" }, { "type": "BuiltinCommonInstructions::Comment", @@ -32168,8 +33147,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every even shake, increase scale", - "comment2": "" + "comment": "Every even shake, increase scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32209,8 +33187,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, decrease scale", - "comment2": "" + "comment": "Every \"odd\" shake, decrease scale" }, { "type": "BuiltinCommonInstructions::Comment", @@ -32222,8 +33199,7 @@ "textG": 0, "textR": 0 }, - "comment": "ScaleDisplacement = -1 * (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100", - "comment2": "" + "comment": "ScaleDisplacement = -1 * (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32265,8 +33241,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save that initial shake has been processed", - "comment2": "" + "comment": "Save that initial shake has been processed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32309,8 +33284,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate the fraction of shake that occured during this frame", - "comment2": "" + "comment": "Calculate the fraction of shake that occured during this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32339,8 +33313,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase change for the first half of the shake (move away from original values)", - "comment2": "" + "comment": "Increase change for the first half of the shake (move away from original values)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32369,8 +33342,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32439,8 +33411,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32482,8 +33453,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32522,8 +33492,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32554,8 +33523,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change scale", - "comment2": "" + "comment": "Change scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32594,8 +33562,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32628,8 +33595,7 @@ "textG": 0, "textR": 0 }, - "comment": "Decrease change the second half of the shake (return to original position)", - "comment2": "" + "comment": "Decrease change the second half of the shake (return to original position)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32657,8 +33623,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32727,8 +33692,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32770,8 +33734,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32810,8 +33773,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32842,8 +33804,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change scale", - "comment2": "" + "comment": "Change scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32882,8 +33843,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32912,347 +33872,3146 @@ ] } ], - "parameters": [] + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop shaking", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"", + "Object.Variable(__ShakeObject_Duration)" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeCounter", + "=", + "0" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Correct for drift and reset drift tracking variables", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move to correct any drift from previous shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledY)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_AngleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerScale", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_ScaleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset drift detection variables" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ScaleTravelled", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop shaking an object.", + "fullName": "Stop shaking an object", + "functionType": "Action", + "name": "StopShaking", + "sentence": "Stop shaking _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::IsShaking" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is shaking.", + "fullName": "Check if an object is shaking", + "functionType": "Condition", + "name": "IsShaking", + "sentence": "_PARAM0_ is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "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.9.0", + "description": [ + "Multitouch joysticks are objects showing a joystick on the screen, useful for mobile. They work like a physical gamepad:", + "- 4 or 8 directions", + "- Analogus pads", + "- Player selection", + "- Automatic \"mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the virtual joystick (it works by reading the multitouch joystick state and simulating controls). No need for additional events to make it work once the behaviors are set up.", + "", + "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": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "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, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reduce the speed to match the stick force." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "TargetedSpeed" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "min(TargetedSpeed, CurrentSpeed + Acceleration * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "TargetedSpeed" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "-", + "Acceleration * TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Turn back at least as fast as it would stop." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "max(TargetedSpeed, CurrentSpeed - max(Acceleration , Deceleration) * TimeDelta())" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TargetedSpeed", + ">", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reduce the speed to match the stick force." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "TargetedSpeed" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "max(TargetedSpeed, CurrentSpeed - Acceleration * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "TargetedSpeed" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "+", + "Acceleration * TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Turn back at least as fast as it would stop." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "min(TargetedSpeed, CurrentSpeed + max(Acceleration , Deceleration) * TimeDelta())" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TargetedSpeed", + "=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "min(0, CurrentSpeed + Acceleration * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "max(0, CurrentSpeed - Acceleration * TimeDelta())" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "clamp(AcceleratedSpeed, -SpeedMax, SpeedMax)" + ] + } + ] + } + ], + "variables": [ + { + "name": "AcceleratedSpeed", + "type": "number", + "value": 0 + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Current speed", + "name": "CurrentSpeed", + "type": "expression" + }, + { + "description": "Targeted speed", + "name": "TargetedSpeed", + "type": "expression" + }, + { + "description": "Max speed", + "name": "SpeedMax", + "type": "expression" + }, + { + "description": "Acceleration", + "name": "Acceleration", + "type": "expression" + }, + { + "description": "Deceleration", + "name": "Deceleration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button was just pressed on a multitouch controller.", + "fullName": "Multitouch controller button just pressed", + "functionType": "Condition", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ was just pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"JustPressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is pressed on a multitouch controller.", + "fullName": "Multitouch controller button pressed", + "functionType": "Condition", + "name": "IsButtonPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"JustPressed\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is released on a multitouch controller.", + "fullName": "Multitouch controller button released", + "functionType": "Condition", + "name": "IsButtonReleased", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"Released\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change a button state for a multitouch controller.", + "fullName": "Button state", + "functionType": "Action", + "name": "SetButtonState", + "private": true, + "sentence": "Mark _PARAM2_ button as _PARAM3_ for multitouch controller _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "ButtonState" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "type": "string" + }, + { + "description": "Button state", + "name": "ButtonState", + "supplementaryInformation": "[\"Idle\",\"Pressed\",\"JustPressed\",\"Released\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the dead zone radius of a joystick. 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).", + "fullName": "Dead zone radius", + "functionType": "Action", + "name": "SetDeadZone", + "private": true, + "sentence": "Change the dead zone of multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].DeadZone", + "=", + "DeadZoneRadius" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Dead zone radius", + "name": "DeadZoneRadius", + "supplementaryInformation": "[]", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the dead zone radius of a joystick. 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).", + "fullName": "Dead zone radius", + "functionType": "Expression", + "name": "DeadZone", + "private": true, + "sentence": "Change multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ dead zone to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].DeadZone" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the direction index (left = 1, bottom = 1, right = 2, top = 3) for an angle (in degrees).", + "fullName": "Angle to 4-way index", + "functionType": "ExpressionAndCondition", + "name": "AngleTo4Way", + "private": true, + "sentence": "The angle _PARAM1_ 4-way index", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(round(Angle * 4 / 360), 4)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the direction index (left = 1, bottom-left = 1... top-left = 7) for an angle (in degrees).", + "fullName": "Angle to 8-way index", + "functionType": "ExpressionAndCondition", + "name": "AngleTo8Way", + "private": true, + "sentence": "The angle _PARAM1_ 8-way index", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(round(Angle * 8 / 360), 8)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if angle is in a given direction.", + "fullName": "Angle 4-way direction", + "functionType": "Condition", + "name": "IsAngleIn4WayDirection", + "private": true, + "sentence": "The angle _PARAM1_ is the 4-way direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "0", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Down\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "1", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "2", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Up\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "3", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if angle is in a given direction.", + "fullName": "Angle 8-way direction", + "functionType": "Condition", + "name": "IsAngleIn8WayDirection", + "private": true, + "sentence": "The angle _PARAM1_ is the 8-way direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "0", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"DownRight\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "1", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Down\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "2", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"DownLeft\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "3", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "4", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"UpLeft\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "5", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Up\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "6", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"UpRight\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "7", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the joystick has moved from center" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::JoystickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + }, + "parameters": [ + "", + "SpriteMultitouchJoystick::JoystickAngle(ControllerIdentifier, JoystickIdentifier)", + "Direction", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the joystick has moved from center" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::JoystickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" + }, + "parameters": [ + "", + "SpriteMultitouchJoystick::JoystickAngle(ControllerIdentifier, JoystickIdentifier)", + "Direction", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", + "fullName": "Joystick force (deprecated)", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "private": true, + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "", + "name": "Coucou", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the force of multitouch contoller stick (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "multitouch controller _PARAM1_ _PARAM2_ stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0, Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Force - SpriteMultitouchJoystick::DeadZone(ControllerIdentifier, JoystickIdentifier)) / (1 - SpriteMultitouchJoystick::DeadZone(ControllerIdentifier, JoystickIdentifier))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Stick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", + "fullName": "Joystick force", + "functionType": "Action", + "name": "SetJoystickForce", + "private": true, + "sentence": "Change the force of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Force", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle (deprecated)", + "functionType": "Expression", + "name": "JoystickAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the multitouch controller stick is pointing towards (Range: -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Angle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Action", + "name": "SetJoystickAngle", + "private": true, + "sentence": "Change the angle of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Angle", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the multitouch contoller stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "XFromAngleAndDistance(SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier), SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the multitouch contoller stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "YFromAngleAndDistance(SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier), SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a new touch has started on the right or left side of the screen.", + "fullName": "New touch on a screen side", + "functionType": "Condition", + "group": "Multitouch Joystick", + "name": "HasTouchStartedOnScreenSide", + "sentence": "A new touch has started on the _PARAM2_ side of the screen on _PARAM1_'s layer", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Side", + "=", + "\"Left\"" + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Stop shaking", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": { + "value": "TouchX" + }, + "parameters": [ + "", + "StartedTouchOrMouseId(0)", + "<", + "CameraCenterX(Object.Layer())", + "Object.Layer()", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Side", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "TouchX" + }, + "parameters": [ + "", + "StartedTouchOrMouseId(0)", + ">=", + "CameraCenterX(Object.Layer())", + "Object.Layer()", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch joystick", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "objectList" + }, + { + "description": "Screen side", + "name": "Side", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Joystick that can be controlled by interacting with a touchscreen.", + "fullName": "Multitouch Joystick", + "name": "MultitouchJoystick", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetDeadZone" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "DeadZoneRadius", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "HasGameJustResumed" }, - "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)", - "comment2": "" - }, + "parameters": [ + "" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "ObjectTimer" - }, - "parameters": [ - "Object", - "\"__ShakeObject_DurationTimer\"", - "Object.Variable(__ShakeObject_Duration)" - ] - }, - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_ShakeInProgress", - "=", - "-1" - ] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_ShakeInProgress", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_ShakeCounter", - "=", - "0" - ] - } - ], - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Correct for drift and reset drift tracking variables", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreX" - }, - "parameters": [ - "Object", - "-", - "Object.Variable(__ShakeObject_DisplacementTravelledX)" - ] - }, - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Object", - "-", - "Object.Variable(__ShakeObject_DisplacementTravelledY)" - ] - } - ] - }, + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Manage touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarObjet" + "value": "NumberVariable" }, "parameters": [ - "Object", - "__ShakeObject_PowerAngle", - "!=", + "TouchId", + "=", "0" ] - } - ], - "actions": [ - { - "type": { - "value": "SetAngle" - }, - "parameters": [ - "Object", - "-", - "Object.Variable(__ShakeObject_AngleTravelled)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "VarObjet" + "value": "CollisionPoint" }, "parameters": [ "Object", - "__ShakeObject_PowerScale", - "!=", - "0" + "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ChangeScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "-", - "Object.Variable(__ShakeObject_ScaleTravelled)" + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" ] } ] }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset drift detection variables", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_DisplacementTravelledX", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_DisplacementTravelledY", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_AngleTravelled", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarObjet" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "__ShakeObject_ScaleTravelled", - "=", - "0" + "TouchIndex", + "+", + "1" ] } ] } - ], - "parameters": [] + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update joystick position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "Object", + "Behavior", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", + "" + ] } ] } ], "parameters": [] } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick force (from 0 to 1).", + "fullName": "Joystick force", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "sentence": "the joystick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0, JoystickForce - DeadZoneRadius) / (1 - DeadZoneRadius)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickForce", + "name": "SetJoystickForce", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "JoystickForce", + "=", + "Value" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "JoystickForce", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "", + "name": "Parameter", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Expression", + "name": "JoystickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "JoystickAngle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Action", + "name": "SetJoystickAngle", + "private": true, + "sentence": "Change the joystick angle of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "JoystickAngle", + "=", + "Value" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "JoystickAngle", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Angle", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::JoystickForce() * cos(ToRad(Object.Behavior::JoystickAngle()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::JoystickForce() * sin(ToRad(Object.Behavior::JoystickAngle()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::JoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + }, + "parameters": [ + "", + "JoystickAngle", + "Direction", + "" + ] + } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" } ], "objectGroups": [] }, { - "description": "Stop shaking an object.", - "fullName": "Stop shaking an object", - "functionType": "Action", - "name": "StopShaking", - "sentence": "Stop shaking _PARAM0_", + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ShakeObject::ShakeObject_PositionAngleScale::IsShaking" + "value": "SpriteMultitouchJoystick::MultitouchJoystick::JoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "", + "JoystickAngle", + "Direction", + "" + ] } ], "actions": [ { "type": { - "value": "ModVarObjet" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "__ShakeObject_ShakeInProgress", - "=", - "-1" + "True" ] } ] @@ -33262,37 +37021,41 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" } ], "objectGroups": [] }, { - "description": "Check if an object is shaking.", - "fullName": "Check if an object is shaking", + "description": "Check if a joystick is pressed.", + "fullName": "Joystick pressed", "functionType": "Condition", - "name": "IsShaking", - "sentence": "_PARAM0_ is shaking", + "name": "IsPressed", + "sentence": "Joystick _PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarObjet" + "value": "NumberVariable" }, "parameters": [ - "Object", - "__ShakeObject_ShakeInProgress", - "=", - "1" + "TouchId", + "!=", + "0" ] } ], @@ -33301,7 +37064,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -33310,1223 +37075,1118 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "Input", - "extensionNamespace": "", - "fullName": "Multitouch joystick and buttons (sprite)", - "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.1.2", - "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" - ], - "authorIds": [ - "gqDaZjCfevOOxBYkK6zlhtZnXCg1", - "1OgYzWp5UeVPbiWGJwI6vqfgZLC3", - "v0YRpdAnIucZFgiRCCecqVnGKno2", - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "eventsFunctions": [ - { - "description": "Check if a button is pressed on a gamepad.", - "fullName": "Multitouch controller button pressed", - "functionType": "Condition", - "name": "IsButtonPressed", - "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", - "=", - "\"Pressed\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" }, { - "description": "Button name", - "name": "Button", - "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Check if a button is released on a gamepad.", - "fullName": "Multitouch controller button released", - "functionType": "Condition", - "name": "IsButtonReleased", - "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is released", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "description": "Reset the joystick values (except for angle, which stays the same)", + "fullName": "Reset", + "functionType": "Action", + "name": "Reset", + "private": true, + "sentence": "Reset the joystick of _PARAM0_", + "events": [ { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", - "=", - "\"Released\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Button name", - "name": "Button", - "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Change a button state for a multitouch controller.", - "fullName": "Button state", - "functionType": "Action", - "name": "SetButtonState", - "private": true, - "sentence": "Mark _PARAM2_ button as _PARAM3_ for multitouch controller _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "parameters": [ { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", - "=", - "GetArgumentAsString(\"ButtonState\")" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Button name", - "name": "Button", - "type": "string" - }, - { - "description": "Button state", - "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Change the dead zone radius of a joystick. 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).", - "fullName": "Dead zone radius", - "functionType": "Action", - "name": "SetDeadZone", - "private": true, - "sentence": "Change the dead zone of multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "description": "Object", + "name": "Object", + "type": "object" + }, { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].DeadZone", - "=", - "GetArgumentAsNumber(\"DeadZoneRadius\")" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Joystick name", - "name": "JoystickIdentifier", - "type": "string" + ], + "objectGroups": [] }, { - "description": "Dead zone radius", - "name": "DeadZoneRadius", - "supplementaryInformation": "[]", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Return the dead zone radius of a joystick. 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).", - "fullName": "Dead zone radius", - "functionType": "Expression", - "name": "DeadZone", - "private": true, - "sentence": "Change multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ dead zone to _PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].DeadZone)" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "description": "the multitouch controller identifier.", + "fullName": "Multitouch controller identifier", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Joystick name", - "name": "JoystickIdentifier", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "the direction index (left = 1, bottom = 1, right = 2, top = 3) for an angle (in degrees).", - "fullName": "Angle to 4-way index", - "functionType": "ExpressionAndCondition", - "name": "AngleTo4Way", - "private": true, - "sentence": "The angle _PARAM1_ 4-way index", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "mod(round(GetArgumentAsNumber(\"Angle\") * 4 / 360), 4)" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Angle", - "name": "Angle", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "the direction index (left = 1, bottom-left = 1... top-left = 7) for an angle (in degrees).", - "fullName": "Angle to 8-way index", - "functionType": "ExpressionAndCondition", - "name": "AngleTo8Way", - "private": true, - "sentence": "The angle _PARAM1_ 8-way index", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "sentence": "the multitouch controller identifier", + "events": [ { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "mod(round(GetArgumentAsNumber(\"Angle\") * 8 / 360), 8)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ControllerIdentifier" + ] + } ] } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Angle", - "name": "Angle", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Check if angle is in a given direction.", - "fullName": "Angle 4-way direction", - "functionType": "Condition", - "name": "IsAngleIn4WayDirection", - "private": true, - "sentence": "The angle _PARAM1_ is the 4-way direction _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Right\"" - ] + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo4Way" - }, - "parameters": [ - "", - "=", - "0", - "GetArgumentAsNumber(\"Angle\")", - "" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Down\"" - ] - }, + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ControllerIdentifier", + "name": "SetControllerIdentifier", + "sentence": "", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo4Way" - }, - "parameters": [ - "", - "=", - "1", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ControllerIdentifier", + "=", + "Value" + ] + } ] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Left\"" - ] - }, + "description": "the joystick name.", + "fullName": "Joystick name", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "JoystickIdentifier", + "sentence": "the joystick name", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo4Way" - }, - "parameters": [ - "", - "=", - "2", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "JoystickIdentifier" + ] + } ] } ], - "actions": [ + "expressionType": { + "type": "string" + }, + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Up\"" - ] - }, + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickIdentifier", + "name": "SetJoystickIdentifier", + "sentence": "", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo4Way" - }, - "parameters": [ - "", - "=", - "3", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "JoystickIdentifier", + "=", + "Value" + ] + } ] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] - } - ], - "parameters": [ - { - "description": "Angle", - "name": "Angle", - "type": "expression" + ], + "objectGroups": [] }, { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Check if angle is in a given direction.", - "fullName": "Angle 8-way direction", - "functionType": "Condition", - "name": "IsAngleIn8WayDirection", - "private": true, - "sentence": "The angle _PARAM1_ is the 8-way direction _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Right\"" - ] - }, + "description": "the dead zone radius (range: 0 to 1) of the joystick. 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).", + "fullName": "Dead zone radius", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "DeadZoneRadius", + "sentence": "the dead zone radius", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "0", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "DeadZoneRadius" + ] + } ] } ], - "actions": [ + "expressionType": { + "type": "expression" + }, + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"DownRight\"" - ] - }, + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DeadZoneRadius", + "name": "SetDeadZoneRadius", + "sentence": "", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "1", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DeadZoneRadius", + "=", + "Value" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetDeadZone" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "Value", + "" + ] + } ] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Down\"" - ] - }, + "description": "Force the joystick into the pressing state.", + "fullName": "Force start pressing", + "functionType": "Action", + "name": "ForceStartPressing", + "sentence": "Force start pressing _PARAM0_ with touch identifier: _PARAM2_", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "2", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "Value" + ] + } ] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Touch identifier", + "name": "Value", + "type": "expression" } - ] + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "value": "Primary", + "type": "String", + "label": "Joystick name", + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "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)", + "name": "DeadZoneRadius" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick angle (range: -180 to 180)", + "hidden": true, + "name": "JoystickAngle" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick force (range: 0 to 1)", + "hidden": true, + "name": "JoystickForce" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "TouchIndex" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", + "fullName": "Multitouch button", + "name": "MultitouchButton", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"DownLeft\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsReleased", + "False", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Idle\"", + "" + ] + } ] }, { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "3", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Pressed\"", + "" + ] + } ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Left\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer())", + "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer())" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Radius", + ">", + "DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer()), TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer()))" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"JustPressed\"", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "+", + "1" + ] + } + ] + } + ] + } ] }, { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "4", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Released\"", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"UpLeft\"" - ] + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "5", - "GetArgumentAsNumber(\"Angle\")", - "" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Up\"" - ] - }, + "description": "Check if the button was just pressed.", + "fullName": "Button just pressed", + "functionType": "Condition", + "name": "IsJustPressed", + "sentence": "Button _PARAM0_ was just pressed", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "6", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"UpRight\"" - ] + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "7", - "GetArgumentAsNumber(\"Angle\")", - "" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Angle", - "name": "Angle", - "type": "expression" - }, - { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Check if joystick is pushed in a given direction.", - "fullName": "Joystick pushed in a direction (4-way)", - "functionType": "Condition", - "name": "IsDirectionPushed4Way", - "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the joystick has moved from center", - "comment2": "" + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::JoystickForce" - }, - "parameters": [ - "", - ">", - "SpriteMultitouchJoystick::DeadZone(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", - "GetArgumentAsNumber(\"ControllerIdentifier\")", - "GetArgumentAsString(\"JoystickIdentifier\")", - "" - ] - }, + "description": "Check if the button is pressed.", + "fullName": "Button pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Button _PARAM0_ is pressed", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" - }, - "parameters": [ - "", - "SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", - "GetArgumentAsString(\"Direction\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Joystick name", - "name": "JoystickIdentifier", - "supplementaryInformation": "[\"Primary\",\"Secondary\"]", - "type": "stringWithSelector" - }, - { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Check if joystick is pushed in a given direction.", - "fullName": "Joystick pushed in a direction (8-way)", - "functionType": "Condition", - "name": "IsDirectionPushed8Way", - "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the joystick has moved from center", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [ { - "type": { - "value": "SpriteMultitouchJoystick::JoystickForce" - }, - "parameters": [ - "", - ">", - "SpriteMultitouchJoystick::DeadZone(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", - "GetArgumentAsNumber(\"ControllerIdentifier\")", - "GetArgumentAsString(\"JoystickIdentifier\")", - "" - ] + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" - }, - "parameters": [ - "", - "SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", - "GetArgumentAsString(\"Direction\")", - "" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Joystick name", - "name": "JoystickIdentifier", - "supplementaryInformation": "[\"Primary\",\"Secondary\"]", - "type": "stringWithSelector" - }, - { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", - "fullName": "Joystick force", - "functionType": "ExpressionAndCondition", - "name": "JoystickForce", - "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ force", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force)" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" + "objectGroups": [] }, { - "description": "Joystick name", - "name": "JoystickIdentifier", - "supplementaryInformation": "[\"Primary\",\"Secondary\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Change the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", - "fullName": "Joystick force", - "functionType": "Action", - "name": "SetJoystickForce", - "private": true, - "sentence": "Change the force of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "description": "Check if the button is released.", + "fullName": "Button released", + "functionType": "Condition", + "name": "IsReleased", + "sentence": "Button _PARAM0_ is released", + "events": [ { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force", - "=", - "GetArgumentAsNumber(\"Value\")" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } ] } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Joystick name", - "name": "JoystickIdentifier", - "type": "string" + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] }, { - "description": "Value", - "name": "Value", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", - "functionType": "Expression", - "name": "JoystickAngle", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "fullName": "Button state", + "functionType": "Action", + "name": "SetButtonState", + "private": true, + "sentence": "Mark the button _PARAM0_ as _PARAM2_", + "events": [ { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Angle)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetButtonState" + }, + "parameters": [ + "", + "ControllerIdentifier", + "ButtonIdentifier", + "ButtonState", + "" + ] + } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + }, + { + "description": "Button state", + "name": "ButtonState", + "supplementaryInformation": "[\"Idle\",\"JustPressed\",\"Pressed\",\"Released\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] } ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + "propertyDescriptors": [ { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" }, { - "description": "Joystick name", - "name": "JoystickIdentifier", - "supplementaryInformation": "[\"Primary\",\"Secondary\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", - "functionType": "Action", - "name": "SetJoystickAngle", - "private": true, - "sentence": "Change the angle of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", - "events": [ + "value": "A", + "type": "String", + "label": "Button identifier", + "name": "ButtonIdentifier" + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Angle", - "=", - "GetArgumentAsNumber(\"Value\")" - ] - } - ] - } - ], - "parameters": [ + "value": "0", + "type": "Number", + "label": "TouchID", + "hidden": true, + "name": "TouchId" + }, { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "TouchIndex" }, { - "description": "Joystick name", - "name": "JoystickIdentifier", - "type": "string" + "value": "", + "type": "Boolean", + "label": "Button released", + "hidden": true, + "name": "IsReleased" }, { - "description": "Value", - "name": "Value", - "type": "expression" + "value": "", + "type": "Boolean", + "label": "Button just pressed", + "hidden": true, + "name": "IsJustPressed" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Triggering circle radius", + "description": "This circle adds up to the object collision mask.", + "name": "Radius" } ], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [ + "sharedPropertyDescriptors": [] + }, { - "description": "Joystick that can be controlled by interacting with a touchscreen.", - "fullName": "Multitouch Joystick", - "name": "MultitouchJoystick", + "description": "Control a platformer character with a multitouch controller.", + "fullName": "Platformer multitouch controller mapper", + "name": "PlatformerMultitouchMapper", "objectType": "", - "private": true, + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "onCreated", + "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Left\"", + "" + ] + } + ], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::SetDeadZone" + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "Object.Behavior::PropertyDeadZoneRadius()", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Right\"", "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + "value": "PlatformBehavior::SimulateRightKey" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Property" + ] } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "type": "object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "Property" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "onDeActivate", - "sentence": "", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + "value": "PlatformBehavior::SimulateJumpKey" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Property" + ] } ] } @@ -34540,12 +38200,64 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::PlatformerMultitouchMapper", "type": "behavior" } ], "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platform character behavior", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "choices": [], + "name": "Property" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D platformer multitouch controller mapper", + "name": "Platformer3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ { "fullName": "", "functionType": "Action", @@ -34557,195 +38269,69 @@ "conditions": [ { "type": { - "value": "HasGameJustResumed" + "value": "SpriteMultitouchJoystick::StickForce" }, - "parameters": [""] + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] } ], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "PhysicsCharacter3D", + "=", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" + ] }, { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" }, - "parameters": ["\"Resumed!!!\"", "", ""] + "parameters": [ + "Object", + "PhysicsCharacter3D", + "-90", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] } ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Manage touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex())" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" - }, - "parameters": ["Object", "Behavior", "+", "1"] - } - ] - } - ] - } - ] - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" }, - "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" - }, - "parameters": ["Object", "Behavior", ""] - } + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" ] } ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update joystick position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0))", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0))" - ] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)) / Object.Width(), 0, 1)", - "" - ] - } + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -34757,83 +38343,124 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", "type": "behavior" } ], "objectGroups": [] - }, + } + ], + "propertyDescriptors": [ { - "description": "the joystick force (range: 0 to 1).", - "fullName": "Joystick force", - "functionType": "ExpressionAndCondition", - "name": "JoystickForce", - "sentence": "the joystick force", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.Behavior::PropertyJoystickForce()"] - } - ] - } + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ { - "description": "Object", - "name": "Object", - "type": "object" + "label": "Primary", + "value": "Primary" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", - "type": "behavior" + "label": "Secondary", + "value": "Secondary" } ], - "objectGroups": [] + "name": "JoystickIdentifier" }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D shooter multitouch controller mapper", + "name": "Shooter3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ { "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "JoystickForce", - "name": "SetJoystickForce", - "private": true, + "functionType": "Action", + "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" }, "parameters": [ "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + "PhysicsCharacter3D", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::SetJoystickForce" + "value": "SpriteMultitouchJoystick::IsButtonPressed" }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "Object.Behavior::PropertyJoystickForce()", - "" + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" ] } ] @@ -34848,35 +38475,151 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::Shooter3DMultitouchMapper", "type": "behavior" } ], "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" }, { - "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", - "functionType": "Expression", - "name": "JoystickAngle", + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control camera rotations with a multitouch controller.", + "fullName": "First person camera multitouch controller mapper", + "name": "FirstPersonMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "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": "TODO It's probably a bad idea to rotate the object around Y." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentRotationSpeedZ", + "=", + "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedZ, SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "+", + "CurrentRotationSpeedZ * TimeDelta()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentRotationSpeedY", + "=", + "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedY, SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Object", + "Object3D", + "+", + "CurrentRotationSpeedY * TimeDelta()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Object", + "Object3D", + "=", + "clamp(Object.Object3D::RotationY(), VerticalAngleMin, VerticalAngleMax)" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::LookFromObjectEyes" }, - "parameters": ["Object.Behavior::PropertyJoystickAngle()"] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -34886,19 +38629,20 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", + "description": "Move the camera to look though _PARAM1_ eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", + "fullName": "Look through object eyes", "functionType": "Action", - "name": "SetJoystickAngle", + "group": "Layers and cameras", + "name": "LookFromObjectEyes", "private": true, - "sentence": "Change the joystick angle of _PARAM0_ to _PARAM2_", + "sentence": "Move the camera to look though _PARAM0_ eyes", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -34906,24 +38650,61 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" + "value": "CentreCamera" }, "parameters": [ + "", "Object", - "Behavior", + "", + "Object.Layer()", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraZ" + }, + "parameters": [ + "", "=", - "GetArgumentAsNumber(\"Value\")" + "Object.Object3D::Z() + Object.Object3D::Depth() + OffsetZ", + "", + "" ] }, { "type": { - "value": "SpriteMultitouchJoystick::SetJoystickAngle" + "value": "Scene3D::SetCameraRotationX" + }, + "parameters": [ + "", + "=", + "- Object.Object3D::RotationY() + 90", + "GetArgumentAsString(\"Layer\")", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraRotationY" + }, + "parameters": [ + "", + "=", + "Object.Object3D::RotationX()", + "GetArgumentAsString(\"Layer\")", + "" + ] + }, + { + "type": { + "value": "SetCameraAngle" }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "Object.Behavior::PropertyJoystickAngle()", + "=", + "Object.Angle() + 90", + "Object.Layer()", "" ] } @@ -34939,60 +38720,38 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" - }, - { - "description": "Angle", - "name": "Value", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if joystick is pushed in a given direction.", - "fullName": "Joystick pushed in a direction (4-way movement)", - "functionType": "Condition", - "name": "IsDirectionPushed4Way", - "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "description": "the maximum horizontal rotation speed of the object.", + "fullName": "Maximum horizontal rotation speed", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "HorizontalRotationSpeedMax", + "sentence": "the maximum horizontal rotation speed", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "Object.Behavior::PropertyDeadZoneRadius()" - ] - }, + "conditions": [], + "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + "value": "SetReturnNumber" }, "parameters": [ - "", - "Object.Behavior::JoystickAngle()", - "GetArgumentAsString(\"Direction\")", - "" + "HorizontalRotationSpeedMax" ] } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -35002,58 +38761,33 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" - }, - { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", - "type": "stringWithSelector" } ], "objectGroups": [] }, { - "description": "Check if joystick is pushed in a given direction.", - "fullName": "Joystick pushed in a direction (8-way movement)", - "functionType": "Condition", - "name": "IsDirectionPushed8Way", - "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HorizontalRotationSpeedMax", + "name": "SetHorizontalRotationSpeedMax", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "Object.Behavior::PropertyDeadZoneRadius()" - ] - }, + "conditions": [], + "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" + "value": "SetNumberVariable" }, "parameters": [ - "", - "Object.Behavior::JoystickAngle()", - "GetArgumentAsString(\"Direction\")", - "" + "HorizontalRotationSpeedMax", + "=", + "Value" ] } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } ] } ], @@ -35066,45 +38800,38 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" - }, - { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", - "type": "stringWithSelector" } ], "objectGroups": [] }, { - "description": "Check if a joystick is pressed.", - "fullName": "Joystick pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "Joystick _PARAM0_ is pressed", + "description": "the horizontal rotation acceleration of the object.", + "fullName": "Horizontal rotation acceleration", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "HorizontalRotationAcceleration", + "sentence": "the horizontal rotation acceleration", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, - "parameters": ["True"] + "parameters": [ + "HorizontalRotationAcceleration" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -35114,19 +38841,18 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Reset the joystick values (except for angle, which stays the same)", - "fullName": "Reset", - "functionType": "Action", - "name": "Reset", - "private": true, - "sentence": "Reset the joystick of _PARAM0_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HorizontalRotationAcceleration", + "name": "SetHorizontalRotationAcceleration", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -35134,15 +38860,13 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" - }, - "parameters": ["Object", "Behavior", "=", "0", ""] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "HorizontalRotationAcceleration", + "=", + "Value" + ] } ] } @@ -35156,19 +38880,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the multitouch controller identifier.", - "fullName": "Multitouch controller identifier", + "description": "the horizontal rotation deceleration of the object.", + "fullName": "Horizontal rotation deceleration", "functionType": "ExpressionAndCondition", - "group": "Multitouch Joystick configuration", - "name": "ControllerIdentifier", - "sentence": "the multitouch controller identifier", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "HorizontalRotationDeceleration", + "sentence": "the horizontal rotation deceleration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -35179,7 +38903,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyControllerIdentifier()" + "HorizontalRotationDeceleration" ] } ] @@ -35197,7 +38921,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], @@ -35206,8 +38930,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "ControllerIdentifier", - "name": "SetControllerIdentifier", + "getterName": "HorizontalRotationDeceleration", + "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ { @@ -35216,13 +38940,12 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyControllerIdentifier" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationDeceleration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -35237,19 +38960,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the joystick name.", - "fullName": "Joystick name", + "description": "the maximum vertical rotation speed of the object.", + "fullName": "Maximum vertical rotation speed", "functionType": "ExpressionAndCondition", - "group": "Multitouch Joystick configuration", - "name": "JoystickIdentifier", - "sentence": "the joystick name", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalRotationSpeedMax", + "sentence": "the maximum vertical rotation speed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -35257,17 +38980,17 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyJoystickIdentifier()" + "VerticalRotationSpeedMax" ] } ] } ], "expressionType": { - "type": "string" + "type": "expression" }, "parameters": [ { @@ -35278,7 +39001,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], @@ -35287,8 +39010,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "JoystickIdentifier", - "name": "SetJoystickIdentifier", + "getterName": "VerticalRotationSpeedMax", + "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ { @@ -35297,13 +39020,12 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickIdentifier" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationSpeedMax", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -35318,19 +39040,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the dead zone radius (range: 0 to 1) of the joystick. 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).", - "fullName": "Dead zone radius", + "description": "the vertical rotation acceleration of the object.", + "fullName": "Vertical rotation acceleration", "functionType": "ExpressionAndCondition", - "group": "Multitouch Joystick configuration", - "name": "DeadZoneRadius", - "sentence": "the dead zone radius", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalRotationAcceleration", + "sentence": "the vertical rotation acceleration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -35341,7 +39063,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyDeadZoneRadius()" + "VerticalRotationAcceleration" ] } ] @@ -35359,7 +39081,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], @@ -35368,8 +39090,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "DeadZoneRadius", - "name": "SetDeadZoneRadius", + "getterName": "VerticalRotationAcceleration", + "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ { @@ -35378,13 +39100,12 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyDeadZoneRadius" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationAcceleration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -35399,245 +39120,153 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "1", - "type": "Number", - "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "String", - "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "JoystickIdentifier" - }, - { - "value": "0.4", - "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": [], - "hidden": false, - "name": "DeadZoneRadius" - }, - { - "value": "0", - "type": "Number", - "label": "Joystick angle (range: -180 to 180)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "JoystickAngle" - }, - { - "value": "0", - "type": "Number", - "label": "Joystick force (range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "JoystickForce" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" }, { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIndex" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Detect button presses made on a touchscreen.", - "fullName": "Multitouch button", - "name": "MultitouchButton", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", + "description": "the vertical rotation deceleration of the object.", + "fullName": "Vertical rotation deceleration", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalRotationDeceleration", + "sentence": "the vertical rotation deceleration", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::IsReleased" + "value": "SetReturnNumber" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "VerticalRotationDeceleration" + ] } - ], + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalRotationDeceleration", + "name": "SetVerticalRotationDeceleration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" - }, - "parameters": ["Object", "Behavior", "no"] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "\"Idle\"", ""] + "parameters": [ + "VerticalRotationDeceleration", + "=", + "Value" + ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the minimum vertical camera angle of the object.", + "fullName": "Minimum vertical camera angle", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalAngleMin", + "sentence": "the minimum vertical camera angle", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" - }, - "parameters": ["Object", "Behavior", ""] - }, - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + "value": "SetReturnNumber" }, - "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::PropertyTouchIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex())" - ] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" - }, - "parameters": [ - "Object", - "Behavior", - "\"Pressed\"", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" - }, - "parameters": ["Object", "Behavior", "+", "1"] - } - ] - } + "parameters": [ + "VerticalAngleMin" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalAngleMin", + "name": "SetVerticalAngleMin", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" - }, - "parameters": ["Object", "Behavior", ""] - }, - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": ["", "Object.Behavior::PropertyTouchId()"] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" - }, - "parameters": ["Object", "Behavior", "\"Released\"", ""] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" - }, - "parameters": ["Object", "Behavior", "yes"] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "VerticalAngleMin", + "=", + "Value" + ] } ] } @@ -35651,39 +39280,38 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if button is released.", - "fullName": "Button released", - "functionType": "Condition", - "name": "IsReleased", - "sentence": "Button _PARAM0_ is released", + "description": "the maximum vertical camera angle of the object.", + "fullName": "Maximum vertical camera angle", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalAngleMax", + "sentence": "the maximum vertical camera angle", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyIsReleased" - }, - "parameters": ["Object", "Behavior"] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, - "parameters": ["True"] + "parameters": [ + "VerticalAngleMax" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -35693,39 +39321,77 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if button is pressed.", - "fullName": "Button pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "Button _PARAM0_ is pressed", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalAngleMax", + "name": "SetVerticalAngleMax", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "VerticalAngleMax", + "=", + "Value" + ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the z position offset of the object.", + "fullName": "Z position offset", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper position configuration", + "name": "OffsetZ", + "sentence": "the z position offset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, - "parameters": ["True"] + "parameters": [ + "OffsetZ" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -35735,18 +39401,18 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "fullName": "Button state", - "functionType": "Action", - "name": "SetButtonState", - "private": true, - "sentence": "Mark the button _PARAM0_ as _PARAM2_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "OffsetZ", + "name": "SetOffsetZ", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -35754,14 +39420,12 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::SetButtonState" + "value": "SetNumberVariable" }, "parameters": [ - "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyButtonIdentifier()", - "GetArgumentAsString(\"ButtonState\")", - "" + "OffsetZ", + "=", + "Value" ] } ] @@ -35776,78 +39440,140 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" - }, - { - "description": "Button state", - "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", - "type": "stringWithSelector" } ], "objectGroups": [] } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D capability", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "choices": [], + "name": "Object3D" + }, { "value": "1", "type": "Number", - "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, + "label": "Controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier" }, { - "value": "A", - "type": "String", - "label": "Button identifier", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "ButtonIdentifier" + "value": "Secondary", + "type": "Choice", + "label": "Camera joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "CameraStick" + }, + { + "value": "180", + "type": "Number", + "unit": "AngularSpeed", + "label": "Maximum rotation speed", + "group": "Horizontal rotation", + "name": "HorizontalRotationSpeedMax" + }, + { + "value": "360", + "type": "Number", + "label": "Rotation acceleration", + "group": "Horizontal rotation", + "name": "HorizontalRotationAcceleration" + }, + { + "value": "720", + "type": "Number", + "label": "Rotation deceleration", + "group": "Horizontal rotation", + "name": "HorizontalRotationDeceleration" + }, + { + "value": "120", + "type": "Number", + "unit": "AngularSpeed", + "label": "Maximum rotation speed", + "group": "Vertical rotation", + "name": "VerticalRotationSpeedMax" + }, + { + "value": "240", + "type": "Number", + "label": "Rotation acceleration", + "group": "Vertical rotation", + "name": "VerticalRotationAcceleration" + }, + { + "value": "480", + "type": "Number", + "label": "Rotation deceleration", + "group": "Vertical rotation", + "name": "VerticalRotationDeceleration" + }, + { + "value": "-90", + "type": "Number", + "unit": "DegreeAngle", + "label": "Minimum angle", + "group": "Vertical rotation", + "name": "VerticalAngleMin" + }, + { + "value": "90", + "type": "Number", + "unit": "DegreeAngle", + "label": "Maximum angle", + "group": "Vertical rotation", + "name": "VerticalAngleMax" }, { "value": "0", "type": "Number", - "label": "TouchID", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" + "unit": "Pixel", + "label": "Z position offset", + "group": "Position", + "name": "OffsetZ" }, { - "value": "", + "value": "0", "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], + "unit": "AngularSpeed", + "label": "Current rotation speed Z", "hidden": true, - "name": "TouchIndex" + "name": "CurrentRotationSpeedZ" }, { - "value": "", - "type": "Boolean", - "label": "Button released", - "description": "", - "group": "", - "extraInformation": [], + "value": "0", + "type": "Number", + "unit": "AngularSpeed", + "label": "Current rotation speed Y", "hidden": true, - "name": "IsReleased" + "name": "CurrentRotationSpeedY" } ], "sharedPropertyDescriptors": [] }, { - "description": "Control a platformer character with a multitouch controller.", - "fullName": "Platformer multitouch controller mapper", - "name": "PlatformerMultitouchMapper", + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -35860,13 +39586,14 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "\"Left\"", + ">", + "0", + "ControllerIdentifier", + "SteerJoystickIdentifier", "" ] } @@ -35874,35 +39601,14 @@ "actions": [ { "type": { - "value": "PlatformBehavior::SimulateLeftKey" - }, - "parameters": ["Object", "Property"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + "value": "Physics3D::PhysicsCar3D::SimulateSteeringStick" }, "parameters": [ - "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "\"Right\"", - "" + "Object", + "PhysicsCar3D", + "SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, \"Primary\")" ] } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateRightKey" - }, - "parameters": ["Object", "Property"] - } ] }, { @@ -35910,13 +39616,14 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "\"Up\"", + ">", + "0", + "ControllerIdentifier", + "SpeedJoystickIdentifier", "" ] } @@ -35924,41 +39631,14 @@ "actions": [ { "type": { - "value": "PlatformBehavior::SimulateUpKey" - }, - "parameters": ["Object", "Property"] - }, - { - "type": { - "value": "PlatformBehavior::SimulateLadderKey" - }, - "parameters": ["Object", "Property"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + "value": "Physics3D::PhysicsCar3D::SimulateAcceleratorStick" }, "parameters": [ - "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "\"Down\"", - "" + "Object", + "PhysicsCar3D", + "-SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, \"Secondary\")" ] } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateDownKey" - }, - "parameters": ["Object", "Property"] - } ] }, { @@ -35970,8 +39650,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJumpButton()", + "ControllerIdentifier", + "HandBrakeButton", "\"Down\"" ] } @@ -35979,9 +39659,12 @@ "actions": [ { "type": { - "value": "PlatformBehavior::SimulateJumpKey" + "value": "Physics3D::PhysicsCar3D::SimulateHandBrakeKey" }, - "parameters": ["Object", "Property"] + "parameters": [ + "Object", + "PhysicsCar3D" + ] } ] } @@ -35995,7 +39678,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::PlatformerMultitouchMapper", + "supplementaryInformation": "SpriteMultitouchJoystick::PhysicsCar3DMultitouchMapper", "type": "behavior" } ], @@ -36006,44 +39689,59 @@ { "value": "", "type": "Behavior", - "label": "Platform character behavior", - "description": "", - "group": "", + "label": "3D physics car", "extraInformation": [ - "PlatformBehavior::PlatformerObjectBehavior" + "Physics3D::PhysicsCar3D" ], - "hidden": false, - "name": "Property" + "choices": [], + "name": "PhysicsCar3D" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", - "label": "Joystick name", - "description": "", + "label": "Steer joystick", "group": "Controls", - "extraInformation": ["Primary", "Secondary"], - "hidden": false, - "name": "JoystickIdentifier" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SteerJoystickIdentifier" }, { - "value": "A", + "value": "Secondary", + "type": "Choice", + "label": "Speed joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SpeedJoystickIdentifier" + }, + { + "value": "B", "type": "String", - "label": "Jump button name", - "description": "", + "label": "Hand brake button name", "group": "Controls", - "extraInformation": [], - "hidden": false, - "name": "JumpButton" + "name": "HandBrakeButton" } ], "sharedPropertyDescriptors": [] @@ -36053,6 +39751,7 @@ "fullName": "Top-down multitouch controller mapper", "name": "TopDownMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -36065,9 +39764,13 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Analog\""] + "parameters": [ + "StickMode", + "=", + "\"Analog\"" + ] } ], "actions": [ @@ -36078,8 +39781,8 @@ "parameters": [ "Object", "TopDownMovement", - "SpriteMultitouchJoystick::JoystickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", - "SpriteMultitouchJoystick::JoystickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())" + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" ] } ] @@ -36089,9 +39792,13 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"360°\""] + "parameters": [ + "StickMode", + "=", + "\"360°\"" + ] } ], "actions": [ @@ -36102,8 +39809,8 @@ "parameters": [ "Object", "TopDownMovement", - "SpriteMultitouchJoystick::JoystickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", - "sign(SpriteMultitouchJoystick::JoystickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier()))" + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "sign(SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier))" ] } ] @@ -36113,11 +39820,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"8 Directions\"" ] @@ -36133,7 +39839,10 @@ "inverted": true, "value": "TopDownMovementBehavior::DiagonalsAllowed" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ], "actions": [], @@ -36147,8 +39856,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Left\"", "" ] @@ -36159,7 +39868,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36172,8 +39884,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Right\"", "" ] @@ -36184,7 +39896,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36197,8 +39912,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Up\"", "" ] @@ -36209,7 +39924,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36222,8 +39940,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Down\"", "" ] @@ -36234,7 +39952,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] } @@ -36247,7 +39968,10 @@ "type": { "value": "TopDownMovementBehavior::DiagonalsAllowed" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ], "actions": [], @@ -36261,8 +39985,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Left\"", "" ] @@ -36273,7 +39997,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36286,8 +40013,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Right\"", "" ] @@ -36298,7 +40025,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36311,8 +40041,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Up\"", "" ] @@ -36323,7 +40053,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36336,8 +40069,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Down\"", "" ] @@ -36348,7 +40081,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36361,8 +40097,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"UpLeft\"", "" ] @@ -36373,13 +40109,19 @@ "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] }, { "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36392,8 +40134,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"UpRight\"", "" ] @@ -36404,13 +40146,19 @@ "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] }, { "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36423,8 +40171,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"DownLeft\"", "" ] @@ -36435,13 +40183,19 @@ "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] }, { "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36454,8 +40208,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"DownRight\"", "" ] @@ -36466,13 +40220,19 @@ "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] }, { "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] } @@ -36502,54 +40262,178 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], - "hidden": false, + "choices": [], "name": "TopDownMovement" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": ["Primary", "Secondary"], - "hidden": false, + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], "name": "JoystickIdentifier" }, { "value": "Analog", "type": "Choice", "label": "Stick mode", - "description": "", "group": "Controls", - "extraInformation": ["Analog", "360°", "8 Directions"], - "hidden": false, + "choices": [ + { + "label": "Analog", + "value": "Analog" + }, + { + "label": "360°", + "value": "360°" + }, + { + "label": "8 Directions", + "value": "8 Directions" + } + ], "name": "StickMode" } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "defaultName": "Joystick", - "description": "Joystick for touchscreens.", - "fullName": "Multitouch Joystick", - "name": "SpriteMultitouchJoystick", + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Joystick", + "description": "Joystick for touchscreens.", + "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, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -36565,43 +40449,87 @@ "type": { "value": "Create" }, - "parameters": ["", "Border", "0", "0", ""] + "parameters": [ + "", + "Border", + "0", + "0", + "" + ] }, { "type": { "value": "Create" }, - "parameters": ["", "Thumb", "0", "0", ""] + "parameters": [ + "", + "Thumb", + "0", + "0", + "" + ] }, { "type": { "value": "ChangePlan" }, - "parameters": ["Border", "=", "1"] + "parameters": [ + "Border", + "=", + "1" + ] }, { "type": { "value": "ChangePlan" }, - "parameters": ["Thumb", "=", "2"] + "parameters": [ + "Thumb", + "=", + "2" + ] }, { "type": { "value": "SetCenter" }, - "parameters": ["Border", "=", "0", "=", "0"] + "parameters": [ + "Border", + "=", + "0", + "=", + "0" + ] }, { "type": { "value": "SetCenter" }, - "parameters": ["Thumb", "=", "0", "=", "0"] + "parameters": [ + "Thumb", + "=", + "0", + "=", + "0" + ] }, { "type": { "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "Thumb", + "" + ] } ] } @@ -36624,17 +40552,90 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "MettreAutour" + "inverted": true, + "value": "SpriteMultitouchJoystick::IsInGameEdition" }, "parameters": [ - "Thumb", - "Border", - "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", - "Border.MultitouchJoystick::JoystickAngle()" + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "Thumb", + "Border", + "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "True", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" + }, + "parameters": [ + "Object", + "no", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "False", + "" + ] + } ] } ] @@ -36664,7 +40665,10 @@ "type": { "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -36699,7 +40703,7 @@ "Border", "MultitouchJoystick", "=", - "Object.PropertyControllerIdentifier()", + "ControllerIdentifier", "" ] }, @@ -36711,7 +40715,7 @@ "Border", "MultitouchJoystick", "=", - "Object.PropertyJoystickIdentifier()", + "JoystickIdentifier", "" ] }, @@ -36723,7 +40727,92 @@ "Border", "MultitouchJoystick", "=", - "Object.PropertyDeadZoneRadius()", + "DeadZoneRadius", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Show the joystick until it is released.", + "fullName": "Show and start pressing", + "functionType": "Action", + "name": "TeleportAndPress", + "sentence": "Show _PARAM0_ at the cursor position and start pressing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Object", + "=", + "Object.ParentTouchX(StartedTouchOrMouseId(0))", + "=", + "Object.ParentTouchY(StartedTouchOrMouseId(0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" + }, + "parameters": [ + "Object", + "yes", + "" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "True", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::ForceStartPressing" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "StartedTouchOrMouseId(0)", "" ] } @@ -36740,6 +40829,92 @@ ], "objectGroups": [] }, + { + "description": "Return the X position of a specified touch", + "fullName": "Touch X position (on parent)", + "functionType": "Expression", + "name": "ParentTouchX", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const touchId = eventsFunctionContext.getArgument(\"TouchId\");", + "eventsFunctionContext.returnValue = gdjs.evtTools.input.getTouchX(object.getInstanceContainer(), touchId, object.getLayer());" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Touch identifier", + "name": "TouchId", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the X position of a specified touch", + "fullName": "Touch X position (on parent)", + "functionType": "Expression", + "name": "ParentTouchY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const touchId = eventsFunctionContext.getArgument(\"TouchId\");", + "eventsFunctionContext.returnValue = gdjs.evtTools.input.getTouchY(object.getInstanceContainer(), touchId, object.getLayer());" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Touch identifier", + "name": "TouchId", + "type": "expression" + } + ], + "objectGroups": [] + }, { "description": "De/activate control of the joystick.", "fullName": "De/activate control", @@ -36753,9 +40928,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -36763,7 +40942,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Border", "MultitouchJoystick", "no"] + "parameters": [ + "Border", + "MultitouchJoystick", + "no" + ] } ] }, @@ -36772,9 +40955,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -36782,7 +40969,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Border", "MultitouchJoystick", "yes"] + "parameters": [ + "Border", + "MultitouchJoystick", + "yes" + ] } ] } @@ -36803,11 +40994,11 @@ "objectGroups": [] }, { - "description": "Check if a joystick is pressed.", - "fullName": "Joystick pressed", + "description": "Check if a stick is pressed.", + "fullName": "Stick pressed", "functionType": "Condition", "name": "IsPressed", - "sentence": "Joystick _PARAM0_ is pressed", + "sentence": "Stick _PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -36816,7 +41007,11 @@ "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsPressed" }, - "parameters": ["Border", "MultitouchJoystick", "!="] + "parameters": [ + "Border", + "MultitouchJoystick", + "!=" + ] } ], "actions": [ @@ -36824,7 +41019,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -36840,10 +41037,11 @@ "objectGroups": [] }, { - "description": "the joystick force (range: 0 to 1).", - "fullName": "Joystick force", + "description": "the joystick force (from 0 to 1).", + "fullName": "Joystick force (deprecated)", "functionType": "ExpressionAndCondition", "name": "JoystickForce", + "private": true, "sentence": "the joystick force", "events": [ { @@ -36855,7 +41053,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Border.MultitouchJoystick::PropertyJoystickForce()" + "Border.MultitouchJoystick::JoystickForce()" ] } ] @@ -36875,10 +41073,151 @@ "objectGroups": [] }, { - "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", + "description": "the strick force (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "the stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickForce()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "ExpressionAndCondition", + "name": "StickForceX", + "sentence": "the stick X force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "ExpressionAndCondition", + "name": "StickForceY", + "sentence": "the stick Y force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (from -180 to 180).", + "fullName": "Joystick angle (deprecated)", "functionType": "Expression", "name": "JoystickAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the stick is pointing towards (from -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", "sentence": "", "events": [ { @@ -36890,7 +41229,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Border.MultitouchJoystick::PropertyJoystickAngle()" + "Border.MultitouchJoystick::JoystickAngle()" ] } ] @@ -36926,7 +41265,7 @@ "parameters": [ "Border", "MultitouchJoystick", - "GetArgumentAsString(\"Direction\")", + "Direction", "" ] } @@ -36936,7 +41275,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -36974,7 +41315,7 @@ "parameters": [ "Border", "MultitouchJoystick", - "GetArgumentAsString(\"Direction\")", + "Direction", "" ] } @@ -36984,7 +41325,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -37060,7 +41403,7 @@ "Border", "MultitouchJoystick", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -37132,7 +41475,7 @@ "Border", "MultitouchJoystick", "=", - "GetArgumentAsString(\"Value\")", + "Value", "" ] } @@ -37204,7 +41547,7 @@ "Border", "MultitouchJoystick", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -37227,20 +41570,22 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": ["Primary", "Secondary"], - "hidden": false, + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], "name": "JoystickIdentifier" }, { @@ -37248,9 +41593,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": [], - "hidden": false, "name": "DeadZoneRadius" }, { @@ -37258,8 +41600,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -37268,8 +41612,6 @@ "type": "Number", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -37278,8 +41620,10 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbIsScaledProportionally" }, @@ -37288,77 +41632,21 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ParentOrigin" - } - ], - "objects": [ - { - "assetStoreId": "", - "name": "Thumb", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] }, { - "assetStoreId": "", - "name": "Border", - "tags": "", - "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": [] - } - ] - } - ] + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "ShouldBeHiddenWhenReleased" } - ] + ], + "variants": [] } ] } ], - "externalLayouts": [], - "externalSourceFiles": [] -} + "externalLayouts": [] +} \ No newline at end of file diff --git a/examples/tween-test/tween-test.json b/examples/tween-test/tween-test.json index 3ac442c2b..6adc22bc8 100644 --- a/examples/tween-test/tween-test.json +++ b/examples/tween-test/tween-test.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -19,7 +19,6 @@ "sizeOnStartupMode": "adaptWidth", "templateSlug": "", "useDeprecatedZeroAsDefaultZOrder": true, - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Tween", "description": "", @@ -54,7 +53,9 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -66,7 +67,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "Sprite-1.png", "kind": "image", "metadata": "", @@ -75,7 +75,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Background-1.png", "kind": "image", "metadata": "", @@ -84,7 +83,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Blue Button_Hovered.png", "kind": "image", "metadata": "", @@ -97,7 +95,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Blue Button_Idle.png", "kind": "image", "metadata": "", @@ -110,7 +107,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Blue Button_Pressed.png", "kind": "image", "metadata": "", @@ -123,7 +119,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Slider Border.png", "kind": "image", "metadata": "", @@ -136,7 +131,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Slider Fill Bar.png", "kind": "image", "metadata": "", @@ -149,7 +143,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Slider Thumb.png", "kind": "image", "metadata": "", @@ -173,7 +166,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Ground Green_Idle.png", "kind": "image", "metadata": "", @@ -185,8 +177,7 @@ "name": "Ground Green_Idle.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -210,13 +201,16 @@ "gridType": "rectangular", "gridWidth": 10, "gridHeight": 10, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.25, "snap": true, "zoomFactor": 0.8890566637232372, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -1006,6 +1000,28 @@ "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": "Variable tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1050,6 +1066,28 @@ "b": 239, "g": 198, "r": 173 + }, + "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": "0", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "173;198;239" } }, { @@ -1071,6 +1109,28 @@ "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": "Position tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1156,6 +1216,28 @@ "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": "Position X tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1241,6 +1323,28 @@ "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": "Position Y\n tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1326,6 +1430,28 @@ "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": "Angle \ntweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1411,6 +1537,28 @@ "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": "Scale tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1496,6 +1644,28 @@ "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": "Scale-X tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1581,6 +1751,28 @@ "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": "Scale-Y\ntweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1666,6 +1858,28 @@ "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": "Opacity tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1751,6 +1965,28 @@ "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": "Colour tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1772,6 +2008,28 @@ "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": "0", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1985,6 +2243,28 @@ "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": "Height tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2006,6 +2286,28 @@ "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": "Width tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2027,6 +2329,28 @@ "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": "Character size", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2063,6 +2387,28 @@ "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": "Hello world", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2109,7 +2455,9 @@ { "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "AllButton", + "persistentUuid": "e1e5da7c-ee9b-4118-9e18-aba7dfb0facd", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Blue Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2119,60 +2467,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Tween all", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 99, - "g": 69, - "r": 28 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Tween all" } }, { "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", "name": "TimeScaleSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square white slider", "variables": [], "effects": [], "behaviors": [], @@ -2186,53 +2489,6 @@ "MaxValue": 2, "StepSize": 0.125, "InitialValue": 1 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 28, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square White Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 265 - }, - "FillBar": { - "bottomMargin": 2, - "height": 16, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Square White Slider Fill Bar.png", - "tiled": false, - "topMargin": 0, - "width": 16 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 221, - "g": 221, - "r": 221 - } - }, - "Thumb": { - "bottomMargin": 2, - "height": 36, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square White Slider Thumb.png", - "tiled": false, - "topMargin": 2, - "width": 22 - } } }, { @@ -2269,6 +2525,28 @@ "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": "Time scale", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } } ], @@ -3682,9 +3960,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -3760,13 +4040,16 @@ "gridType": "rectangular", "gridWidth": 10, "gridHeight": 10, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.25, "snap": true, "zoomFactor": 0.8890566637232372, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -4556,6 +4839,28 @@ "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": "Variable tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -4600,6 +4905,28 @@ "b": 239, "g": 198, "r": 173 + }, + "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": "0", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "173;198;239" } }, { @@ -4621,6 +4948,28 @@ "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": "Position tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -4706,6 +5055,28 @@ "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": "Position X tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -4791,6 +5162,28 @@ "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": "Position Y\n tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -4876,6 +5269,28 @@ "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": "Angle \ntweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -4961,6 +5376,28 @@ "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": "Scale tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5046,6 +5483,28 @@ "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": "Scale-X tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5131,6 +5590,28 @@ "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": "Scale-Y\ntweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5216,6 +5697,28 @@ "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": "Opacity tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5301,6 +5804,28 @@ "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": "Colour tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5322,6 +5847,28 @@ "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": "0", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5535,6 +6082,28 @@ "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": "Height tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5556,6 +6125,28 @@ "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": "Width tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5577,6 +6168,28 @@ "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": "Character size", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5613,6 +6226,28 @@ "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": "Hello world", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5660,6 +6295,7 @@ "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "AllButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Blue Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5669,9 +6305,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Tween all" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 80, @@ -5705,6 +6355,28 @@ "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": "Tween all", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "28;69;99" } }, "Pressed": { @@ -5723,6 +6395,7 @@ "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", "name": "TimeScaleSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square white slider", "variables": [], "effects": [], "behaviors": [], @@ -5771,6 +6444,28 @@ "b": 221, "g": 221, "r": 221 + }, + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "221;221;221" } }, "Thumb": { @@ -5819,6 +6514,28 @@ "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": "Time scale", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } } ], @@ -7239,9 +7956,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -7317,13 +8036,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.7921344117998224, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -7483,8 +8205,11 @@ ], "content": { "centerLocation": "ModelOrigin", + "crossfadeDuration": 0, "depth": 64, "height": 64, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Cherries.glb", @@ -7535,6 +8260,7 @@ "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "AllButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Blue Button 2", "variables": [], "effects": [], "behaviors": [], @@ -7544,9 +8270,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Tween all" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 80, @@ -7580,6 +8320,28 @@ "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": "Tween all", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "28;69;99" } }, "Pressed": { @@ -7618,8 +8380,11 @@ ], "content": { "centerLocation": "ModelOrigin", + "crossfadeDuration": 0, "depth": 64, "height": 64, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Cherries.glb", @@ -7655,8 +8420,11 @@ ], "content": { "centerLocation": "ModelOrigin", + "crossfadeDuration": 0, "depth": 64, "height": 64, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Cherries.glb", @@ -7692,8 +8460,11 @@ ], "content": { "centerLocation": "ModelOrigin", + "crossfadeDuration": 0, "depth": 64, "height": 64, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Cherries.glb", @@ -7729,8 +8500,11 @@ ], "content": { "centerLocation": "ModelOrigin", + "crossfadeDuration": 0, "depth": 64, "height": 64, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Cherries.glb", @@ -8378,9 +9152,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -8421,9 +9197,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -8497,12 +9275,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -8522,8 +9301,39 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders 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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -8548,7 +9358,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyValue()" + "CurrentValue" ] } ] @@ -8584,11 +9394,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", "0" ] @@ -8597,13 +9406,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -8613,11 +9421,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "!=", "0" ] @@ -8626,13 +9433,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -8670,7 +9476,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMinValue()" + "MinValue" ] } ] @@ -8707,13 +9513,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -8763,7 +9568,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxValue()" + "MaxValue" ] } ] @@ -8800,13 +9605,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -8896,7 +9700,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyStepSize()" + "StepSize" ] } ] @@ -8933,13 +9737,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -8978,40 +9781,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Value" + "name": "CurrentValue" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -9031,61 +9818,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -9099,509 +9852,406 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "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::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "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": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "MouseIsInside", + "True", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"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\"" ] } ] @@ -9612,49 +10262,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "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": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -9684,22 +10473,20 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -9734,11 +10521,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9783,11 +10569,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9832,11 +10617,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9881,11 +10665,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9907,11 +10690,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -9956,11 +10738,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -10005,11 +10786,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10058,7 +10838,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -10089,8 +10869,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -10098,14 +10876,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -10114,9 +10905,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -10124,9 +10912,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -10134,9 +10919,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -10144,9 +10926,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -10156,41 +10935,296 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", - "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": [], + "string": "It displays the value when it changes.", + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" - }, - "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Thumb", + "Draggable", + "" ] } ] @@ -10205,7 +11239,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances." + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10213,68 +11247,70 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Background", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, "parameters": [ - "", "FillBar", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, "parameters": [ - "", "Thumb", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Background", + "BarLeftPlusRightMargin", "=", - "1" + "Object.Width() - FillBar.Width()" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "FillBar", + "BarTopPlusBottomMargin", "=", - "2" + "Object.Height() - FillBar.Height()" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Thumb", + "PreviousInitialValue", "=", - "3" + "InitialValue" ] } ] @@ -10307,25 +11343,6 @@ "" ] }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Label", - "=", - "4" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "no" - ] - }, { "type": { "value": "Cache" @@ -10368,7 +11385,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -10428,15 +11445,6 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" @@ -10453,24 +11461,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -10480,7 +11488,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -10504,117 +11512,290 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Background", - "ButtonFSM" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - }, - { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" - }, - "parameters": [ - "Background", - "ButtonFSM", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" - }, - "parameters": [ - "Background", - "ButtonFSM", - "" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" }, "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + "Background", + "ButtonFSM" ] } ], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" }, "parameters": [ - "Object" + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, "parameters": [ - "Label", - "" + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" ] - }, + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { "value": "ResetObjectTimer" @@ -10625,45 +11806,28 @@ ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" }, "parameters": [ - "Object" + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" ] } ], @@ -10676,280 +11840,58 @@ "Label", "" ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": [ - "Object" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Label", - "" - ] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Label" - ] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - } - ] - } - ], - "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 parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\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(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } ] } ] } ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, "parameters": [] } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": [ - "Object", - "" - ] - } ] } ], @@ -11088,7 +12030,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -11175,16 +12117,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -11271,16 +12204,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -11367,7 +12291,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -11403,10 +12327,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabelAtChanges", + "True", + "" ] } ], @@ -11446,21 +12372,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "ShowLabelAtChanges", + "False", + "" ] }, { @@ -11478,21 +12407,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShowLabelAtChanges", + "True", + "" ] }, { @@ -11522,53 +12454,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -11601,10 +12486,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -11622,7 +12508,7 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { @@ -11643,10 +12529,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -11668,12 +12555,12 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, "parameters": [ "Label", @@ -11696,76 +12583,6 @@ ], "objectGroups": [] }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.PropertyBarLeftPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "fullName": "", "functionType": "Expression", @@ -11782,7 +12599,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -11832,9 +12649,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -11844,7 +12660,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -11855,7 +12671,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -11884,10 +12700,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -11920,10 +12738,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -12022,112 +12842,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -12135,8 +12942,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -12145,10 +12950,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -12157,10 +12962,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "FillBar" ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -12169,128 +12974,295 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Label" ], + "choices": [], "hidden": true, "name": "ShowLabel" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" } ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Thumb" - }, - { - "objectName": "FillBar" + "variants": [ + { + "areaMaxX": 265, + "areaMaxY": 28, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", + "assetStoreOriginalName": "Square white slider", + "name": "Square white slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 2, + "height": 36, + "leftMargin": 1, + "name": "Thumb", + "rightMargin": 2, + "texture": "Square White Slider Thumb.png", + "tiled": false, + "topMargin": 2, + "type": "PanelSpriteObject::PanelSprite", + "width": 22, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 2, + "height": 16, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "Square White Slider Fill Bar.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 16, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 4, + "height": 28, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square White Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 265, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] }, - { - "objectName": "Background" - } - ] - } + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 16, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 253, + "x": 6, + "y": 6, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 248, + "y": -4, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] + } + ] } ] }, @@ -12299,14 +13271,15 @@ "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.1.1", "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.", + "A button that can be used for menus and most labelled buttons of a game. 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)." ], @@ -12321,409 +13294,111 @@ "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": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", "private": true, - "eventsFunctions": [ + "sentence": "Events are running for the editor", + "events": [ { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "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": "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 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "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" - ] - } - ] - } - ], - "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": "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" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "name": "ButtonFSM", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Apply position changes", + "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": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -12731,184 +13406,376 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior" + "comment": "Make sure the cursor position is only checked once per frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "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": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "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": { - "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" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ] @@ -12919,49 +13786,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "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": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -13031,22 +14037,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" ] @@ -13081,11 +14085,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -13130,11 +14133,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -13179,11 +14181,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -13228,11 +14229,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -13254,11 +14254,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -13303,11 +14302,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -13352,11 +14350,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -13376,137 +14373,440 @@ ], "parameters": [ { - "description": "Object", - "name": "Object", - "type": "object" + "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", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "name": "Pressed" } - ], - "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": [ + "name": "Labels", + "objects": [ { - "description": "Object", - "name": "Object", - "type": "object" + "name": "Label" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "name": "BitmapLabel" } - ], - "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" - }, + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" + "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": [] } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", - "name": "PanelSpriteButton", + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -13536,7 +14836,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -13548,7 +14848,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -13556,14 +14856,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()" ] }, { @@ -13591,63 +14901,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" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -13686,18 +14959,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": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -13759,12 +15061,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -13799,10 +15102,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -13811,7 +15114,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -13819,7 +15122,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -13830,10 +15133,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -13857,10 +15160,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -13877,10 +15181,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -13909,12 +15214,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -13939,84 +15245,28 @@ "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" + "Pressed" ] }, { "type": { - "value": "Cache" + "value": "Tween::RemoveTween" }, "parameters": [ - "Hovered" + "Hovered", + "Tween", + "\"Fadeout\"" ] }, { "type": { - "value": "Montre" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ - "Pressed", - "" + "Hovered", + "Opacity", + "=", + "255" ] } ] @@ -14026,7 +15276,7 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" }, "parameters": [ "Object", @@ -14043,12 +15293,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "PressedLabelOffsetY", + "" ] }, { @@ -14061,139 +15312,77 @@ }, { "type": { - "value": "Montre" + "value": "Cache" }, "parameters": [ - "Hovered", - "" + "Hovered" ] }, { "type": { - "value": "Cache" + "value": "Montre" }, "parameters": [ - "Pressed" + "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" + "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" }, "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" + "Object", + "ButtonFSM" ] }, { "type": { - "value": "ModVarObjet" + "value": "BuiltinCommonInstructions::Once" }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, + "parameters": [] + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::Scale" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ "Object", "=", - "1" + "0", + "" ] }, { "type": { - "value": "PanelSpriteObject::Width" + "value": "Cache" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" + "Idle" ] }, { "type": { - "value": "PanelSpriteObject::Height" + "value": "Montre" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" + "Hovered", + "" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "Cache" }, "parameters": [ - "Object", - "" + "Pressed" ] } ] @@ -14210,22 +15399,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -14447,6 +15621,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -14455,21 +15630,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -14484,17 +15651,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": [ { @@ -14503,18 +15670,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -14526,12 +15693,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", @@ -14539,17 +15705,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -14558,124 +15724,8 @@ "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" - } - ] - } - ] + ], + "objectGroups": [] }, { "description": "De/activate interactions with the button.", @@ -14689,10 +15739,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -14715,10 +15767,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -14792,184 +15846,785 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "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" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "LeftPadding" + "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": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "RightPadding" + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "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" - ], - "hidden": false, - "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": [], - "hidden": false, - "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 - } + "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": "", + "choices": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" } ], - "effects": [], - "behaviors": [ + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Blue 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": "", + "textAlignment": "center", + "characterSize": 30, + "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": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 30, + "lineHeight": 0, + "color": "28;69;99" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Blue 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 + } + } + ] + }, { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Blue 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": "Blue 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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": 81, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "13c57e74-5889-490a-b3fe-4856e2ee6a18", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "" + } }, { - "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": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", + "assetStoreOriginalName": "Blue Button", + "name": "Blue 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": 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": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "lineHeight": 0, + "color": "28;69;99" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Blue 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": "Blue 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": "Blue 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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": 81, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "13c57e74-5889-490a-b3fe-4856e2ee6a18", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - } + ] } ] }, @@ -14978,6 +16633,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": "", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", @@ -15012,6 +16668,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -16125,8 +17783,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -16134,14 +17790,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -16150,9 +17819,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -16160,9 +17826,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -16170,9 +17833,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -16180,9 +17840,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -16695,34 +18352,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], - "hidden": false, + "choices": [], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], - "hidden": false, "name": "IdleEffect" }, { @@ -16731,18 +18381,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" } ], @@ -17168,22 +18813,17 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], - "hidden": false, "name": "IdleAnimationName" }, { @@ -17192,18 +18832,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" } ], @@ -18606,34 +20241,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], - "hidden": false, + "choices": [], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], - "hidden": false, "name": "EffectName" }, { @@ -18642,18 +20270,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" }, { @@ -18662,106 +20285,295 @@ "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", - "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" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeOutEasing" }, { @@ -18769,10 +20581,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeInDuration" }, { @@ -18780,22 +20589,26 @@ "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", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -18804,9 +20617,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -18814,9 +20624,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -18824,9 +20631,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -18834,12 +20638,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -18848,9 +20659,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -19827,24 +21635,20 @@ "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], - "hidden": false, + "choices": [], "name": "Tween" }, { @@ -19852,10 +21656,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], - "hidden": false, "name": "IdleScale" }, { @@ -19865,8 +21666,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" }, { @@ -19874,10 +21673,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeInDuration" }, { @@ -19885,10 +21681,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeOutDuration" }, { @@ -19896,110 +21689,308 @@ "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", - "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" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeOutEasing" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -20973,34 +22964,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], - "hidden": false, + "choices": [], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], - "hidden": false, "name": "IdleColorTint" }, { @@ -21009,18 +22993,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" }, { @@ -21028,10 +23007,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeInDuration" }, { @@ -21039,110 +23015,308 @@ "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", - "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" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeOutEasing" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -21154,6 +23328,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/wave-defense-shooter/assets/rotate-screen-icon.png b/examples/wave-defense-shooter/assets/rotate-screen-icon.png index ba619fae3995e5576c1e1de0a994b5b3da7c39dc..a7726dee34eba34b401b26b73b5bf128ff7c26d7 100644 GIT binary patch delta 1155 zcmV-}1bqAP28{`j8Gi-<007npjm!W5010qNS#tmY3ljhU3ljkVnw%H_00citL_t(| z+U?!pwW2T(1>jc#B~St-Sb`f&sWc6&`9(FdUz!2ufn{)iP zFJiu(WD*ki`Z89$_tpJVezDjscc9w;Dee8UV~f~C+WUWt3x9BoE<;GAA1{n9Lr|{@ zqssu2^Y0f%*G5QJKfU}!SHTucgVg$YrDGSkF3j%!Io&_~OrSGcalK6LxB$k7zpdGt z>qJfWqT$~ihuFO(#CgD+!@nus0J<6ZiS%%a zkf}|^8PsuMdVjrc^u)TVX37}y=+c;8r;DCh5fD}nm|iOaRgvga*5YUmcf7|0vi#q!c*I(ogbVKXj!WbtPaQpC|t;`*$0UbAGITFauxcL)7eRfch zWg0}F+i+Pabb;3_pdyo0RG?zy-(H}hB0n}OAb6=+_+O}R$dcG1qkMjHi6KeFYy6Dy|o2u0uhKn1R@ZD2t*(P z5r{wpA`pR~fxZc3{|6Ds_>YpO0tuvZ9gW&Tt$+AYI|8Y;sne)z_~hZ9Kx)_Xw`h+? zJ%J1&g$m7X_6G$j)%Wj-%@-Yk7GIbCUdYHJ1zG|vy0+mdmtUF{Hz-in=Rx9>OQT)6 zc_@U5>MDEpP@q77iX^98EJC3y^@z=?x3#~_3>4B@oOqJuA;lMN4h06Z-Zo{cP-v^! zqJOLFQh#}JD8$`_k2-!rH1NXcxkeJ4Gh0@-dvY`XKK3?f$MHuG zs2Zfl{nW^dyusRsEy4v`R|hB-0p*)GT?B{GqujlnMkdMC44gj9;TS!Nv;W(ZrF^D3 z0(u;InLTk5rN`0nB&=|BPu2{HlVJA$Y|+*eXZzXz)Y7eTMu_FV^m-1=fl-q_y?(cF z2`6C`U1lOxY{B#?cRjJ&lb3|baOvu2spC}}%ON=ea-z)Z?* zMqugDC_atNmBAsU1(z{AT5-3YssWQGU52g&%X!B2s%Mq_v$$(=XiTc za}skxbf@G~0#nJw!Z{>~f8@5gv!W~3SS=M$839QocMjN)O*LdV9? zCxOu7>e+n%6@fxID5@S*;$Z0FH}9klXisOV_8tv}_R~*oyQATd>iB@{h2UF@UMScf z^n-rT|AlB4WM)D6e-tnrGSO7O2kh{OROJk_T_cC_UAK)$ZJ5INF{(-24+01>)f1p+ z95vCbs~;*Ya@)d8?~6laGW${nb&ANwFb!{XN5?_)8Eql8iwCYn^VL zlW!>ix;j1cC}j1fn;F`qpl#yz4yQpu5aSx+l7b+^xt6-1f3O{PW!7>1_eTdJOURK2$=wV@}4LZLO*%q^QFz=P%!X=ku;#hqe3bKyY{tK", - "0", - "ControllerIdentifier", - "JoystickIdentifier", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "=", - "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" - ] - }, - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateStick" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "-90", - "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::IsButtonPressed" - }, - "parameters": [ - "", - "ControllerIdentifier", - "JumpButton", - "\"Down\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - } - ], - "parameters": [ + "choices": [ { - "description": "Object", - "name": "Object", - "type": "object" + "label": "Primary", + "value": "Primary" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", - "type": "behavior" + "label": "Secondary", + "value": "Secondary" } ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D physics character", - "extraInformation": [ - "Physics3D::PhysicsCharacter3D" - ], - "name": "PhysicsCharacter3D" - }, - { - "value": "1", - "type": "Number", - "label": "Controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "Choice", - "label": "Walk joystick", - "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" - ], "name": "JoystickIdentifier" }, { @@ -12073,8 +11834,151 @@ }, { "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D shooter multitouch controller mapper", - "name": "Shooter3DMultitouchMapper", + "fullName": "3D platformer multitouch controller mapper", + "name": "Platformer3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "=", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "-90", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D shooter multitouch controller mapper", + "name": "Shooter3DMultitouchMapper", "objectType": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ @@ -12167,6 +12071,7 @@ "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { @@ -12180,9 +12085,15 @@ "type": "Choice", "label": "Walk joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -13125,6 +13036,7 @@ "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { @@ -13138,9 +13050,15 @@ "type": "Choice", "label": "Camera joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "CameraStick" }, @@ -13356,6 +13274,7 @@ "extraInformation": [ "Physics3D::PhysicsCar3D" ], + "choices": [], "name": "PhysicsCar3D" }, { @@ -13369,9 +13288,15 @@ "type": "Choice", "label": "Steer joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "SteerJoystickIdentifier" }, @@ -13380,9 +13305,15 @@ "type": "Choice", "label": "Speed joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "SpeedJoystickIdentifier" }, @@ -13915,6 +13846,7 @@ "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], + "choices": [], "name": "TopDownMovement" }, { @@ -13927,9 +13859,15 @@ "value": "Primary", "type": "Choice", "label": "Joystick name", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -13938,10 +13876,19 @@ "type": "Choice", "label": "Stick mode", "group": "Controls", - "extraInformation": [ - "Analog", - "360°", - "8 Directions" + "choices": [ + { + "label": "Analog", + "value": "Analog" + }, + { + "label": "360°", + "value": "360°" + }, + { + "label": "8 Directions", + "value": "8 Directions" + } ], "name": "StickMode" } @@ -14040,6 +13987,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -14066,6 +14014,7 @@ } ], "instances": [], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -15190,9 +15139,15 @@ "value": "Primary", "type": "Choice", "label": "Joystick name", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -15211,6 +15166,7 @@ "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -15230,6 +15186,7 @@ "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbIsScaledProportionally" }, @@ -18599,12 +18556,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -18706,6 +18678,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -18845,6 +18818,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -18904,6 +18878,7 @@ "initialVariables": [] } ], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -20061,8 +20036,11 @@ "value": "", "type": "Choice", "label": "", - "extraInformation": [ - "Label.Text=LabelText" + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + } ], "hidden": true, "name": "_PropertyMapping" @@ -20130,6 +20108,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 45, + "lineHeight": 0, "color": "255;255;255" } }, @@ -20277,6 +20256,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -20336,7 +20316,8 @@ "stringProperties": [], "initialVariables": [] } - ] + ], + "editionSettings": {} } ] } @@ -21082,6 +21063,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -21206,6 +21188,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -21297,6 +21280,7 @@ "initialVariables": [] } ], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -22817,6 +22801,7 @@ "extraInformation": [ "Label" ], + "choices": [], "name": "ShowLabel" }, { @@ -22903,6 +22888,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 16, + "lineHeight": 0, "color": "255;255;255" } }, @@ -23027,6 +23013,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -23103,7 +23090,8 @@ "stringProperties": [], "initialVariables": [] } - ] + ], + "editionSettings": {} } ] } @@ -25527,12 +25515,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -25623,6 +25626,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -25754,6 +25758,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -25829,6 +25834,7 @@ "initialVariables": [] } ], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -27436,6 +27442,7 @@ "Label", "FillBar" ], + "choices": [], "hidden": true, "name": "BarLeftPadding" }, @@ -27448,6 +27455,7 @@ "Label", "FillBar" ], + "choices": [], "hidden": true, "name": "BarTopPadding" }, @@ -27460,6 +27468,7 @@ "Label", "FillBar" ], + "choices": [], "hidden": true, "name": "BarRightPadding" }, @@ -27472,6 +27481,7 @@ "Label", "FillBar" ], + "choices": [], "hidden": true, "name": "BarBottomPadding" }, @@ -27538,6 +27548,7 @@ "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -27549,6 +27560,7 @@ "extraInformation": [ "FillBar" ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -27560,6 +27572,7 @@ "extraInformation": [ "Label" ], + "choices": [], "hidden": true, "name": "ShowLabel" }, @@ -27636,6 +27649,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -27767,6 +27781,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -27839,7 +27854,8 @@ "stringProperties": [], "initialVariables": [] } - ] + ], + "editionSettings": {} } ] } @@ -28980,12 +28996,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -29524,6 +29555,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -29533,6 +29565,7 @@ "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { @@ -29972,6 +30005,7 @@ "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], + "choices": [], "name": "Animation" }, { @@ -29981,6 +30015,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -31374,6 +31409,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -31383,6 +31419,7 @@ "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { @@ -31427,40 +31464,139 @@ "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -31469,40 +31605,139 @@ "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -31526,10 +31761,19 @@ "value": "Idle", "type": "Choice", "label": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -31559,10 +31803,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -32517,6 +32770,7 @@ "extraInformation": [ "ScalableCapability::ScalableBehavior" ], + "choices": [], "name": "Scale" }, { @@ -32526,6 +32780,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -32535,6 +32790,7 @@ "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -32583,40 +32839,139 @@ "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -32625,40 +32980,139 @@ "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -32666,10 +33120,19 @@ "value": "Idle", "type": "Choice", "label": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -33631,6 +34094,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -33640,6 +34104,7 @@ "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -33685,40 +34150,139 @@ "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -33727,40 +34291,139 @@ "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -33768,10 +34431,19 @@ "value": "Idle", "type": "Choice", "label": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -38193,6 +38865,7 @@ "extraInformation": [ "ScalableCapability::ScalableBehavior" ], + "choices": [], "name": "Scale" }, { @@ -51535,6 +52208,7 @@ "Linear", "Exponential" ], + "choices": [], "advanced": true, "name": "ExponentialCoolingRate" }, @@ -51571,7 +52245,7 @@ "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.1.1", + "version": "0.2.1", "description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", "origin": { "identifier": "ScreenOrientationChecker", @@ -51594,6 +52268,28 @@ ], "sceneVariables": [], "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, { "fullName": "Get game target orientation", "functionType": "StringExpression", @@ -51712,6 +52408,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -51771,44 +52468,7 @@ { "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 - } - ] - ] - } - ] + "sprites": [] } ] } @@ -51835,6 +52495,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -51896,22 +52557,68 @@ }, { "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, + "customSize": true, + "depth": 0.9624060150375939, + "height": 96, "layer": "", "name": "Icon", "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", - "width": 0, - "x": 204, - "y": 64, + "width": 96, + "x": 158, + "y": 16, "zOrder": 16, "numberProperties": [], "stringProperties": [], "initialVariables": [] } ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.75, + "windowMask": false, + "selectedLayer": "" + }, "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::ClearBetweenFrames" + }, + "parameters": [ + "BackgroundPainter", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, { "fullName": "", "functionType": "Action", @@ -51919,41 +52626,66 @@ "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if the screen must be shown" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ScreenOrientationChecker::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SystemInfo::IsMobile" + "inverted": true, + "value": "ScreenOrientationChecker::IsInGameEdition" }, - "parameters": [] + "parameters": [ + "", + "" + ] } ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if the screen must be shown" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "SystemInfo::IsMobile" }, - "parameters": [ - "SceneWindowWidth()", - ">", - "SceneWindowHeight()" - ] + "parameters": [] } ], "actions": [], @@ -51963,24 +52695,69 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" + "SceneWindowWidth()", + ">", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "!=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] @@ -51990,127 +52767,146 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "!=", - "\"portrait\"" + "SceneWindowWidth()", + "<=", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"landscape\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show/hide the screen as needed" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "SceneWindowWidth()", - "<=", - "SceneWindowHeight()" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [], + "subInstructions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "TargetOrientation", - "=", - "\"landscape\"" + "IsShown", + "True", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetBooleanVariable" + "value": "BooleanVariable" }, "parameters": [ - "IsShown", - "False", + "IsForceShown", + "True", "" ] } ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" - ] - } + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show/hide the screen as needed" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { + "inverted": true, "value": "BooleanVariable" }, "parameters": [ @@ -52121,6 +52917,7 @@ }, { "type": { + "inverted": true, "value": "BooleanVariable" }, "parameters": [ @@ -52129,229 +52926,207 @@ "" ] } - ] - } - ], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "BackgroundPainter", - "BackgroundColor" + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + } ] }, { - "type": { - "value": "PrimitiveDrawing::RoundedRectangle" - }, - "parameters": [ - "BackgroundPainter", - "Padding", - "Padding", - "Object.Width()-Padding", - "Object.Height()-Padding", - "CornerRadius" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Icon", + "=", + "Text.Y() - 100" + ] + } ] }, { - "type": { - "value": "Montre" - }, - "parameters": [ - "Object", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "IsShown", - "True", - "" - ] + "comment": "Animate the icon" }, { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "IsForceShown", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Object" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Icon", - "=", - "Text.Y() - 100" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Animate the icon" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Tween::Exists" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + } ] }, { - "type": { - "inverted": true, - "value": "Tween::Exists" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Tween::HasFinished" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } ] }, { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"", + "-8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Draw the background.", + "fullName": "Draw the background", + "functionType": "Action", + "name": "DrawBackground", + "private": true, + "sentence": "Draw the background of _PARAM0_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Tween::HasFinished" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"", - "-8", - "\"easeInOutQuad\"", - "2", - "" - ] - }, - { - "type": { - "value": "Tween::RemoveTween" + "value": "PrimitiveDrawing::RoundedRectangle" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" + "BackgroundPainter", + "Padding", + "Padding", + "Object.Width()-Padding", + "Object.Height()-Padding", + "CornerRadius" ] } ] @@ -52371,7 +53146,6 @@ "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game.", "fullName": "Force show the screen", "functionType": "Condition", - "group": "Screen Orientation Checker configuration", "name": "IsForceShown", "sentence": "_PARAM0_ is forced to be shown", "events": [ @@ -52415,7 +53189,6 @@ "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game.", "fullName": "Force show the screen", "functionType": "Action", - "group": "Screen Orientation Checker configuration", "name": "SetIsForceShown", "sentence": "Force _PARAM0_ to be shown: _PARAM1_", "events": [ @@ -52491,6 +53264,76 @@ } ], "objectGroups": [] + }, + { + "description": "the message of the object.", + "fullName": "Message", + "functionType": "ExpressionAndCondition", + "name": "Message", + "sentence": "the message", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Text.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Message", + "name": "SetMessage", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Text", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -52524,16 +53367,278 @@ "description": "Corner radius for the background", "group": "Appearance", "name": "CornerRadius" - }, - { - "value": "0;0;0", - "type": "Color", - "label": "Background color", - "group": "Appearance", - "name": "BackgroundColor" } ], - "variants": [] + "variants": [ + { + "areaMaxX": 400, + "areaMaxY": 200, + "areaMaxZ": 0, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "2743bcd6cf431c6c00cda3a59684eb152b3a09d598b799b15383e4f77daf8b37", + "assetStoreOriginalName": "Black screen orientation checker", + "name": "Black screen orientation checker", + "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, + "lineHeight": 0, + "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, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": [] + } + ], + "editionSettings": {} + } + ] } ] } From 2eab03e0e9d53aa8b8bc6ee37267d87ce0e4f0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Tue, 18 Nov 2025 19:02:33 +0100 Subject: [PATCH 2/4] Remove unused overriding --- examples/admob/admob.json | 840 +----------------- .../advanced-projectile.json | 414 --------- .../boids-flocking-simulation.json | 826 +---------------- examples/buttons/buttons.json | 82 -- .../crazygames-sdk-demo.json | 574 ------------ .../draggable-physics/draggable-physics.json | 343 +------ examples/face-forward/face-forward.json | 207 ----- examples/fire-bullet/fire-bullet.json | 69 -- examples/firing-patterns/firing-patterns.json | 82 -- examples/in-app-purchase/in-app-purchase.json | 328 ------- .../marching-squares-island-generator.json | 136 +-- examples/music jukebox/music jukebox.json | 212 +---- examples/object-slicer/object-slicer.json | 328 ------- .../orbiting-objects/orbiting-objects.json | 466 ---------- examples/tween-test/tween-test.json | 233 ----- 15 files changed, 18 insertions(+), 5122 deletions(-) diff --git a/examples/admob/admob.json b/examples/admob/admob.json index 628921ebb..0762fdc9f 100644 --- a/examples/admob/admob.json +++ b/examples/admob/admob.json @@ -624,88 +624,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Stop Auto Initialization" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Stop Auto Initialization", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": "Stop Auto Initialization", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -725,88 +643,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Initialize manually" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Initialize manually", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": "Initialize manually", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -825,88 +661,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Go To App Opens" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go To App Opens", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": "Go To App Opens", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } } ], @@ -1562,88 +1316,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Load Portait" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -1662,88 +1334,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Load Landscape" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -1762,88 +1352,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Display" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -1852,98 +1360,16 @@ "type": "PanelSpriteButton::PanelSpriteButton", "variant": "Green Button 2", "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Load And Display Portait" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load And Display Portait" } }, { @@ -1962,88 +1388,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Load And Display Landscape" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -2062,88 +1406,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Go To Banners" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -2162,88 +1424,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Go To Rewarded Interstitials" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } } ], diff --git a/examples/advanced-projectile/advanced-projectile.json b/examples/advanced-projectile/advanced-projectile.json index b9d811ece..51286b52b 100644 --- a/examples/advanced-projectile/advanced-projectile.json +++ b/examples/advanced-projectile/advanced-projectile.json @@ -699,75 +699,6 @@ "LabelMargin": 4, "MaxValue": 600, "InitialValue": 300 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 16, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -785,75 +716,6 @@ "BarBottomPadding": 4, "LabelMargin": 4, "MaxValue": 500 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 16, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -872,75 +734,6 @@ "LabelMargin": 4, "StepSize": 0.1, "MaxValue": 3 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 16, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -957,75 +750,6 @@ "BarRightPadding": 3, "BarBottomPadding": 4, "LabelMargin": 4 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 16, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -1043,75 +767,6 @@ "BarBottomPadding": 4, "LabelMargin": 4, "MaxValue": 500 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 16, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -1131,75 +786,6 @@ "MinValue": -300, "MaxValue": 300, "InitialValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 16, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { diff --git a/examples/boids-flocking-simulation/boids-flocking-simulation.json b/examples/boids-flocking-simulation/boids-flocking-simulation.json index 8d20ae43e..be88b6fbc 100644 --- a/examples/boids-flocking-simulation/boids-flocking-simulation.json +++ b/examples/boids-flocking-simulation/boids-flocking-simulation.json @@ -957,75 +957,6 @@ "LabelMargin": 4, "InitialValue": 25, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 24, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -1044,75 +975,6 @@ "LabelMargin": 4, "InitialValue": 75, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 24, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -1132,75 +994,6 @@ "InitialValue": 100, "MinValue": 0, "MaxValue": 200 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 24, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -1220,75 +1013,6 @@ "InitialValue": 150, "MinValue": 0, "MaxValue": 300 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 24, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -1531,75 +1255,6 @@ "LabelMargin": 4, "InitialValue": 50, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 24, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -1674,75 +1329,6 @@ "LabelMargin": 4, "InitialValue": 50, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 24, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -1809,73 +1395,7 @@ "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} }, { "assetStoreId": "", @@ -2061,75 +1581,6 @@ "LabelMargin": 4, "InitialValue": 50, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 24, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -2148,75 +1599,6 @@ "LabelMargin": 4, "InitialValue": 25, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 24, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -2235,75 +1617,6 @@ "LabelMargin": 4, "InitialValue": 50, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 24, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -2370,73 +1683,7 @@ "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} }, { "assetStoreId": "", @@ -2518,75 +1765,6 @@ "InitialValue": 250, "StepSize": 1, "MaxValue": 1000 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 24, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 64, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 32 - } } }, { diff --git a/examples/buttons/buttons.json b/examples/buttons/buttons.json index e05397319..ae2c33228 100755 --- a/examples/buttons/buttons.json +++ b/examples/buttons/buttons.json @@ -544,88 +544,6 @@ "TopPadding": 0, "HoveredFadeOutDuration": 0.2, "LabelText": "Button" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Button", - "font": "Roboto-Regular.ttf", - "textAlignment": "center", - "characterSize": 35, - "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": "Roboto-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 35, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } } }, { diff --git a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json index b8a2ec3e4..cf7e6c9d7 100644 --- a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json +++ b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json @@ -223,88 +223,6 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Back" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Back", - "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": "Back", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Pressed.png", - "tiled": false, - "topMargin": 16, - "width": 192 - } } } ], @@ -493,88 +411,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "VideoAds" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "VideoAds", - "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": "VideoAds", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "lineHeight": 0, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } } }, { @@ -696,88 +532,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Game" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Game", - "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": "Game", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "lineHeight": 0, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } } }, { @@ -796,88 +550,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Banners" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Banners", - "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": "Banners", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "lineHeight": 0, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } } }, { @@ -896,88 +568,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "User" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "User", - "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": "User", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "lineHeight": 0, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } } }, { @@ -996,88 +586,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Data" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Data", - "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": "Data", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "lineHeight": 0, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } } }, { @@ -1096,88 +604,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "In-game purchases" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "In-game purchases", - "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": "In-game purchases", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "lineHeight": 0, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } } } ], diff --git a/examples/draggable-physics/draggable-physics.json b/examples/draggable-physics/draggable-physics.json index 2e2f59095..2810252ed 100644 --- a/examples/draggable-physics/draggable-physics.json +++ b/examples/draggable-physics/draggable-physics.json @@ -991,75 +991,6 @@ "LabelMargin": 4, "MinValue": 0, "MaxValue": 500 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - }, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "lineHeight": 0, - "color": "0;0;0" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -1077,75 +1008,6 @@ "BarBottomPadding": 4, "LabelMargin": 4, "MaxValue": 60 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - }, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "lineHeight": 0, - "color": "0;0;0" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -1164,75 +1026,6 @@ "LabelMargin": 4, "MaxValue": 1, "StepSize": 0.01 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - }, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "lineHeight": 0, - "color": "0;0;0" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -1243,73 +1036,7 @@ "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} }, { "assetStoreId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", @@ -1319,73 +1046,7 @@ "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} } ], "objectsFolderStructure": { diff --git a/examples/face-forward/face-forward.json b/examples/face-forward/face-forward.json index db01f4506..f992b3f34 100644 --- a/examples/face-forward/face-forward.json +++ b/examples/face-forward/face-forward.json @@ -687,75 +687,6 @@ "LabelMargin": 4, "InitialValue": 360, "MaxValue": 720 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 16, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -774,75 +705,6 @@ "LabelMargin": 4, "InitialValue": 250, "MaxValue": 500 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 16, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -863,75 +725,6 @@ "MinValue": 0, "StepSize": 1, "MaxValue": 20 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 16, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { diff --git a/examples/fire-bullet/fire-bullet.json b/examples/fire-bullet/fire-bullet.json index bbcccae55..b74ab9ec2 100644 --- a/examples/fire-bullet/fire-bullet.json +++ b/examples/fire-bullet/fire-bullet.json @@ -11596,75 +11596,6 @@ "BarRightPadding": 4, "MaxValue": 16, "InitialValue": 8 - }, - "childrenContent": { - "Background": { - "bottomMargin": 6, - "height": 34, - "leftMargin": 4, - "rightMargin": 4, - "texture": "Flat Bar White Border.png", - "tiled": true, - "topMargin": 6, - "width": 224 - }, - "Buffer": { - "bottomMargin": 0, - "height": 24, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Flat Bar Green Fill Bar.png", - "tiled": true, - "topMargin": 0, - "width": 24 - }, - "FillBar": { - "bottomMargin": 0, - "height": 24, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Flat Bar Green Fill Bar.png", - "tiled": true, - "topMargin": 0, - "width": 24 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "8 / 16", - "font": "", - "textAlignment": "center", - "characterSize": 16, - "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": "8 / 16", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 16, - "lineHeight": 0, - "color": "255;255;255" - } - } } } ], diff --git a/examples/firing-patterns/firing-patterns.json b/examples/firing-patterns/firing-patterns.json index a5e830745..8d1b4e9e2 100644 --- a/examples/firing-patterns/firing-patterns.json +++ b/examples/firing-patterns/firing-patterns.json @@ -444,88 +444,6 @@ "TopPadding": 0, "HoveredFadeOutDuration": 0.25, "LabelText": "➔" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 96, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 96 - }, - "Idle": { - "bottomMargin": 32, - "height": 96, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 96 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "➔", - "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": "➔", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "lineHeight": 0, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 96, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 96 - } } }, { diff --git a/examples/in-app-purchase/in-app-purchase.json b/examples/in-app-purchase/in-app-purchase.json index 67d5c622f..1c66dafc4 100644 --- a/examples/in-app-purchase/in-app-purchase.json +++ b/examples/in-app-purchase/in-app-purchase.json @@ -1132,88 +1132,6 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Buy Coins" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Buy Coins", - "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": "Buy Coins", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } } }, { @@ -1232,88 +1150,6 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Buy Subscription" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Buy Subscription", - "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": "Buy Subscription", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } } }, { @@ -1332,88 +1168,6 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Remove Ads" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Remove Ads", - "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": "Remove Ads", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } } }, { @@ -1432,88 +1186,6 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Use Coins" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Use Coins", - "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": "Use Coins", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } } } ], diff --git a/examples/marching-squares-island-generator/marching-squares-island-generator.json b/examples/marching-squares-island-generator/marching-squares-island-generator.json index 806a7423e..a59d1bae4 100644 --- a/examples/marching-squares-island-generator/marching-squares-island-generator.json +++ b/examples/marching-squares-island-generator/marching-squares-island-generator.json @@ -876,73 +876,7 @@ "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\DisableNoiseButton.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\EnableNoiseButton.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} }, { "assetStoreId": "", @@ -953,73 +887,7 @@ "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\DisableConstraintButton.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\EnableConstraintButton.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} } ], "objectsFolderStructure": { diff --git a/examples/music jukebox/music jukebox.json b/examples/music jukebox/music jukebox.json index ea8faa946..4c32a085c 100644 --- a/examples/music jukebox/music jukebox.json +++ b/examples/music jukebox/music jukebox.json @@ -1634,111 +1634,7 @@ "Index": 2.0247e-320 } ], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": true, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "Images\\UI UX\\SFX off Button.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 0 - }, - { - "x": 129, - "y": 0 - }, - { - "x": 129, - "y": 129 - }, - { - "x": 0, - "y": 129 - } - ] - ] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "Images\\UI UX\\SFX on Button.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 0 - }, - { - "x": 129, - "y": 0 - }, - { - "x": 129, - "y": 129 - }, - { - "x": 0, - "y": 129 - } - ] - ] - } - ] - } - ] - } - ] - } - } + "content": {} }, { "assetStoreId": "", @@ -1760,111 +1656,7 @@ "Index": 2.0247e-320 } ], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": true, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "Images\\UI UX\\Music off Button.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 0 - }, - { - "x": 129, - "y": 0 - }, - { - "x": 129, - "y": 128 - }, - { - "x": 0, - "y": 128 - } - ] - ] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "Images\\UI UX\\Music on Button.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 0 - }, - { - "x": 129, - "y": 0 - }, - { - "x": 129, - "y": 128 - }, - { - "x": 0, - "y": 128 - } - ] - ] - } - ] - } - ] - } - ] - } - } + "content": {} }, { "adaptCollisionMaskAutomatically": true, diff --git a/examples/object-slicer/object-slicer.json b/examples/object-slicer/object-slicer.json index b261dded5..de9052d42 100644 --- a/examples/object-slicer/object-slicer.json +++ b/examples/object-slicer/object-slicer.json @@ -5566,88 +5566,6 @@ "TopPadding": 0, "HoveredFadeOutDuration": 0.2, "LabelText": "Explode" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Red Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Red Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Explode", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-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": "Explode", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Red Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } } }, { @@ -5667,88 +5585,6 @@ "TopPadding": 0, "HoveredFadeOutDuration": 0.2, "LabelText": "Transporter" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Transporter", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-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": "Transporter", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } } }, { @@ -5768,88 +5604,6 @@ "TopPadding": 0, "HoveredFadeOutDuration": 0.2, "LabelText": "Out and Back" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Out and Back", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-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": "Out and Back", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } } }, { @@ -5869,88 +5623,6 @@ "TopPadding": 0, "HoveredFadeOutDuration": 0.2, "LabelText": "Crumble" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Orange Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Orange Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Crumble", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-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": "Crumble", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Orange Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } } } ], diff --git a/examples/orbiting-objects/orbiting-objects.json b/examples/orbiting-objects/orbiting-objects.json index d683ebc5f..22b347e95 100644 --- a/examples/orbiting-objects/orbiting-objects.json +++ b/examples/orbiting-objects/orbiting-objects.json @@ -3029,75 +3029,6 @@ "InitialValue": 50, "MinValue": 50, "MaxValue": 300 - }, - "childrenContent": { - "Background": { - "bottomMargin": 31, - "height": 63, - "leftMargin": 31, - "rightMargin": 31, - "texture": "Small Plastic Green Round Slider Border.png", - "tiled": false, - "topMargin": 31, - "width": 583 - }, - "FillBar": { - "bottomMargin": 0, - "height": 16, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Transparent.png", - "tiled": false, - "topMargin": 0, - "width": 16 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "lineHeight": 0, - "color": "0;0;0" - } - }, - "Thumb": { - "bottomMargin": 0, - "height": 59, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Small Plastic Green Round Slider Thumb.png", - "tiled": false, - "topMargin": 0, - "width": 63 - } } }, { @@ -3115,75 +3046,6 @@ "MinValue": 50, "MaxValue": 300, "ShowLabelAtChanges": false - }, - "childrenContent": { - "Background": { - "bottomMargin": 31, - "height": 63, - "leftMargin": 31, - "rightMargin": 31, - "texture": "Small Plastic Green Round Slider Border.png", - "tiled": false, - "topMargin": 31, - "width": 583 - }, - "FillBar": { - "bottomMargin": 0, - "height": 16, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Transparent.png", - "tiled": false, - "topMargin": 0, - "width": 16 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 221, - "g": 221, - "r": 221 - }, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "lineHeight": 0, - "color": "221;221;221" - } - }, - "Thumb": { - "bottomMargin": 0, - "height": 59, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Small Plastic Green Round Slider Thumb.png", - "tiled": false, - "topMargin": 0, - "width": 63 - } } }, { @@ -3203,88 +3065,6 @@ "TopPadding": 0, "HoveredFadeOutDuration": 0.2, "LabelText": "Top" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Top", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-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": "Top", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } } }, { @@ -3303,88 +3083,6 @@ "TopPadding": 0, "HoveredFadeOutDuration": 0.2, "LabelText": "Bottom" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Bottom", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-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": "Bottom", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } } }, { @@ -3403,88 +3101,6 @@ "TopPadding": 0, "HoveredFadeOutDuration": 0.2, "LabelText": "Left" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Left", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-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": "Left", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } } }, { @@ -3503,88 +3119,6 @@ "TopPadding": 0, "HoveredFadeOutDuration": 0.2, "LabelText": "Right" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Right", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-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": "Right", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } } } ], diff --git a/examples/tween-test/tween-test.json b/examples/tween-test/tween-test.json index 6adc22bc8..d5a9e0208 100644 --- a/examples/tween-test/tween-test.json +++ b/examples/tween-test/tween-test.json @@ -6307,88 +6307,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Tween all" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Tween all", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Tween all", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "28;69;99" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -6409,75 +6327,6 @@ "MaxValue": 2, "StepSize": 0.125, "InitialValue": 1 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 28, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square White Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 265 - }, - "FillBar": { - "bottomMargin": 2, - "height": 16, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Square White Slider Fill Bar.png", - "tiled": false, - "topMargin": 0, - "width": 16 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 221, - "g": 221, - "r": 221 - }, - "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": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "lineHeight": 0, - "color": "221;221;221" - } - }, - "Thumb": { - "bottomMargin": 2, - "height": 36, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square White Slider Thumb.png", - "tiled": false, - "topMargin": 2, - "width": 22 - } } }, { @@ -8272,88 +8121,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Tween all" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Tween all", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Tween all", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "28;69;99" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { From 5742772c87ad13db2a7d676c4054926f8a143b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 19 Nov 2025 13:40:30 +0100 Subject: [PATCH 3/4] Migrate some examples to variants --- .../360\302\260-platformer.json" | 7129 ++++++++-------- .../assets/rotate-screen-icon.png" | Bin 881 -> 1165 bytes examples/admob/admob.json | 492 -- .../assets/Flat Bar Red Fill Bar.png | Bin 0 -> 157 bytes .../assets/Flat Bar White Border.png | Bin 0 -> 204 bytes .../assets/Healthbar.png | Bin 120 -> 0 bytes .../assets/HealthbarBorder.png | Bin 180 -> 0 bytes .../assets/rotate-screen-icon.png | Bin 881 -> 1165 bytes .../conviction-of-gun-dude-mobile.json | 7217 +++++++++------- .../crazygames-sdk-demo.json | 246 - examples/load-testing/load-testing.json | 7540 ++++++++++++----- .../wave-defense-shooter.json | 7 +- 12 files changed, 12907 insertions(+), 9724 deletions(-) create mode 100644 examples/conviction-of-gun-dude-mobile/assets/Flat Bar Red Fill Bar.png create mode 100644 examples/conviction-of-gun-dude-mobile/assets/Flat Bar White Border.png delete mode 100644 examples/conviction-of-gun-dude-mobile/assets/Healthbar.png delete mode 100644 examples/conviction-of-gun-dude-mobile/assets/HealthbarBorder.png diff --git "a/examples/360\302\260-platformer/360\302\260-platformer.json" "b/examples/360\302\260-platformer/360\302\260-platformer.json" index 60e94a561..bd4553850 100644 --- "a/examples/360\302\260-platformer/360\302\260-platformer.json" +++ "b/examples/360\302\260-platformer/360\302\260-platformer.json" @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 226, + "build": 245, "major": 5, "minor": 5, "revision": 0 @@ -59,7 +59,9 @@ "platformer" ], "playableDevices": [ - "keyboard" + "keyboard", + "mobile", + "mobile" ], "extensionProperties": [], "platforms": [ @@ -331,12 +333,11 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/assets/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", + "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", "name": "rotate-screen-icon.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -360,13 +361,16 @@ "gridType": "rectangular", "gridWidth": 24, "gridHeight": 24, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.25, "snap": true, "zoomFactor": 0.43357743047026254, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -3326,6 +3330,7 @@ "assetStoreId": "e71bd69f896d6c7531b48c65ceb5da25071d4fbdeb518aeceecba8d21f34ed8d", "name": "WalkJoystick", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -3407,6 +3412,7 @@ "assetStoreId": "e5919fb86a559b00001678c710efe55f4e9f2e032a9ff9610087370f998d57de", "name": "ScreenOrientationChecker", "type": "ScreenOrientationChecker::ScreenOrientationChecker", + "variant": "Black screen orientation checker", "variables": [], "effects": [], "behaviors": [ @@ -3426,116 +3432,6 @@ "BackgroundColor": "24;24;24", "CornerRadius": 8, "Padding": 5 - }, - "childrenContent": { - "BackgroundPainter": { - "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 - } - }, - "Icon": { - "adaptCollisionMaskAutomatically": true, - "updateIfNotVisible": false, - "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 - } - ] - ] - } - ] - } - ] - } - ] - }, - "Text": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "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" - } - } } } ], @@ -4998,6 +4894,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5031,6 +4928,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5064,6 +4962,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5108,6 +5007,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5141,6 +5041,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5252,13 +5153,13 @@ "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.7.0", + "version": "1.9.0", "description": [ - "Multitouch joysticks can be used the same way as physical gamepads:", + "Multitouch joysticks are objects showing a joystick on the screen, useful for mobile. They work like a physical gamepad:", "- 4 or 8 directions", "- Analogus pads", "- Player selection", - "- Controls mapping for top-down movement and platformer characters", + "- Automatic \"mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the virtual joystick (it works by reading the multitouch joystick state and simulating controls). No need for additional events to make it work once the behaviors are set up.", "", "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)." ], @@ -5322,6 +5223,28 @@ } ], "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, { "fullName": "Accelerated speed", "functionType": "Expression", @@ -5740,11 +5663,11 @@ "objectGroups": [] }, { - "description": "Check if a button is pressed on a gamepad.", - "fullName": "Multitouch controller button pressed", + "description": "Check if a button was just pressed on a multitouch controller.", + "fullName": "Multitouch controller button just pressed", "functionType": "Condition", - "name": "IsButtonPressed", - "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ was just pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5756,7 +5679,73 @@ "parameters": [ "Controllers[ControllerIdentifier].Buttons[Button].State", "=", - "\"Pressed\"" + "\"JustPressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is pressed on a multitouch controller.", + "fullName": "Multitouch controller button pressed", + "functionType": "Condition", + "name": "IsButtonPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"JustPressed\"" + ] + } ] } ], @@ -5788,7 +5777,7 @@ "objectGroups": [] }, { - "description": "Check if a button is released on a gamepad.", + "description": "Check if a button is released on a multitouch controller.", "fullName": "Multitouch controller button released", "functionType": "Condition", "name": "IsButtonReleased", @@ -5874,7 +5863,7 @@ { "description": "Button state", "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "supplementaryInformation": "[\"Idle\",\"Pressed\",\"JustPressed\",\"Released\"]", "type": "stringWithSelector" } ], @@ -7247,41 +7236,23 @@ "conditions": [ { "type": { - "value": "HasGameJustResumed" + "inverted": true, + "value": "SpriteMultitouchJoystick::IsInGameEdition" }, "parameters": [ + "", "" ] } ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Manage touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "HasAnyTouchOrMouseStarted" + "value": "HasGameJustResumed" }, "parameters": [ "" @@ -7291,171 +7262,207 @@ "actions": [ { "type": { - "value": "SetNumberVariable" + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" }, "parameters": [ - "TouchIndex", - "=", - "0" + "Object", + "Behavior", + "" ] } - ], + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Manage touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "TouchId", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "TouchId", - "=", - "StartedTouchOrMouseId(TouchIndex)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "TouchIndex", - "+", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "+", + "1" + ] + } ] } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "HasTouchEnded" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "", - "TouchId" - ] - } - ], - "actions": [ + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" + }, { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" - }, - "parameters": [ - "Object", - "Behavior", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update joystick position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ], + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update joystick position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "TouchId", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "Object", + "Behavior", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", + "" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" - ] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", - "" - ] - } - ] + "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -8283,18 +8290,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" }, { @@ -8302,17 +8303,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" }, @@ -8320,9 +8316,6 @@ "value": "0", "type": "Number", "label": "Joystick force (range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JoystickForce" }, @@ -8330,9 +8323,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -8340,9 +8330,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" } @@ -8350,7 +8337,7 @@ "sharedPropertyDescriptors": [] }, { - "description": "Detect button presses made on a touchscreen.", + "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", "name": "MultitouchButton", "objectType": "", @@ -8366,11 +8353,11 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::IsReleased" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "IsReleased", + "True", "" ] } @@ -8399,6 +8386,44 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Pressed\"", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -8462,11 +8487,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()))" ] @@ -8492,7 +8516,17 @@ "parameters": [ "Object", "Behavior", - "\"Pressed\"", + "\"JustPressed\"", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", "" ] } @@ -8563,6 +8597,16 @@ "" ] }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" + ] + }, { "type": { "value": "SetNumberVariable" @@ -8592,11 +8636,11 @@ "objectGroups": [] }, { - "description": "Check if button is released.", - "fullName": "Button released", + "description": "Check if the button was just pressed.", + "fullName": "Button just pressed", "functionType": "Condition", - "name": "IsReleased", - "sentence": "Button _PARAM0_ is released", + "name": "IsJustPressed", + "sentence": "Button _PARAM0_ was just pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -8606,7 +8650,7 @@ "value": "BooleanVariable" }, "parameters": [ - "IsReleased", + "IsJustPressed", "True", "" ] @@ -8640,7 +8684,7 @@ "objectGroups": [] }, { - "description": "Check if button is pressed.", + "description": "Check if the button is pressed.", "fullName": "Button pressed", "functionType": "Condition", "name": "IsPressed", @@ -8687,6 +8731,54 @@ ], "objectGroups": [] }, + { + "description": "Check if the button is released.", + "fullName": "Button released", + "functionType": "Condition", + "name": "IsReleased", + "sentence": "Button _PARAM0_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "fullName": "Button state", "functionType": "Action", @@ -8728,7 +8820,7 @@ { "description": "Button state", "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "supplementaryInformation": "[\"Idle\",\"JustPressed\",\"Pressed\",\"Released\"]", "type": "stringWithSelector" } ], @@ -8740,27 +8832,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" }, @@ -8768,9 +8851,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" }, @@ -8778,20 +8858,22 @@ "value": "", "type": "Boolean", "label": "Button released", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsReleased" }, + { + "value": "", + "type": "Boolean", + "label": "Button just pressed", + "hidden": true, + "name": "IsJustPressed" + }, { "value": "0", "type": "Number", "unit": "Pixel", "label": "Triggering circle radius", "description": "This circle adds up to the object collision mask.", - "group": "", - "extraInformation": [], "name": "Radius" } ], @@ -8802,6 +8884,7 @@ "fullName": "Platformer multitouch controller mapper", "name": "PlatformerMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -8979,184 +9062,40 @@ "value": "", "type": "Behavior", "label": "Platform character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], + "choices": [], "name": "Property" }, { "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", - "Secondary" - ], - "name": "JoystickIdentifier" - }, - { - "value": "A", - "type": "String", - "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], - "name": "JumpButton" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D platformer multitouch controller mapper", - "name": "Platformer3DMultitouchMapper", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ + "choices": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" - }, - "parameters": [ - "", - ">", - "0", - "ControllerIdentifier", - "JoystickIdentifier", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "=", - "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" - ] - }, - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateStick" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "-90", - "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" - ] - } - ] + "label": "Primary", + "value": "Primary" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::IsButtonPressed" - }, - "parameters": [ - "", - "ControllerIdentifier", - "JumpButton", - "\"Down\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] + "label": "Secondary", + "value": "Secondary" } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D physics character", - "description": "", - "group": "", - "extraInformation": [ - "Physics3D::PhysicsCharacter3D" - ], - "name": "PhysicsCharacter3D" - }, - { - "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", - "Secondary" - ], "name": "JoystickIdentifier" }, { "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -9164,9 +9103,153 @@ }, { "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D shooter multitouch controller mapper", - "name": "Shooter3DMultitouchMapper", + "fullName": "3D platformer multitouch controller mapper", + "name": "Platformer3DMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "=", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "-90", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D shooter multitouch controller mapper", + "name": "Shooter3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -9254,31 +9337,32 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { "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", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -9286,9 +9370,7 @@ "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -9299,6 +9381,7 @@ "fullName": "First person camera multitouch controller mapper", "name": "FirstPersonMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -10219,31 +10302,32 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { "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", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "CameraStick" }, @@ -10252,27 +10336,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" }, { @@ -10280,27 +10358,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" }, { @@ -10308,9 +10380,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Minimum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMin" }, { @@ -10318,9 +10388,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Maximum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMax" }, { @@ -10328,9 +10396,7 @@ "type": "Number", "unit": "Pixel", "label": "Z position offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -10338,9 +10404,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Z", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedZ" }, @@ -10349,20 +10412,196 @@ "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" + ], + "choices": [], + "name": "PhysicsCar3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Steer joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SteerJoystickIdentifier" + }, + { + "value": "Secondary", + "type": "Choice", + "label": "Speed joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "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": "", @@ -10873,31 +11112,31 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], + "choices": [], "name": "TopDownMovement" }, { "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" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -10905,12 +11144,20 @@ "value": "Analog", "type": "Choice", "label": "Stick mode", - "description": "", "group": "Controls", - "extraInformation": [ - "Analog", - "360°", - "8 Directions" + "choices": [ + { + "label": "Analog", + "value": "Analog" + }, + { + "label": "360°", + "value": "360°" + }, + { + "label": "8 Directions", + "value": "8 Directions" + } ], "name": "StickMode" } @@ -10931,6 +11178,112 @@ "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, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -11047,64 +11400,92 @@ "name": "doStepPostEvents", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreAutour" - }, - "parameters": [ - "Thumb", - "Border", - "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", - "Border.MultitouchJoystick::JoystickAngle()" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldBeHiddenWhenReleased", - "True", - "" - ] - }, { "type": { "inverted": true, - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" + "value": "SpriteMultitouchJoystick::IsInGameEdition" }, "parameters": [ - "Object", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Cache" - }, - "parameters": [ - "Object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "Thumb", + "Border", + "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", + "Border.MultitouchJoystick::JoystickAngle()" + ] + } ] }, { - "type": { - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" - }, - "parameters": [ - "Object", - "no", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "True", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" + }, + "parameters": [ + "Object", + "no", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "False", + "" + ] + } ] } ] @@ -11270,7 +11651,7 @@ }, "parameters": [ "ShouldBeHiddenWhenReleased", - "False", + "True", "" ] }, @@ -12039,20 +12420,21 @@ "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" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -12061,8 +12443,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" }, { @@ -12070,10 +12450,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -12082,8 +12462,6 @@ "type": "Number", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -12092,10 +12470,10 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbIsScaledProportionally" }, @@ -12104,8 +12482,6 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ParentOrigin" }, @@ -12113,117 +12489,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": [] } ] }, @@ -12238,17 +12508,17 @@ "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.7.0", + "version": "0.9.0", "description": [ - "Add support for gamepads (or other controllers).", + "Add support for gamepads (or other physical controllers).", "", "It gives access to:", - "- button presses", - "- axis positions and force", - "- trigger pressure", - "- configurable deadzone", - "- vibration", - "- automatic mappers for platformer characters and top-down movement", + "- button presses,", + "- axis positions and force,", + "- trigger pressure,", + "- configurable deadzone,", + "- vibration,", + "- automatic \"gamepad mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the gamepad (it works by reading the gamepad state and simulating controls). No need for additional events to make it work once the behaviors are set up.", "", "The Bomberman-like example handles 4 players with gamepads ([open the project online](https://editor.gdevelop.io/?project=example://goose-bomberman))." ], @@ -12270,11 +12540,59 @@ "authorIds": [ "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", "taRwmWxwAFYFL9yyBwB3cwBw0BO2", - "mnImQKdn8nQxwzkS5D6a1JB27V23" + "mnImQKdn8nQxwzkS5D6a1JB27V23", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "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": "", @@ -12282,83 +12600,323 @@ "name": "onFirstSceneLoaded", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Define an new private object javascript for the gamepad extension\r", - "gdjs._extensionController = {\r", - " players: {\r", - " 0: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 1: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 2: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 3: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + "if (gdjs._extensionController) {\r", + " return;\r", + "}\r", + "\r", + "/**\r", + " * Associate controller button ids to button names\r", + " */\r", + "const controllerButtonNames = {\r", + " \"XBOX\": {\r", + " 0: \"A\",\r", + " 1: \"B\",\r", + " 2: \"X\",\r", + " 3: \"Y\",\r", + " 4: \"LB\",\r", + " 5: \"RB\",\r", + " 6: \"LT\",\r", + " 7: \"RT\",\r", + " 8: \"BACK\",\r", + " 9: \"START\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"NONE\",\r", + " 17: \"NONE\"\r", " },\r", - " lastActiveController: -1, // Last active controller\r", - " controllerButtonNames: { //Map associating controller button ids to button names\r", - " \"XBOX\": {\r", - " 0: \"A\",\r", - " 1: \"B\",\r", - " 2: \"X\",\r", - " 3: \"Y\",\r", - " 4: \"LB\",\r", - " 5: \"RB\",\r", - " 6: \"LT\",\r", - " 7: \"RT\",\r", - " 8: \"BACK\",\r", - " 9: \"START\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"NONE\",\r", - " 17: \"NONE\"\r", - " },\r", - " \"PS4\": {\r", - " 0: \"CROSS\",\r", - " 1: \"CIRCLE\",\r", - " 2: \"SQUARE\",\r", - " 3: \"TRIANGLE\",\r", - " 4: \"L1\",\r", - " 5: \"R1\",\r", - " 6: \"L2\",\r", - " 7: \"R2\",\r", - " 8: \"SHARE\",\r", - " 9: \"OPTIONS\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"PS_BUTTON\",\r", - " 17: \"CLICK_TOUCHPAD\"\r", - " }\r", + " \"PS4\": {\r", + " 0: \"CROSS\",\r", + " 1: \"CIRCLE\",\r", + " 2: \"SQUARE\",\r", + " 3: \"TRIANGLE\",\r", + " 4: \"L1\",\r", + " 5: \"R1\",\r", + " 6: \"L2\",\r", + " 7: \"R2\",\r", + " 8: \"SHARE\",\r", + " 9: \"OPTIONS\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"PS_BUTTON\",\r", + " 17: \"CLICK_TOUCHPAD\"\r", " }\r", "};\r", "\r", - "gdjs._extensionController.getInputString = function (type, buttonId) {\r", - " const controllerButtonNames = gdjs._extensionController.controllerButtonNames;\r", - " if (controllerButtonNames[type] !== undefined) {\r", - " return controllerButtonNames[type][buttonId];\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getGamepad(playerId) {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " return gamepads[playerId];\r", + "}\r", + "\r", + "/** @type {{[playerId: number]: Player}} */\r", + "const players = {};\r", + "\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getPlayer(playerId) {\r", + " let player = players[playerId];\r", + " if (!player) {\r", + " player = new Player(playerId);\r", + " players[playerId] = player;\r", + " }\r", + " return player;\r", + "}\r", + "\r", + "class Player {\r", + " /** @type {number} */\r", + " playerId;\r", + " mapping = 'DEFAULT';\r", + " lastButtonUsed = -1;\r", + " deadzone = 0.2;\r", + " /** @type {{[buttonId: number]: ButtonState}} */\r", + " buttonStates = {};\r", + " rumble = { elapsedTime: 0, duration: 0, weakMagnitude: 0, strongMagnitude: 0 };\r", + "\r", + " /**\r", + " * @param {number} playerId\r", + " */\r", + " constructor(playerId) {\r", + " this.playerId = playerId;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " getButtonState(buttonId) {\r", + " let buttonState = this.buttonStates[buttonId];\r", + " if (!buttonState) {\r", + " buttonState = new ButtonState();\r", + " this.buttonStates[buttonId] = buttonState;\r", + " }\r", + " return buttonState;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isPressed;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonJustPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isJustPressed();\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonReleased(buttonId) {\r", + " return this.getButtonState(buttonId).isReleased();\r", " }\r", "\r", - " return \"UNKNOWN_BUTTON\";\r", + " isAnyButtonReleased() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isReleased()) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "\r", + " isAnyButtonPressed() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isPressed) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}\r", + "\r", + "class ButtonState {\r", + " wasPressed = false;\r", + " isPressed = false;\r", + "\r", + " isReleased() {\r", + " return this.wasPressed && !this.isPressed;\r", + " }\r", + "\r", + " isJustPressed() {\r", + " return !this.wasPressed && this.isPressed;\r", + " }\r", + "}\r", + "\r", + "// Async tasks are run before everything.\r", + "// This is a hack to make sure that button states are updated\r", + "// before mapping behavior events.\r", + "const frameBeginningTask = new class extends gdjs.AsyncTask {\r", + " update() {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " const gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + "\r", + " for (let buttonId = 0; buttonId < Object.keys(gamepad.buttons).length; buttonId++) {\r", + " const buttonState = player.getButtonState(buttonId);\r", + " buttonState.wasPressed = buttonState.isPressed;\r", + " buttonState.isPressed = gamepad.buttons[buttonId].pressed;\r", + " if (buttonState.isJustPressed()) {\r", + " player.lastButtonUsed = buttonId;\r", + " }\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}();\r", + "\r", + "function onScenePostEvents() {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " let gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + " const rumble = player.rumble;\r", + " rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;\r", + " if (rumble.duration - rumble.elapsedTime <= 0 &&\r", + " (rumble.weakMagnitude || rumble.strongMagnitude)\r", + " ) {\r", + " rumble.weakMagnitude = 0;\r", + " rumble.strongMagnitude = 0;\r", + " }\r", + " }\r", "}\r", "\r", - "gdjs._extensionController.axisToAngle = function (deltaX, deltaY) {\r", + "/**\r", + " * @param {string} type\r", + " * @param {number} buttonId\r", + " */\r", + "function getInputString(type, buttonId) {\r", + " if (!controllerButtonNames[type]) {\r", + " return \"UNKNOWN_BUTTON\";\r", + " }\r", + " return controllerButtonNames[type][buttonId];\r", + "}\r", + "\r", + "function getButtonId(buttonName) {\r", + " switch (buttonName) {\r", + " case 'A':\r", + " case 'CROSS':\r", + " return 0;\r", + " case 'B':\r", + " case 'CIRCLE':\r", + " return 1;\r", + " case 'X':\r", + " case 'SQUARE':\r", + " return 2;\r", + " case 'Y':\r", + " case 'TRIANGLE':\r", + " return 3;\r", + " case 'LB':\r", + " case 'L1':\r", + " return 4;\r", + " case 'RB':\r", + " case 'R1':\r", + " return 5;\r", + " case 'LT':\r", + " case 'L2':\r", + " return 6;\r", + " case 'RT':\r", + " case 'R2':\r", + " return 7;\r", + " case 'UP':\r", + " return 12;\r", + " case 'DOWN':\r", + " return 13;\r", + " case 'LEFT':\r", + " return 14;\r", + " case 'RIGHT':\r", + " return 15;\r", + " case 'BACK':\r", + " case 'SHARE':\r", + " return 8;\r", + " case 'START':\r", + " case 'OPTIONS':\r", + " return 9;\r", + " case 'CLICK_STICK_LEFT':\r", + " return 10;\r", + " case 'CLICK_STICK_RIGHT':\r", + " return 11;\r", + " //PS4\r", + " case 'PS_BUTTON':\r", + " return 16;\r", + " case 'CLICK_TOUCHPAD':\r", + " return 17;\r", + " default:\r", + " console.error('The gamepad button: ' + buttonName + ' is not valid.');\r", + " return null;\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {number} playerId\r", + " * @param {string} directionName\r", + " * @param {number} axisValueX\r", + " * @param {number} axisValueY\r", + " */\r", + "function isAxisPushed(playerId, directionName, axisValueX, axisValueY) {\r", + " switch (directionName) {\r", + " case 'LEFT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0;\r", + " case 'RIGHT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) > 0;\r", + " case 'UP':\r", + " return getNormalizedAxisValue(axisValueY, playerId) < 0;\r", + " case 'DOWN':\r", + " return getNormalizedAxisValue(axisValueY, playerId) > 0;\r", + " case 'ANY':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueX, playerId) > 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) > 0\r", + " default:\r", + " console.error('The value stick direction is not valid.');\r", + " return false;\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {number} deltaX\r", + " * @param {number} deltaY\r", + " */\r", + "function axisToAngle(deltaX, deltaY) {\r", " const rad = Math.atan2(deltaY, deltaX);\r", " const deg = rad * (180 / Math.PI);\r", " return deg;\r", "}\r", "\r", - "gdjs._extensionController.isXbox = function (gamepad) {\r", + "/**\r", + " * @param {{id: string}} gamepad\r", + " */\r", + "function isXbox(gamepad) {\r", " return (gamepad ? (\r", " gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r", " // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r", @@ -12367,44 +12925,52 @@ " ) : false);\r", "}\r", "\r", - "//Returns the new value taking into account the dead zone for the player_ID given\r", - "gdjs._extensionController.getNormalizedAxisValue = function (v, player_ID) {\r", + "/**\r", + " * Returns the new value taking into account the dead zone for the player_ID given\r", + " * @param {number} value\r", + " * @param {number} playerID\r", + " */\r", + "function getNormalizedAxisValue(value, playerID) {\r", " // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r", "\r", " // Anything smaller than this is assumed to be 0,0\r", - " const DEADZONE = gdjs._extensionController.players[player_ID].deadzone;\r", - "\r", - " if (Math.abs(v) < DEADZONE) {\r", - " // In the dead zone, set to 0\r", - " v = 0;\r", - "\r", - " if (v == null) {\r", - " return 0;\r", - " } else {\r", - " return v;\r", - " }\r", + " const deadzone = getPlayer(playerID).deadzone;\r", "\r", + " if (Math.abs(value) < deadzone) {\r", + " return 0;\r", " } else {\r", " // We're outside the dead zone, but we'd like to smooth\r", " // this value out so it still runs nicely between 0..1.\r", " // That is, we don't want it to jump suddenly from 0 to\r", - " // DEADZONE.\r", + " // deadzone.\r", "\r", - " // Remap v from\r", - " // DEADZONE..1 to 0..(1-DEADZONE)\r", + " // Remap value from\r", + " // deadzone..1 to 0..(1-deadzone)\r", " // or from\r", - " // -1..-DEADZONE to -(1-DEADZONE)..0\r", + " // -1..-deadzone to -(1-deadzone)..0\r", + " value = value - Math.sign(value) * deadzone;\r", "\r", - " v = v - Math.sign(v) * DEADZONE;\r", - "\r", - " // Remap v from\r", - " // 0..(1-DEADZONE) to 0..1\r", + " // Remap value from\r", + " // 0..(1-deadzone) to 0..1\r", " // or from\r", - " // -(1-DEADZONE)..0 to -1..0\r", - "\r", - " return v / (1 - DEADZONE);\r", + " // -(1-deadzone)..0 to -1..0\r", + " return value / (1 - deadzone);\r", " }\r", - "};" + "}\r", + "\r", + "gdjs._extensionController = {\r", + " getPlayer,\r", + " controllerButtonNames,\r", + " getInputString,\r", + " getButtonId,\r", + " axisToAngle,\r", + " isXbox,\r", + " getNormalizedAxisValue,\r", + " isAxisPushed,\r", + " getGamepad,\r", + " onScenePostEvents,\r", + " frameBeginningTask,\r", + "}" ], "parameterObjects": "", "useStrict": true, @@ -12417,59 +12983,35 @@ { "fullName": "", "functionType": "Action", - "name": "onScenePostEvents", + "name": "onSceneLoaded", "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// Async tasks are run before everything.\r", + "// This is a hack to make sure that button states are updated\r", + "// before mapping behavior events.\r", + "runtimeScene.getAsyncTasksManager().addTask(gdjs._extensionController.frameBeginningTask);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Each time a player press a button i save the last button pressed for the next frame", - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "let countPlayers = Object.keys(gdjs._extensionController.players).length;", - "", - "//Repeat for each players", - "for (let i = 0; i < countPlayers; i++) {", - " let gamepad = gamepads[i]; // Get the gamepad of the player", - "", - " //We have to keep this condition because if the user hasn't plugged in his controller yet, we can't get the controller in the gamepad variable.", - " if (gamepad == null) {", - " continue;", - " }", - "", - " for (let b = 0; b < Object.keys(gamepad.buttons).length; b++) { //For each buttons", - " if (gamepad.buttons[b].pressed) { //One of them is pressed", - " gdjs._extensionController.players[i].lastButtonUsed = b; //Save the button pressed", - "", - " //Save the state of the button for the next frame.", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: true };", - "", - " // Update Last Active Controller", - " gdjs._extensionController.lastActiveController = i;", - " } else {", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: false };", - " }", - " }", - "", - "", - " gdjs._extensionController.players[i].rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;", - " if (", - " gdjs._extensionController.players[i].rumble.duration - gdjs._extensionController.players[i].rumble.elapsedTime <= 0 &&", - " (gdjs._extensionController.players[i].rumble.weakMagnitude || gdjs._extensionController.players[i].rumble.strongMagnitude)", - " ) {", - " gdjs._extensionController.players[i].rumble.weakMagnitude = 0;", - " gdjs._extensionController.players[i].rumble.strongMagnitude = 0;", - " }", - "", - "", - "}", + "gdjs._extensionController.onScenePostEvents();", "" ], "parameterObjects": "", @@ -12907,27 +13449,20 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const trigger = eventsFunctionContext.getArgument(\"trigger\").toUpperCase();\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const trigger = eventsFunctionContext.getArgument(\"Trigger\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Pressure on a gamepad trigger\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r", " console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "switch (trigger) {\r", " case 'LT':\r", " case 'L2':\r", @@ -12955,12 +13490,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Trigger button", - "name": "trigger", + "name": "Trigger", "supplementaryInformation": "[\"LT\",\"RT\",\"L2\",\"R2\"]", "type": "stringWithSelector" } @@ -12977,43 +13512,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick force\"');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r", " return;\r", "}\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId)), 0, 1);\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId)), 0, 1);\r", - " break;\r", - "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(\r", + " Math.abs(getNormalizedAxisValue(axisValueX, playerId)) +\r", + " Math.abs(getNormalizedAxisValue(axisValueY, playerId)), 0, 1);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -13026,12 +13546,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -13055,7 +13575,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Gamepads::StickAngle(player_ID, stick)" + "Gamepads::StickAngle(PlayerId, Stick)" ] } ] @@ -13067,12 +13587,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -13089,40 +13609,27 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick rotation\"');\r", - " return;\r", - "}\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId));\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId));\r", - " break;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(\r", + " getNormalizedAxisValue(axisValueX, playerId),\r", + " getNormalizedAxisValue(axisValueY, playerId));" ], "parameterObjects": "", "useStrict": true, @@ -13135,12 +13642,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -13158,18 +13665,11 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", @@ -13178,11 +13678,12 @@ " console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "let parameterError = false;\r", "switch (stick) {\r", " case 'LEFT':\r", @@ -13279,7 +13780,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -13307,26 +13808,20 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", "const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", - " return;\r", - "}\r", "if (stick != \"left\" && stick != \"right\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "const axisIndex = stick === 'right' ? 2 : 0;\r", "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", "" @@ -13364,26 +13859,20 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", "const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", - " return;\r", - "}\r", "if (stick != \"left\" && stick != \"right\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "const axisIndex = stick === 'right' ? 3 : 1;\r", "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", "" @@ -13421,136 +13910,57 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button released\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button released\"');\r", + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonReleased(buttonId);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "PlayerId", + "type": "expression" + }, + { + "description": "Name of the button", + "name": "Button", + "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button was just pressed on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".", + "fullName": "Gamepad button just pressed", + "functionType": "Condition", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ was just pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", - "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", - "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button released\" is not valid.');\r", - " break;\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "//Define default value on pressed button or use previous value\r", - "gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "//Get state of button at previous frame\r", - "const previousStateButton = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "//When previousStateButton is true and actual button state is not pressed\r", - "//Player have release the button\r", - "if (previousStateButton === true && gamepad.buttons[buttonId].pressed === false) {\r", - " // Save the last button used for the player \r", - " gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - " eventsFunctionContext.returnValue = true;\r", - "\r", - "} else {\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - " eventsFunctionContext.returnValue = false;\r", - "}\r", - "" + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonJustPressed(buttonId);" ], "parameterObjects": "", "useStrict": true, @@ -13560,12 +13970,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Name of the button", - "name": "button", + "name": "Button", "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", "type": "stringWithSelector" } @@ -13582,17 +13992,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "//Player id is not valid\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Last pressed button (id)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "\r", - "//Return the last button used by the player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].lastButtonUsed;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;" ], "parameterObjects": "", "useStrict": true, @@ -13605,7 +14007,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -13621,46 +14023,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Any gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "for (let i = 0; i < gamepad.buttons.length; i++) { //For each buttons\r", - " if (gamepad.buttons[i].pressed) { //One of them is pressed\r", - " buttonId = i; //Save the button pressed\r", - " break;\r", - " }\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " // No buttons are pressed.\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Any gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonPressed();\r", "" ], "parameterObjects": "", @@ -13671,7 +14037,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -13687,35 +14053,18 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in string expression: \"Last pressed button (LastButtonString)\", is not valid number, must be between 0 and 4.');\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "if (controllerType === \"\") {\r", - " console.error('Parameter controller type is not valid in string expression: \"Last pressed button (LastButtonString)\"');\r", - " return;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "if (gamepad !== null) { //Gamepad exist\r", - " //Get last btn id\r", - " const lastButtonUsedID = gdjs._extensionController.players[playerId].lastButtonUsed;\r", - "\r", - " //Return last button as string \r", - " eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", - "\r", - "} else { //Gamepad dosen't exist\r", - " console.error('Your controller is not supported or the gamepad wasn\\'t detected in string expression: \"Last pressed button (LastButtonString)\"');\r", - " eventsFunctionContext.returnValue = \"Gamepad not connected\";\r", - "}" + "const lastButtonUsedID = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -13728,7 +14077,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -13750,20 +14099,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get the last activated controller\r", - "const controllerId = gdjs._extensionController.lastActiveController;\r", - "\r", - "// Check if controller is active\r", - "const gamepad = gamepads[controllerId];\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = 0;\r", - "} else {\r", - " // Return active controller id\r", - " eventsFunctionContext.returnValue = controllerId + 1;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let lastGamepadIndex = -1;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " lastGamepadIndex = playerId\r", + " }\r", "}\r", - "" + "eventsFunctionContext.returnValue = lastGamepadIndex + 1;" ], "parameterObjects": "", "useStrict": true, @@ -13786,127 +14131,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", - "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", - "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button pressed\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - "}\r", - "\r", - "\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "const buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", - "\r", - "\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonPressed(buttonId);\r", "" ], "parameterObjects": "", @@ -13917,7 +14151,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -13944,15 +14178,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Gamepad deadzone for sticks\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "///Return the deadzone value for a given player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].deadzone;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).deadzone;" ], "parameterObjects": "", "useStrict": true, @@ -13965,7 +14193,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -13981,18 +14209,12 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in action: \"Set gamepad deadzone for sticks\", is not valid, must be between 0 and 4.');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "// clamp the newDeadzone in range [0, 1].\r", "// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r", - "gdjs._extensionController.players[playerId].deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", + "gdjs._extensionController.getPlayer(playerId).deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", "" ], "parameterObjects": "", @@ -14003,7 +14225,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14024,141 +14246,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad stick pushed (axis)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r", " return;\r", "}\r", "if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r", - " console.error('Parameter deadzone in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", + " console.error('Parameter direction in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = false;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "\r", - "\r", - "//Define in onFirstSceneLoaded function\r", - "const getNormalizedAxisValue = gdjs._extensionController.getNormalizedAxisValue;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[0], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[0], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Left on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[2], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[2], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Right on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Stick on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - "}\r", - "\r", - "eventsFunctionContext.returnValue = false;\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.isAxisPushed(playerId, direction, axisValueX, axisValueY);\r", "" ], "parameterObjects": "", @@ -14169,7 +14278,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14189,24 +14298,24 @@ }, { "description": "Return the number of connected gamepads.", - "fullName": "Connected gamepads number", + "fullName": "Connected gamepads count", "functionType": "Expression", "name": "ConnectedGamepadsCount", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "// Gamepads can be disconnected and become null, so we have to filter them.\r", - "eventsFunctionContext.returnValue = Object.keys(gamepads).filter(key => !!gamepads[key]).length;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let connectedGamepadCount = 0;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " connectedGamepadCount++;\r", + " }\r", + "}\r", + "eventsFunctionContext.returnValue = connectedGamepadCount;\r", "" ], "parameterObjects": "", @@ -14230,22 +14339,13 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in string expression: \"Gamepad type\", is not valid number, must be between 0 and 4');", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)", "" ], @@ -14260,7 +14360,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -14276,28 +14376,14 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad type\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (controllerType === \"\") {", - " console.error('Parameter type in condition: \"Gamepad type\", is not a string.');", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "", "if (controllerType == \"XBOX\") {", " eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);", "} else {", @@ -14312,7 +14398,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14333,17 +14419,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];", "// If gamepad was disconnected it will be null (so this will return false)", "// If gamepad was never connected it will be undefined (so this will return false)", "eventsFunctionContext.returnValue = !!gamepads[playerId];" @@ -14356,7 +14434,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -14372,25 +14450,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -14407,7 +14476,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14428,35 +14497,19 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -14464,11 +14517,11 @@ " strongMagnitude: strongRumbleMagnitude", " });", "}", - "", - "gdjs._extensionController.players[playerId].rumble.duration = duration;", - "gdjs._extensionController.players[playerId].rumble.elapsedTime = 0;", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "const player = gdjs._extensionController.getPlayer(playerId)", + "player.rumble.duration = duration;", + "player.rumble.elapsedTime = 0;", + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -14478,7 +14531,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14509,39 +14562,22 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", - "const elapsedTime = gdjs._extensionController.players[playerId].rumble.elapsedTime || 0;", - "const originalDuration = gdjs._extensionController.players[playerId].rumble.duration || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "const player = gdjs._extensionController.getPlayer(playerId);", + "const elapsedTime = player.rumble.elapsedTime || 0;", + "const originalDuration = player.rumble.duration || 1;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "if (originalDuration - elapsedTime <= 0) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: 1000 * (originalDuration - elapsedTime),", @@ -14550,8 +14586,8 @@ " });", "}", "", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -14561,7 +14597,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14592,54 +14628,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - "\tconsole.error('Parameter gamepad identifier in condition: \"Any gamepad button released\", is not valid number, must be between 0 and 4.');\r", - "\treturn;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "for (let buttonId = 0; buttonId < gamepad.buttons.length; buttonId++) { //For each buttons on current frame.\r", - "\r", - "\tif (buttonId === undefined) {\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t\treturn;\r", - "\t}\r", "\r", - "\t//Get previous value or define value by default for the current button\r", - "\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "\t//Get state of the button at previous frame\r", - "\tconst previousStateButtonIsPressed = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "\t//Get the state of the button on the current frame.\r", - "\tconst currentFrameStateButtonIsPressed = gamepad.buttons[buttonId].pressed;\r", - "\r", - "\t//When previousStateButtonIsPressed is true and actual button state is not pressed\r", - "\t//Player have release the button\r", - "\tif (previousStateButtonIsPressed === true && currentFrameStateButtonIsPressed === false) {\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - "\t\teventsFunctionContext.returnValue = true;\r", - "\t\t//break;\r", - "\t\treturn;\r", - "\t} else {\r", - "\t\t//The player didn't released the button yet, the previous frame state is still true\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t}\r", - "\r", - "\tif (currentFrameStateButtonIsPressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "}\r", - "" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonReleased();" ], "parameterObjects": "", "useStrict": true, @@ -14649,7 +14641,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -14665,8 +14657,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.weakMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.weakMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -14679,7 +14671,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -14695,8 +14687,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.strongMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.strongMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -14709,7 +14701,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -14722,6 +14714,7 @@ "fullName": "Platformer gamepad mapper", "name": "PlatformerGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -15161,275 +15154,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"B or Circle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"B\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"RT or R2\"" - ] - }, { "type": { "value": "Gamepads::C_Button_pressed" @@ -15437,7 +15161,7 @@ "parameters": [ "", "GamepadIdentifier", - "\"RT\"", + "Buttons[JumpButton]", "\"Left\"" ] } @@ -15478,64 +15202,77 @@ "value": "", "type": "Behavior", "label": "Platformer character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], + "choices": [], "name": "PlatformerCharacter" }, { "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", - "B or Circle", - "X or Square", - "Y or Triangle", - "LB or L1", - "RB or R1", - "LT or L2", - "RT or R2" + "choices": [ + { + "label": "A or Cross", + "value": "A or Cross" + }, + { + "label": "B or Circle", + "value": "B or Circle" + }, + { + "label": "X or Square", + "value": "X or Square" + }, + { + "label": "Y or Triangle", + "value": "Y or Triangle" + }, + { + "label": "LB or L1", + "value": "LB or L1" + }, + { + "label": "RB or R1", + "value": "RB or R1" + }, + { + "label": "LT or L2", + "value": "LT or L2" + }, + { + "label": "RT or R2", + "value": "RT or R2" + } ], "name": "JumpButton" } @@ -15547,6 +15284,7 @@ "fullName": "3D platformer gamepad mapper", "name": "Platformer3DGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -15615,275 +15353,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"RT or R2\"" - ] - }, { "type": { "value": "Gamepads::C_Button_pressed" @@ -15891,7 +15360,7 @@ "parameters": [ "", "GamepadIdentifier", - "\"RT\"", + "Buttons[JumpButton]", "\"Left\"" ] } @@ -15932,31 +15401,32 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { "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", - "Right" + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } ], "name": "JoystickIdentifier" }, @@ -15964,17 +15434,40 @@ "value": "A or Cross", "type": "Choice", "label": "Jump button", - "description": "", "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" + "choices": [ + { + "label": "A or Cross", + "value": "A or Cross" + }, + { + "label": "B or Circle", + "value": "B or Circle" + }, + { + "label": "X or Square", + "value": "X or Square" + }, + { + "label": "Y or Triangle", + "value": "Y or Triangle" + }, + { + "label": "LB or L1", + "value": "LB or L1" + }, + { + "label": "RB or R1", + "value": "RB or R1" + }, + { + "label": "LT or L2", + "value": "LT or L2" + }, + { + "label": "RT or R2", + "value": "RT or R2" + } ], "name": "JumpButton" } @@ -15986,6 +15479,7 @@ "fullName": "3D shooter gamepad mapper", "name": "Shooter3DGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -16043,16 +15537,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"A or Cross\"" - ] - }, { "type": { "value": "Gamepads::C_Button_pressed" @@ -16060,7 +15544,7 @@ "parameters": [ "", "GamepadIdentifier", - "\"A\"", + "Buttons[JumpButton]", "\"Left\"" ] } @@ -16076,407 +15560,178 @@ ] } ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Gamepads::Shooter3DGamepadMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Gamepad identifier (1, 2, 3 or 4)", + "name": "GamepadIdentifier" + }, + { + "value": "Left", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } + ], + "name": "WalkStick" + }, + { + "value": "Right", + "type": "Choice", + "label": "Camera joystick", + "group": "Controls", + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } + ], + "name": "CameraStick" + }, + { + "value": "A or Cross", + "type": "Choice", + "label": "Jump button", + "group": "Controls", + "choices": [ + { + "label": "A or Cross", + "value": "A or Cross" + }, + { + "label": "B or Circle", + "value": "B or Circle" + }, + { + "label": "X or Square", + "value": "X or Square" + }, + { + "label": "Y or Triangle", + "value": "Y or Triangle" + }, + { + "label": "LB or L1", + "value": "LB or L1" + }, + { + "label": "RB or R1", + "value": "RB or R1" + }, + { + "label": "LT or L2", + "value": "LT or L2" + }, + { + "label": "RT or R2", + "value": "RT or R2" + } + ], + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control camera rotations with a gamepad.", + "fullName": "First person camera gamepad mapper", + "name": "FirstPersonGamepadMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "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": "TODO It's probably a bad idea to rotate the object around Y." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentRotationSpeedZ", + "=", + "Gamepads::AcceleratedSpeed(CurrentRotationSpeedZ, Gamepads::StickForceX(GamepadIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"B or Circle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"B\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "+", + "CurrentRotationSpeedZ * TimeDelta()" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"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": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"RT or R2\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"RT\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Gamepads::Shooter3DGamepadMapper", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D physics character", - "description": "", - "group": "", - "extraInformation": [ - "Physics3D::PhysicsCharacter3D" - ], - "name": "PhysicsCharacter3D" - }, - { - "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", - "Right" - ], - "name": "WalkStick" - }, - { - "value": "Right", - "type": "Choice", - "label": "Camera joystick", - "description": "", - "group": "Controls", - "extraInformation": [ - "Left", - "Right" - ], - "name": "CameraStick" - }, - { - "value": "A or Cross", - "type": "Choice", - "label": "Jump button", - "description": "", - "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": "JumpButton" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control camera rotations with a gamepad.", - "fullName": "First person camera gamepad mapper", - "name": "FirstPersonGamepadMapper", - "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": "TODO It's probably a bad idea to rotate the object around Y." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "CurrentRotationSpeedZ", - "=", - "Gamepads::AcceleratedSpeed(CurrentRotationSpeedZ, Gamepads::StickForceX(GamepadIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)" - ] - }, - { - "type": { - "value": "SetAngle" - }, - "parameters": [ - "Object", - "+", - "CurrentRotationSpeedZ * TimeDelta()" - ] - }, - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "CurrentRotationSpeedY", - "=", - "Gamepads::AcceleratedSpeed(CurrentRotationSpeedY, Gamepads::StickForceY(GamepadIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)" + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentRotationSpeedY", + "=", + "Gamepads::AcceleratedSpeed(CurrentRotationSpeedY, Gamepads::StickForceY(GamepadIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)" ] }, { @@ -17346,31 +16601,31 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { "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" + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } ], "name": "CameraStick" }, @@ -17379,27 +16634,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" }, { @@ -17407,27 +16656,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" }, { @@ -17435,9 +16678,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Minimum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMin" }, { @@ -17445,9 +16686,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Maximum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMax" }, { @@ -17455,9 +16694,7 @@ "type": "Number", "unit": "Pixel", "label": "Z position offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -17465,9 +16702,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Z", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedZ" }, @@ -17476,20 +16710,388 @@ "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 gamepad.", + "fullName": "3D car gamepad mapper", + "name": "PhysicsCar3DGamepadMapper", + "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", + "" + ] + } + ], + "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", + "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" + ], + "choices": [], + "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", + "choices": [ + { + "label": "A or Cross", + "value": "A or Cross" + }, + { + "label": "B or Circle", + "value": "B or Circle" + }, + { + "label": "X or Square", + "value": "X or Square" + }, + { + "label": "Y or Triangle", + "value": "Y or Triangle" + }, + { + "label": "LB or L1", + "value": "LB or L1" + }, + { + "label": "RB or R1", + "value": "RB or R1" + }, + { + "label": "LT or L2", + "value": "LT or L2" + }, + { + "label": "RT or R2", + "value": "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": "", @@ -18071,59 +17673,57 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], + "choices": [], "name": "TopDownMovement" }, { "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", - "360°", - "8 Directions" + "choices": [ + { + "label": "Analog", + "value": "Analog" + }, + { + "label": "360°", + "value": "360°" + }, + { + "label": "8 Directions", + "value": "8 Directions" + } ], "name": "StickMode" } @@ -19666,9 +19266,7 @@ "type": "Number", "unit": "Pixel", "label": "Radius of the movement on X axis", - "description": "", "group": "Ellipse", - "extraInformation": [], "name": "RadiusX" }, { @@ -19676,9 +19274,7 @@ "type": "Number", "unit": "Pixel", "label": "Radius of the movement on Y axis", - "description": "", "group": "Ellipse", - "extraInformation": [], "name": "RadiusY" }, { @@ -19686,18 +19282,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" }, { @@ -19705,18 +19297,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" }, { @@ -19724,18 +19312,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" }, @@ -19743,9 +19326,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CenterY" }, @@ -19753,9 +19333,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MovementAngle" }, @@ -19763,9 +19340,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -19773,9 +19347,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" } @@ -19796,7 +19367,7 @@ "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.4.1", + "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", @@ -19833,6 +19404,7 @@ "fullName": "Smooth Camera", "name": "SmoothCamera", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -20777,44 +20349,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" ] @@ -21127,7 +20695,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "FollowFreeAreaTop", + "FollowFreeAreaRight", "=", "max(0, Value)" ] @@ -21172,7 +20740,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "FollowFreeAreaTop", + "FollowFreeAreaLeft", "=", "max(0, Value)" ] @@ -21328,7 +20896,7 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", + "description": "Leftward maximum speed (in pixels per second)", "name": "Value", "type": "expression" } @@ -21352,7 +20920,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "LeftwardSpeedMax", + "RightwardSpeedMax", "=", "max(0, Value)" ] @@ -21878,18 +21446,6 @@ "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": [], @@ -21931,6 +21487,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": [], @@ -23031,22 +22599,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" ] @@ -23260,22 +22826,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" ] @@ -24241,54 +23805,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" }, { @@ -24296,9 +23846,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area left border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaLeft" }, @@ -24307,9 +23855,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area right border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaRight" }, @@ -24318,9 +23864,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaTop" }, @@ -24329,9 +23873,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaBottom" }, @@ -24340,9 +23882,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset X", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetX" }, @@ -24351,9 +23891,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset Y", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetY" }, @@ -24362,9 +23900,7 @@ "type": "Number", "unit": "Second", "label": "Camera delay", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "CameraDelay" }, @@ -24373,9 +23909,7 @@ "type": "Number", "unit": "Second", "label": "Forecast time", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastTime" }, @@ -24384,9 +23918,7 @@ "type": "Number", "unit": "Second", "label": "Forecast history duration", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastHistoryDuration" }, @@ -24394,9 +23926,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogLeftwardSpeed" }, @@ -24404,9 +23933,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogRightwardSpeed" }, @@ -24414,9 +23940,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogDownwardSpeed" }, @@ -24424,9 +23947,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogUpwardSpeed" }, @@ -24434,9 +23954,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterX" }, @@ -24444,9 +23961,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterY" }, @@ -24454,9 +23968,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanX" }, @@ -24464,9 +23975,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanY" }, @@ -24474,9 +23982,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceX" }, @@ -24484,9 +23989,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryCovariance" }, @@ -24494,9 +23996,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearA" }, @@ -24504,9 +24003,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearB" }, @@ -24514,9 +24010,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedX" }, @@ -24524,9 +24017,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedY" }, @@ -24534,9 +24024,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestX" }, @@ -24544,9 +24031,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestY" }, @@ -24554,9 +24038,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestX" }, @@ -24564,9 +24045,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestY" }, @@ -24574,9 +24052,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceY" }, @@ -24584,9 +24059,6 @@ "value": "", "type": "Number", "label": "Index (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" }, @@ -24594,9 +24066,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpSpeed" }, @@ -24604,9 +24073,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraExtraDelay" }, @@ -24614,9 +24080,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedXMax" }, @@ -24624,9 +24087,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedYMax" }, @@ -24634,9 +24094,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingEnd" }, @@ -24644,9 +24101,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpDuration" }, @@ -24655,9 +24109,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Leftward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "LeftwardSpeedMax" }, @@ -24666,9 +24118,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Rightward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "RightwardSpeedMax" }, @@ -24677,9 +24127,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "UpwardSpeedMax" }, @@ -24688,9 +24136,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "DownwardSpeedMax" }, @@ -24698,9 +24144,6 @@ "value": "", "type": "Number", "label": "OldX (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -24708,9 +24151,6 @@ "value": "", "type": "Number", "label": "OldY (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -24718,9 +24158,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCalledManually" } @@ -24732,6 +24169,7 @@ "fullName": "Smooth platformer camera", "name": "SmoothPlatformerCamera", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -24953,31 +24391,26 @@ "value": "", "type": "Behavior", "label": "Platformer character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], + "choices": [], "name": "PlatformerCharacter" }, { "value": "", "type": "Behavior", "label": "Smooth camera behavior", - "description": "", - "group": "", "extraInformation": [ "SmoothCamera::SmoothCamera" ], + "choices": [], "name": "SmoothCamera" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JumpOriginY" }, @@ -24986,9 +24419,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaTop" }, { @@ -24996,9 +24427,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaBottom" }, { @@ -25006,9 +24435,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top on the floor", - "description": "", "group": "Position", - "extraInformation": [], "name": "FloorFollowFreeAreaTop" }, { @@ -25016,45 +24443,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" }, { @@ -25062,9 +24479,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirUpwardSpeedMax" }, { @@ -25072,9 +24487,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirDownwardSpeedMax" }, { @@ -25082,9 +24495,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorUpwardSpeedMax" }, { @@ -25092,9 +24503,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorDownwardSpeedMax" } ], @@ -25114,7 +24523,7 @@ "name": "HedgehogPlatformer", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Space/9ea467d2404c1736b87d763c884e9b9dfb13a401360f69c6a17afc8f5d583d58_Space_warp_galaxy.svg", "shortDescription": "Jump and run on platforms at 360°.", - "version": "1.1.1", + "version": "1.1.3", "description": [ "A platformer engine for Sonic-like games.", "", @@ -26880,11 +26289,10 @@ }, { "type": { - "value": "HedgehogPlatformer::HedgehogCharacter::PropertyGroundSpeed" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "GroundSpeed", "!=", "0" ] @@ -35917,7 +35325,7 @@ ], "parameterObjects": "Object", "useStrict": true, - "eventsSheetExpanded": false + "eventsSheetExpanded": true }, { "type": "BuiltinCommonInstructions::Standard", @@ -36179,9 +35587,6 @@ "value": "true", "type": "Boolean", "label": "Default controls", - "description": "", - "group": "", - "extraInformation": [], "name": "IsDefaultControlsEnabled" }, { @@ -36190,17 +35595,13 @@ "unit": "PixelSpeed", "label": "Max speed", "description": "The maximum speed obtained with input.", - "group": "", - "extraInformation": [], "name": "MaxSpeed" }, { "value": "true", "type": "Boolean", "label": "Rotate", - "description": "", "group": "Rotation", - "extraInformation": [], "advanced": true, "name": "ShouldRotate" }, @@ -36209,9 +35610,7 @@ "type": "Number", "unit": "AngularSpeed", "label": "Rotation speed when falling", - "description": "", "group": "Rotation", - "extraInformation": [], "advanced": true, "name": "FallingRotationSpeed" }, @@ -36220,9 +35619,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Jump speed", - "description": "", "group": "Jump", - "extraInformation": [], "name": "JumpSpeed" }, { @@ -36231,7 +35628,6 @@ "label": "Jump height reducer (0 to 1)", "description": "Vertical speed is multiplied by this value when the jump key is released during a jump.", "group": "Jump", - "extraInformation": [], "name": "JumpHeightReducer" }, { @@ -36239,9 +35635,7 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Gravity", - "description": "", "group": "Jump", - "extraInformation": [], "name": "Gravity" }, { @@ -36249,9 +35643,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Max falling speed", - "description": "", "group": "Jump", - "extraInformation": [], "name": "MaxFallingSpeed" }, { @@ -36260,7 +35652,6 @@ "label": "Ceil bounce factor (-1 to 1)", "description": "0: set the vertical speed to 0, 1: keep the speed, -1: bounce.", "group": "Jump", - "extraInformation": [], "name": "CeilBounceFactor" }, { @@ -36270,7 +35661,6 @@ "label": "Air drag", "description": "The air drag reduce the speed on X axis.", "group": "Air control", - "extraInformation": [], "name": "AirDrag" }, { @@ -36278,9 +35668,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Air drag min speed Y", - "description": "", "group": "Air control", - "extraInformation": [], "name": "AirDragMinSpeedY" }, { @@ -36288,9 +35676,7 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Air acceleration", - "description": "", "group": "Air control", - "extraInformation": [], "name": "AirAcceleration" }, { @@ -36298,9 +35684,7 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Ground acceleration", - "description": "", "group": "Run", - "extraInformation": [], "name": "GroundAcceleration" }, { @@ -36310,7 +35694,6 @@ "label": "Deceleration", "description": "When changing of direction on the ground.", "group": "Run", - "extraInformation": [], "name": "Deceleration" }, { @@ -36320,7 +35703,6 @@ "label": "Friction", "description": "When there is no input.", "group": "Run", - "extraInformation": [], "name": "Friction" }, { @@ -36330,7 +35712,6 @@ "label": "Downwards slope factor", "description": "Speed gain when moving downwards.", "group": "Ground", - "extraInformation": [], "name": "DownSlopeFactor" }, { @@ -36340,7 +35721,6 @@ "label": "Upwards slope factor", "description": "Speed loss when moving upwards.", "group": "Ground", - "extraInformation": [], "name": "UpSlopeFactor" }, { @@ -36350,7 +35730,6 @@ "label": "Slip duration", "description": "Time needed for the platformer to regain control after slipping down a slope.", "group": "Ground", - "extraInformation": [], "name": "SlipDuration" }, { @@ -36360,7 +35739,6 @@ "label": "Stand max angle", "description": "Allow characters to fully stop on not too steep floors.", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "StandMaxAngle" }, @@ -36369,9 +35747,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Min angle for ground slipping", - "description": "", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "SlipMinAngle" }, @@ -36380,9 +35756,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Min angle for ground unattaching", - "description": "", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "UnattachMinAngle" }, @@ -36391,9 +35765,7 @@ "type": "Number", "unit": "Pixel", "label": "Min speed for ground unattach", - "description": "", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "UnattachMinSpeed" }, @@ -36403,7 +35775,6 @@ "label": "Min floor magnet distance (in character height per seconds)", "description": "At low speeds.", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "FloorMagnetDistanceMin" }, @@ -36413,7 +35784,6 @@ "label": "Max floor magnet distance (in character height per seconds)", "description": "At high speeds.", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "FloorMagnetDistanceMax" }, @@ -36422,9 +35792,7 @@ "type": "Number", "unit": "Second", "label": "Sub-step max time delta", - "description": "", "group": "Sub-step", - "extraInformation": [], "advanced": true, "name": "SubstepTimeDeltaMax" }, @@ -36433,9 +35801,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Max sub-step number", - "description": "", "group": "Sub-step", - "extraInformation": [], "advanced": true, "name": "SubstepCountMax" }, @@ -36444,9 +35810,6 @@ "type": "Number", "unit": "Pixel", "label": "Width", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Width" }, @@ -36455,9 +35818,6 @@ "type": "Number", "unit": "Pixel", "label": "Height", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Height" }, @@ -36466,9 +35826,6 @@ "type": "Number", "unit": "Pixel", "label": "Bottom width", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "BottomWidth" }, @@ -36477,8 +35834,6 @@ "type": "Number", "label": "Collision layer", "description": "Only interacts with platforms of the same layer.", - "group": "", - "extraInformation": [], "hidden": true, "name": "CollisionLayer" }, @@ -36487,9 +35842,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Ground speed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "GroundSpeed" }, @@ -36498,9 +35850,6 @@ "type": "Number", "unit": "DegreeAngle", "label": "Ground angle", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "GroundAngle" }, @@ -36509,9 +35858,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Horizontal speed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SpeedX" }, @@ -36520,9 +35866,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Vertical speed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SpeedY" }, @@ -36531,9 +35874,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldSpeedX" }, @@ -36542,9 +35882,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldSpeedY" }, @@ -36552,9 +35889,6 @@ "value": "0", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsRightKeyPressed" }, @@ -36562,9 +35896,6 @@ "value": "0", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsJumpKeyPressed" }, @@ -36572,9 +35903,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WasJumpKeyConsumed" }, @@ -36582,9 +35910,6 @@ "value": "0", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsLeftKeyPressed" }, @@ -36593,8 +35918,6 @@ "type": "Boolean", "label": "Is grounded", "description": "The current state of the object (grounded or airbone)", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsOnFloor" }, @@ -36602,9 +35925,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsPushing" }, @@ -36612,9 +35932,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsJumping" }, @@ -36622,9 +35939,6 @@ "value": "0", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CanJump" }, @@ -36632,9 +35946,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCenterOnGround" }, @@ -36642,9 +35953,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsLeftSideOnGround" }, @@ -36652,9 +35960,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsRightSideOnGround" }, @@ -36664,8 +35969,6 @@ "unit": "Second", "label": "", "description": "The control lock timer when slipping", - "group": "", - "extraInformation": [], "hidden": true, "name": "RunningLockRemainingDuration" }, @@ -36675,8 +35978,6 @@ "unit": "Pixel", "label": "", "description": "Used in the \"IsMoving\" condition", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -36686,8 +35987,6 @@ "unit": "Pixel", "label": "", "description": "Used in the \"IsMoving\" condition", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -36696,9 +35995,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldSpeed" }, @@ -36707,9 +36003,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PlatformOldX" }, @@ -36718,9 +36011,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PlatformOldY" }, @@ -36729,9 +36019,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CosGroundAngle" }, @@ -36740,9 +36027,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SinGroundAngle" }, @@ -36750,9 +36034,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFacingForward" } @@ -37256,14 +36537,27 @@ "value": "Platform", "type": "Choice", "label": "Type", - "description": "", - "group": "", - "extraInformation": [ - "Platform", - "Jumpthru", - "Angle lock marker", - "Left-right layer toggle marker", - "Top-bottom layer toggle marker" + "choices": [ + { + "label": "Platform", + "value": "Platform" + }, + { + "label": "Jumpthru", + "value": "Jumpthru" + }, + { + "label": "Angle lock marker", + "value": "Angle lock marker" + }, + { + "label": "Left-right layer toggle marker", + "value": "Left-right layer toggle marker" + }, + { + "label": "Top-bottom layer toggle marker", + "value": "Top-bottom layer toggle marker" + } ], "name": "PlatformType" }, @@ -37273,8 +36567,6 @@ "unit": "Dimensionless", "label": "Collision layer", "description": "Only interacts with characters of the same layer.", - "group": "", - "extraInformation": [], "name": "CollisionLayer" }, { @@ -37283,7 +36575,6 @@ "label": "Snap horizontally", "description": "Snap movement angle to 0° or 180°.", "group": "Angle lock", - "extraInformation": [], "name": "ShouldSnapAngleHorizontally" }, { @@ -37292,7 +36583,6 @@ "label": "Snap vertically", "description": "Snap movement angle to 90° or 270°.", "group": "Angle lock", - "extraInformation": [], "name": "ShouldSnapAngleVertically" }, { @@ -37302,25 +36592,19 @@ "label": "Targeted layer", "description": "The layer given to player on the right or bottom. The marker layer is used for the other side.", "group": "Layer toggle", - "extraInformation": [], "name": "TargetedCollisionLayer" }, { "value": "", "type": "Boolean", "label": "Only for grounded characters", - "description": "", "group": "Layer toggle", - "extraInformation": [], "name": "IsRequiringGrounded" }, { "value": "true", "type": "Boolean", "label": "Rotate characters", - "description": "", - "group": "", - "extraInformation": [], "name": "ShouldRotateCharacters" } ], @@ -37822,16 +37106,24 @@ }, { "type": { - "value": "HedgehogPlatformer::HedgehogCharacterAnimator::PropertyBrakeAnimationName" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "BrakeAnimationName", "=", "\"\"" ] } ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Object" + ] } ], "actions": [ @@ -37869,16 +37161,24 @@ }, { "type": { - "value": "HedgehogPlatformer::HedgehogCharacterAnimator::PropertyRunAnimationName" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "RunAnimationName", "=", "\"\"" ] } ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Object" + ] } ], "actions": [ @@ -37916,16 +37216,24 @@ }, { "type": { - "value": "HedgehogPlatformer::HedgehogCharacterAnimator::PropertyWalkAnimationName" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "WalkAnimationName", "=", "\"\"" ] } ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Object" + ] } ], "actions": [ @@ -38176,87 +37484,66 @@ "value": "", "type": "Behavior", "label": "Hedgehog platformer character", - "description": "", - "group": "", "extraInformation": [ "HedgehogPlatformer::HedgehogCharacter" ], + "choices": [], "name": "HedgehogCharacter" }, { "value": "", "type": "Behavior", "label": "Animatable capability", - "description": "", - "group": "", "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], + "choices": [], "name": "Animation" }, { "value": "", "type": "Behavior", "label": "Flippable capability", - "description": "", - "group": "", "extraInformation": [ "FlippableCapability::FlippableBehavior" ], + "choices": [], "name": "Flippable" }, { "value": "Idle", "type": "String", "label": "Idle", - "description": "", - "group": "", - "extraInformation": [], "name": "IdleAnimationName" }, { "value": "Walk", "type": "String", "label": "Walk", - "description": "", - "group": "", - "extraInformation": [], "name": "WalkAnimationName" }, { "value": "Run", "type": "String", "label": "Run", - "description": "", - "group": "", - "extraInformation": [], "name": "RunAnimationName" }, { "value": "Jump", "type": "String", "label": "Jump", - "description": "", - "group": "", - "extraInformation": [], "name": "JumpAnimationName" }, { "value": "Fall", "type": "String", "label": "Fall", - "description": "", - "group": "", - "extraInformation": [], "name": "FallAnimationName" }, { "value": "BalanceOnLedge", "type": "String", "label": "Balance on ledge", - "description": "", - "group": "", - "extraInformation": [], "name": "BalanceOnLedgeAnimationName" }, { @@ -38264,27 +37551,18 @@ "type": "Number", "unit": "AngularSpeed", "label": "Jump rotation speed", - "description": "", - "group": "", - "extraInformation": [], "name": "JumpRotationSpeed" }, { "value": "Push", "type": "String", "label": "Push", - "description": "", - "group": "", - "extraInformation": [], "name": "PushAnimationName" }, { "value": "Brake", "type": "String", "label": "Brake", - "description": "", - "group": "", - "extraInformation": [], "name": "BrakeAnimationName" }, { @@ -38292,9 +37570,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Brake animation min speed", - "description": "", - "group": "", - "extraInformation": [], "name": "BrakeMinSpeed" }, { @@ -38302,18 +37577,12 @@ "type": "Number", "unit": "PixelSpeed", "label": "Run animation min speed", - "description": "", - "group": "", - "extraInformation": [], "name": "RunMinSpeed" }, { "value": "", "type": "String", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DirectionKey" } @@ -39639,11 +38908,10 @@ "value": "", "type": "Behavior", "label": "Hedgehog platformer character", - "description": "", - "group": "", "extraInformation": [ "HedgehogPlatformer::HedgehogCharacter" ], + "choices": [], "name": "HedgehogCharacter" }, { @@ -39653,7 +38921,6 @@ "label": "Downwards slope factor", "description": "Speed gain when moving downwards.", "group": "Ground", - "extraInformation": [], "name": "DownSlopeFactor" }, { @@ -39663,7 +38930,6 @@ "label": "Upwards slope factor", "description": "Speed loss when moving upwards.", "group": "Ground", - "extraInformation": [], "name": "UpSlopeFactor" }, { @@ -39673,7 +38939,6 @@ "label": "Friction", "description": "When there is no input.", "group": "Speed", - "extraInformation": [], "name": "Friction" }, { @@ -39683,7 +38948,6 @@ "label": "Deceleration", "description": "When changing of direction on the ground.", "group": "Speed", - "extraInformation": [], "name": "Deceleration" }, { @@ -39691,9 +38955,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Max speed", - "description": "", "group": "Speed", - "extraInformation": [], "name": "MaxSpeed" }, { @@ -39703,7 +38965,6 @@ "label": "Min speed", "description": "The minimal speed to be able to start rolling.", "group": "Speed", - "extraInformation": [], "name": "MinSpeed" }, { @@ -39711,18 +38972,13 @@ "type": "Number", "unit": "PixelSpeed", "label": "Spindash speed", - "description": "", "group": "Spindash", - "extraInformation": [], "name": "SpinDashSpeed" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsRolling" }, @@ -39730,9 +38986,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCrouching" }, @@ -39740,9 +38993,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCharging" }, @@ -39750,9 +39000,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalDownSlopeFactor" }, @@ -39760,9 +39007,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalUpSlopeFactor" }, @@ -39770,9 +39014,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalFriction" }, @@ -39780,9 +39021,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalDeceleration" }, @@ -39790,9 +39028,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalAcceleration" }, @@ -39800,9 +39035,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalStandMaxAngle" }, @@ -39810,9 +39042,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CanJump" }, @@ -39820,9 +39049,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsJumpPressed" }, @@ -39830,9 +39056,6 @@ "value": "", "type": "Boolean", "label": "Has just started a spindash", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustStartedSpinDash" } @@ -39896,7 +39119,7 @@ "Character", "HedgehogCharacter", "Object", - "", + "HedgehogPlatform", "" ] } @@ -39950,7 +39173,7 @@ "Character", "HedgehogCharacter", "Object", - "", + "HedgehogPlatform", "" ] } @@ -40253,22 +39476,20 @@ "value": "", "type": "Behavior", "label": "Hedgehog platform", - "description": "", - "group": "", "extraInformation": [ "HedgehogPlatformer::HedgehogPlatform" ], + "choices": [], "name": "HedgehogPlatform" }, { "value": "", "type": "Behavior", "label": "Flippable capability", - "description": "", - "group": "", "extraInformation": [ "FlippableCapability::FlippableBehavior" ], + "choices": [], "name": "Flip" }, { @@ -40276,9 +39497,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Push speed", - "description": "", - "group": "", - "extraInformation": [], "name": "PushSpeed" }, { @@ -40286,9 +39504,6 @@ "type": "Number", "unit": "Second", "label": "Character running lock duration", - "description": "", - "group": "", - "extraInformation": [], "name": "CharacterRunningLockDuration" } ], @@ -40308,7 +39523,7 @@ "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.1.0", + "version": "0.2.1", "description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", "origin": { "identifier": "ScreenOrientationChecker", @@ -40331,6 +39546,28 @@ ], "sceneVariables": [], "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, { "fullName": "Get game target orientation", "functionType": "StringExpression", @@ -40394,7 +39631,272 @@ "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, + "lineHeight": 0, + "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": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": true, + "depth": 0.9624060150375939, + "height": 96, + "layer": "", + "name": "Icon", + "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", + "width": 96, + "x": 158, + "y": 16, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.75, + "windowMask": false, + "selectedLayer": "" + }, "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::ClearBetweenFrames" + }, + "parameters": [ + "BackgroundPainter", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, { "fullName": "", "functionType": "Action", @@ -40402,41 +39904,66 @@ "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if the screen must be shown" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ScreenOrientationChecker::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SystemInfo::IsMobile" + "inverted": true, + "value": "ScreenOrientationChecker::IsInGameEdition" }, - "parameters": [] + "parameters": [ + "", + "" + ] } ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if the screen must be shown" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "SystemInfo::IsMobile" }, - "parameters": [ - "SceneWindowWidth()", - ">", - "SceneWindowHeight()" - ] + "parameters": [] } ], "actions": [], @@ -40446,24 +39973,69 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" + "SceneWindowWidth()", + ">", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "!=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] @@ -40473,364 +40045,366 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "!=", - "\"portrait\"" + "SceneWindowWidth()", + "<=", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"landscape\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show/hide the screen as needed" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "SceneWindowWidth()", - "<=", - "SceneWindowHeight()" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [], + "subInstructions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "TargetOrientation", - "=", - "\"landscape\"" + "IsShown", + "True", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetBooleanVariable" + "value": "BooleanVariable" }, "parameters": [ - "IsShown", - "False", + "IsForceShown", + "True", "" ] } ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" - ] - } + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show/hide the screen as needed" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsShown", + "True", + "" ] }, { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsForceShown", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" }, "parameters": [ "Object" ] } ] - } - ], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "BackgroundPainter", - "BackgroundColor" - ] }, { - "type": { - "value": "PrimitiveDrawing::RoundedRectangle" - }, - "parameters": [ - "BackgroundPainter", - "Padding", - "Padding", - "Object.Width()-Padding", - "Object.Height()-Padding", - "CornerRadius" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Icon", + "=", + "Text.Y() - 100" + ] + } ] }, { - "type": { - "value": "Montre" - }, - "parameters": [ - "Object", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "IsShown", - "True", - "" - ] + "comment": "Animate the icon" }, { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "IsForceShown", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Object" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Icon", - "=", - "Text.Y() - 100" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Animate the icon" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Tween::Exists" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + } ] }, { - "type": { - "inverted": true, - "value": "Tween::Exists" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Tween::HasFinished" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } ] }, { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"", + "-8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Draw the background.", + "fullName": "Draw the background", + "functionType": "Action", + "name": "DrawBackground", + "private": true, + "sentence": "Draw the background of _PARAM0_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Tween::HasFinished" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"", - "-8", - "\"easeInOutQuad\"", - "2", - "" - ] - }, - { - "type": { - "value": "Tween::RemoveTween" + "value": "PrimitiveDrawing::RoundedRectangle" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" + "BackgroundPainter", + "Padding", + "Padding", + "Object.Width()-Padding", + "Object.Height()-Padding", + "CornerRadius" ] } ] @@ -40850,7 +40424,6 @@ "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game.", "fullName": "Force show the screen", "functionType": "Condition", - "group": "Screen Orientation Checker configuration", "name": "IsForceShown", "sentence": "_PARAM0_ is forced to be shown", "events": [ @@ -40894,7 +40467,6 @@ "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game.", "fullName": "Force show the screen", "functionType": "Action", - "group": "Screen Orientation Checker configuration", "name": "SetIsForceShown", "sentence": "Force _PARAM0_ to be shown: _PARAM1_", "events": [ @@ -40970,6 +40542,76 @@ } ], "objectGroups": [] + }, + { + "description": "the message of the object.", + "fullName": "Message", + "functionType": "ExpressionAndCondition", + "name": "Message", + "sentence": "the message", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Text.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Message", + "name": "SetMessage", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Text", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -40977,9 +40619,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsShown" }, @@ -40988,8 +40627,6 @@ "type": "Boolean", "label": "Force show the screen", "description": "Use this to test the screen in your game", - "group": "", - "extraInformation": [], "name": "IsForceShown" }, { @@ -40997,9 +40634,7 @@ "type": "Number", "unit": "Pixel", "label": "Padding", - "description": "", "group": "Appearance", - "extraInformation": [], "name": "Padding" }, { @@ -41009,271 +40644,277 @@ "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 + "variants": [ + { + "areaMaxX": 400, + "areaMaxY": 200, + "areaMaxZ": 0, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "2743bcd6cf431c6c00cda3a59684eb152b3a09d598b799b15383e4f77daf8b37", + "assetStoreOriginalName": "Black screen orientation checker", + "name": "Black screen orientation checker", + "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, + "lineHeight": 0, + "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": 113 - } - ] + "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" + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] }, - { - "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, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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, - "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": [] + "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": [] + } + ], + "editionSettings": {} } ] } diff --git "a/examples/360\302\260-platformer/assets/rotate-screen-icon.png" "b/examples/360\302\260-platformer/assets/rotate-screen-icon.png" index ba619fae3995e5576c1e1de0a994b5b3da7c39dc..a7726dee34eba34b401b26b73b5bf128ff7c26d7 100644 GIT binary patch delta 1155 zcmV-}1bqAP28{`j8Gi-<007npjm!W5010qNS#tmY3ljhU3ljkVnw%H_00citL_t(| z+U?!pwW2T(1>jc#B~St-Sb`f&sWc6&`9(FdUz!2ufn{)iP zFJiu(WD*ki`Z89$_tpJVezDjscc9w;Dee8UV~f~C+WUWt3x9BoE<;GAA1{n9Lr|{@ zqssu2^Y0f%*G5QJKfU}!SHTucgVg$YrDGSkF3j%!Io&_~OrSGcalK6LxB$k7zpdGt z>qJfWqT$~ihuFO(#CgD+!@nus0J<6ZiS%%a zkf}|^8PsuMdVjrc^u)TVX37}y=+c;8r;DCh5fD}nm|iOaRgvga*5YUmcf7|0vi#q!c*I(ogbVKXj!WbtPaQpC|t;`*$0UbAGITFauxcL)7eRfch zWg0}F+i+Pabb;3_pdyo0RG?zy-(H}hB0n}OAb6=+_+O}R$dcG1qkMjHi6KeFYy6Dy|o2u0uhKn1R@ZD2t*(P z5r{wpA`pR~fxZc3{|6Ds_>YpO0tuvZ9gW&Tt$+AYI|8Y;sne)z_~hZ9Kx)_Xw`h+? zJ%J1&g$m7X_6G$j)%Wj-%@-Yk7GIbCUdYHJ1zG|vy0+mdmtUF{Hz-in=Rx9>OQT)6 zc_@U5>MDEpP@q77iX^98EJC3y^@z=?x3#~_3>4B@oOqJuA;lMN4h06Z-Zo{cP-v^! zqJOLFQh#}JD8$`_k2-!rH1NXcxkeJ4Gh0@-dvY`XKK3?f$MHuG zs2Zfl{nW^dyusRsEy4v`R|hB-0p*)GT?B{GqujlnMkdMC44gj9;TS!Nv;W(ZrF^D3 z0(u;InLTk5rN`0nB&=|BPu2{HlVJA$Y|+*eXZzXz)Y7eTMu_FV^m-1=fl-q_y?(cF z2`6C`U1lOxY{B#?cRjJ&lb3|baOvu2spC}}%ON=ea-z)Z?* zMqugDC_atNmBAsU1(z{AT5-3YssWQGU52g&%X!B2s%Mq_v$$(=XiTc za}skxbf@G~0#nJw!Z{>~f8@5gv!W~3SS=M$839QocMjN)O*LdV9? zCxOu7>e+n%6@fxID5@S*;$Z0FH}9klXisOV_8tv}_R~*oyQATd>iB@{h2UF@UMScf z^n-rT|AlB4WM)D6e-tnrGSO7O2kh{OROJk_T_cC_UAK)$ZJ5INF{(-24+01>)f1p+ z95vCbs~;*Ya@)d8?~6laGW${nb&ANwFb!{XN5?_)8Eql8iwCYn^VL zlW!>ix;j1cC}j1fn;F`qpl#yz4yQpu5aSx+l7b+^xt6-1f3O{PW!7>1_eTdJOURK2$=wV@}4LZLO*%q^QFz=P%!X=ku;#hqe3bKyY{tKw%h<%=*ucaBq*ytCl$8jF01F2$e1|0?%`SO1&u6{1-oD!M;rN+3p^r= z85p>QK$!8;-MT+OL1|AH$B>F!Zx0$W0(plPeD%-ekzW90GCar?TE@U=&e9wY;(5CI KxvXGEhh zP>``C$S;_|;n|HekctA2$YKTtZXpn6ymYtj4^Ys>)5S5Q;?~<62YDG31P*T~`pth< zgd=bc?;qc=N=B9%28*SCnSC-FFu?PMb7l$;Y#&Ss=f87bo^PRzi(WX;JO)o!KbLh* G2~7Y^kvl&C diff --git a/examples/conviction-of-gun-dude-mobile/assets/rotate-screen-icon.png b/examples/conviction-of-gun-dude-mobile/assets/rotate-screen-icon.png index ba619fae3995e5576c1e1de0a994b5b3da7c39dc..a7726dee34eba34b401b26b73b5bf128ff7c26d7 100644 GIT binary patch delta 1155 zcmV-}1bqAP28{`j8Gi-<007npjm!W5010qNS#tmY3ljhU3ljkVnw%H_00citL_t(| z+U?!pwW2T(1>jc#B~St-Sb`f&sWc6&`9(FdUz!2ufn{)iP zFJiu(WD*ki`Z89$_tpJVezDjscc9w;Dee8UV~f~C+WUWt3x9BoE<;GAA1{n9Lr|{@ zqssu2^Y0f%*G5QJKfU}!SHTucgVg$YrDGSkF3j%!Io&_~OrSGcalK6LxB$k7zpdGt z>qJfWqT$~ihuFO(#CgD+!@nus0J<6ZiS%%a zkf}|^8PsuMdVjrc^u)TVX37}y=+c;8r;DCh5fD}nm|iOaRgvga*5YUmcf7|0vi#q!c*I(ogbVKXj!WbtPaQpC|t;`*$0UbAGITFauxcL)7eRfch zWg0}F+i+Pabb;3_pdyo0RG?zy-(H}hB0n}OAb6=+_+O}R$dcG1qkMjHi6KeFYy6Dy|o2u0uhKn1R@ZD2t*(P z5r{wpA`pR~fxZc3{|6Ds_>YpO0tuvZ9gW&Tt$+AYI|8Y;sne)z_~hZ9Kx)_Xw`h+? zJ%J1&g$m7X_6G$j)%Wj-%@-Yk7GIbCUdYHJ1zG|vy0+mdmtUF{Hz-in=Rx9>OQT)6 zc_@U5>MDEpP@q77iX^98EJC3y^@z=?x3#~_3>4B@oOqJuA;lMN4h06Z-Zo{cP-v^! zqJOLFQh#}JD8$`_k2-!rH1NXcxkeJ4Gh0@-dvY`XKK3?f$MHuG zs2Zfl{nW^dyusRsEy4v`R|hB-0p*)GT?B{GqujlnMkdMC44gj9;TS!Nv;W(ZrF^D3 z0(u;InLTk5rN`0nB&=|BPu2{HlVJA$Y|+*eXZzXz)Y7eTMu_FV^m-1=fl-q_y?(cF z2`6C`U1lOxY{B#?cRjJ&lb3|baOvu2spC}}%ON=ea-z)Z?* zMqugDC_atNmBAsU1(z{AT5-3YssWQGU52g&%X!B2s%Mq_v$$(=XiTc za}skxbf@G~0#nJw!Z{>~f8@5gv!W~3SS=M$839QocMjN)O*LdV9? zCxOu7>e+n%6@fxID5@S*;$Z0FH}9klXisOV_8tv}_R~*oyQATd>iB@{h2UF@UMScf z^n-rT|AlB4WM)D6e-tnrGSO7O2kh{OROJk_T_cC_UAK)$ZJ5INF{(-24+01>)f1p+ z95vCbs~;*Ya@)d8?~6laGW${nb&ANwFb!{XN5?_)8Eql8iwCYn^VL zlW!>ix;j1cC}j1fn;F`qpl#yz4yQpu5aSx+l7b+^xt6-1f3O{PW!7>1_eTdJOURK2$=wV@}4LZLO*%q^QFz=P%!X=ku;#hqe3bKyY{tK=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.9.0", "description": [ - "Multitouch joysticks can be used the same way as physical gamepads:", + "Multitouch joysticks are objects showing a joystick on the screen, useful for mobile. They work like a physical gamepad:", "- 4 or 8 directions", "- Analogus pads", "- Player selection", - "- Controls mapping for top-down movement and platformer characters", + "- Automatic \"mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the virtual joystick (it works by reading the multitouch joystick state and simulating controls). No need for additional events to make it work once the behaviors are set up.", "", "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)." ], @@ -24214,6 +24103,28 @@ } ], "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, { "fullName": "Accelerated speed", "functionType": "Expression", @@ -24242,10 +24153,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", "<", "0" ] @@ -24270,10 +24181,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "TargetedSpeed" ] @@ -24297,20 +24208,20 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "TargetedSpeed" ] }, { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "0" ] @@ -24346,10 +24257,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">=", "0" ] @@ -24375,10 +24286,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", ">", "0" ] @@ -24403,10 +24314,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "TargetedSpeed" ] @@ -24430,20 +24341,20 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "TargetedSpeed" ] }, { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "0" ] @@ -24479,10 +24390,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<=", "0" ] @@ -24508,10 +24419,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", "=", "0" ] @@ -24524,10 +24435,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "0" ] @@ -24551,10 +24462,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "0" ] @@ -24632,11 +24543,125 @@ "objectGroups": [] }, { - "description": "Check if a button is pressed on a gamepad.", + "description": "Check if a button was just pressed on a multitouch controller.", + "fullName": "Multitouch controller button just pressed", + "functionType": "Condition", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ was just pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"JustPressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is pressed on a multitouch controller.", "fullName": "Multitouch controller button pressed", "functionType": "Condition", "name": "IsButtonPressed", "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"JustPressed\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is released on a multitouch controller.", + "fullName": "Multitouch controller button released", + "functionType": "Condition", + "name": "IsButtonReleased", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is released", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -24648,55 +24673,7 @@ "parameters": [ "Controllers[ControllerIdentifier].Buttons[Button].State", "=", - "\"Pressed\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Button name", - "name": "Button", - "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Check if a button is released on a gamepad.", - "fullName": "Multitouch controller button released", - "functionType": "Condition", - "name": "IsButtonReleased", - "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is released", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Controllers[ControllerIdentifier].Buttons[Button].State", - "=", - "\"Released\"" + "\"Released\"" ] } ], @@ -24766,7 +24743,7 @@ { "description": "Button state", "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "supplementaryInformation": "[\"Idle\",\"Pressed\",\"JustPressed\",\"Released\"]", "type": "stringWithSelector" } ], @@ -25941,10 +25918,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsString" + "value": "StringVariable" }, "parameters": [ - "\"Side\"", + "Side", "=", "\"Left\"" ] @@ -25979,10 +25956,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsString" + "value": "StringVariable" }, "parameters": [ - "\"Side\"", + "Side", "=", "\"Right\"" ] @@ -26139,41 +26116,23 @@ "conditions": [ { "type": { - "value": "HasGameJustResumed" + "inverted": true, + "value": "SpriteMultitouchJoystick::IsInGameEdition" }, "parameters": [ + "", "" ] } ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Manage touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "HasAnyTouchOrMouseStarted" + "value": "HasGameJustResumed" }, "parameters": [ "" @@ -26183,176 +26142,207 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" }, "parameters": [ "Object", "Behavior", - "=", - "0" + "" ] } - ], + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Manage touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(TouchIndex)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "+", + "1" + ] + } ] } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "HasTouchEnded" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "", - "TouchId" - ] - } - ], - "actions": [ + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" + }, { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" - }, - "parameters": [ - "Object", - "Behavior", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update joystick position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ], + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update joystick position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "Object", + "Behavior", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", + "" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" - ] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", - "" - ] - } - ] + "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -26424,11 +26414,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "JoystickForce", "=", "Value" ] @@ -26522,11 +26511,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "JoystickAngle", "=", "Value" ] @@ -26792,11 +26780,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -26855,11 +26842,10 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -26936,11 +26922,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyControllerIdentifier" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ControllerIdentifier", "=", "Value" ] @@ -27017,11 +27002,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickIdentifier" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "JoystickIdentifier", "=", "Value" ] @@ -27098,11 +27082,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyDeadZoneRadius" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DeadZoneRadius", "=", "Value" ] @@ -27150,11 +27133,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "Value" ] @@ -27188,18 +27170,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" }, { @@ -27207,17 +27183,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" }, @@ -27225,9 +27196,6 @@ "value": "0", "type": "Number", "label": "Joystick force (range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JoystickForce" }, @@ -27235,9 +27203,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -27245,9 +27210,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" } @@ -27255,7 +27217,7 @@ "sharedPropertyDescriptors": [] }, { - "description": "Detect button presses made on a touchscreen.", + "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", "name": "MultitouchButton", "objectType": "", @@ -27271,11 +27233,11 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::IsReleased" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "IsReleased", + "True", "" ] } @@ -27283,12 +27245,50 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsReleased", + "False", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" }, "parameters": [ "Object", "Behavior", - "no" + "\"Idle\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" ] }, { @@ -27298,7 +27298,7 @@ "parameters": [ "Object", "Behavior", - "\"Idle\"", + "\"Pressed\"", "" ] } @@ -27330,11 +27330,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIndex", "=", "0" ] @@ -27368,11 +27367,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()))" ] @@ -27383,11 +27381,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(TouchIndex)" ] @@ -27399,7 +27396,17 @@ "parameters": [ "Object", "Behavior", - "\"Pressed\"", + "\"JustPressed\"", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", "" ] } @@ -27411,11 +27418,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIndex", "+", "1" ] @@ -27463,21 +27469,30 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsReleased", + "True", + "" ] }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "IsJustPressed", + "False", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", "=", "0" ] @@ -27501,22 +27516,23 @@ "objectGroups": [] }, { - "description": "Check if button is released.", - "fullName": "Button released", + "description": "Check if the button was just pressed.", + "fullName": "Button just pressed", "functionType": "Condition", - "name": "IsReleased", - "sentence": "Button _PARAM0_ is released", + "name": "IsJustPressed", + "sentence": "Button _PARAM0_ was just pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyIsReleased" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsJustPressed", + "True", + "" ] } ], @@ -27548,7 +27564,7 @@ "objectGroups": [] }, { - "description": "Check if button is pressed.", + "description": "Check if the button is pressed.", "fullName": "Button pressed", "functionType": "Condition", "name": "IsPressed", @@ -27559,11 +27575,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -27596,6 +27611,54 @@ ], "objectGroups": [] }, + { + "description": "Check if the button is released.", + "fullName": "Button released", + "functionType": "Condition", + "name": "IsReleased", + "sentence": "Button _PARAM0_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "fullName": "Button state", "functionType": "Action", @@ -27637,7 +27700,7 @@ { "description": "Button state", "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "supplementaryInformation": "[\"Idle\",\"JustPressed\",\"Pressed\",\"Released\"]", "type": "stringWithSelector" } ], @@ -27649,27 +27712,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" }, @@ -27677,9 +27731,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" }, @@ -27687,20 +27738,22 @@ "value": "", "type": "Boolean", "label": "Button released", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsReleased" }, + { + "value": "", + "type": "Boolean", + "label": "Button just pressed", + "hidden": true, + "name": "IsJustPressed" + }, { "value": "0", "type": "Number", "unit": "Pixel", "label": "Triggering circle radius", "description": "This circle adds up to the object collision mask.", - "group": "", - "extraInformation": [], "name": "Radius" } ], @@ -27711,6 +27764,7 @@ "fullName": "Platformer multitouch controller mapper", "name": "PlatformerMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -27888,184 +27942,40 @@ "value": "", "type": "Behavior", "label": "Platform character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], + "choices": [], "name": "Property" }, { "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", - "Secondary" - ], - "name": "JoystickIdentifier" - }, - { - "value": "A", - "type": "String", - "label": "Jump button name", - "description": "", - "group": "Controls", - "extraInformation": [], - "name": "JumpButton" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D platformer multitouch controller mapper", - "name": "Platformer3DMultitouchMapper", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" - }, - "parameters": [ - "", - ">", - "0", - "ControllerIdentifier", - "JoystickIdentifier", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "=", - "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" - ] - }, - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateStick" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "-90", - "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" - ] - } - ] - }, + "choices": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::IsButtonPressed" - }, - "parameters": [ - "", - "ControllerIdentifier", - "JumpButton", - "\"Down\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" + "label": "Primary", + "value": "Primary" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", - "type": "behavior" + "label": "Secondary", + "value": "Secondary" } ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D physics character", - "description": "", - "group": "", - "extraInformation": [ - "Physics3D::PhysicsCharacter3D" - ], - "name": "PhysicsCharacter3D" - }, - { - "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", - "Secondary" - ], "name": "JoystickIdentifier" }, { "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -28073,9 +27983,153 @@ }, { "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D shooter multitouch controller mapper", - "name": "Shooter3DMultitouchMapper", + "fullName": "3D platformer multitouch controller mapper", + "name": "Platformer3DMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "=", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "-90", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D shooter multitouch controller mapper", + "name": "Shooter3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -28163,31 +28217,32 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { "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", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -28195,9 +28250,7 @@ "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -28208,6 +28261,7 @@ "fullName": "First person camera multitouch controller mapper", "name": "FirstPersonMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -28233,11 +28287,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyCurrentRotationSpeedZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentRotationSpeedZ", "=", "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedZ, SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)" ] @@ -28254,11 +28307,10 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyCurrentRotationSpeedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentRotationSpeedY", "=", "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedY, SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)" ] @@ -28458,11 +28510,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyHorizontalRotationSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationSpeedMax", "=", "Value" ] @@ -28539,11 +28590,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyHorizontalRotationAcceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationAcceleration", "=", "Value" ] @@ -28620,11 +28670,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyHorizontalRotationDeceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationDeceleration", "=", "Value" ] @@ -28701,11 +28750,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalRotationSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationSpeedMax", "=", "Value" ] @@ -28782,11 +28830,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalRotationAcceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationAcceleration", "=", "Value" ] @@ -28863,11 +28910,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalRotationDeceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationDeceleration", "=", "Value" ] @@ -28944,11 +28990,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalAngleMin" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalAngleMin", "=", "Value" ] @@ -29025,11 +29070,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalAngleMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalAngleMax", "=", "Value" ] @@ -29106,11 +29150,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyOffsetZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OffsetZ", "=", "Value" ] @@ -29139,31 +29182,32 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { "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", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "CameraStick" }, @@ -29172,27 +29216,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" }, { @@ -29200,27 +29238,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" }, { @@ -29228,9 +29260,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Minimum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMin" }, { @@ -29238,9 +29268,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Maximum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMax" }, { @@ -29248,9 +29276,7 @@ "type": "Number", "unit": "Pixel", "label": "Z position offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -29258,9 +29284,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Z", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedZ" }, @@ -29269,20 +29292,196 @@ "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" + ], + "choices": [], + "name": "PhysicsCar3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Steer joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SteerJoystickIdentifier" + }, + { + "value": "Secondary", + "type": "Choice", + "label": "Speed joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "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": "", @@ -29295,11 +29494,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"Analog\"" ] @@ -29324,11 +29522,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"360°\"" ] @@ -29353,11 +29550,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"8 Directions\"" ] @@ -29796,31 +29992,31 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], + "choices": [], "name": "TopDownMovement" }, { "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" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -29828,12 +30024,20 @@ "value": "Analog", "type": "Choice", "label": "Stick mode", - "description": "", "group": "Controls", - "extraInformation": [ - "Analog", - "360°", - "8 Directions" + "choices": [ + { + "label": "Analog", + "value": "Analog" + }, + { + "label": "360°", + "value": "360°" + }, + { + "label": "8 Directions", + "value": "8 Directions" + } ], "name": "StickMode" } @@ -29854,6 +30058,112 @@ "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, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -29970,62 +30280,92 @@ "name": "doStepPostEvents", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreAutour" - }, - "parameters": [ - "Thumb", - "Border", - "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", - "Border.MultitouchJoystick::JoystickAngle()" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::PropertyShouldBeHiddenWhenReleased" - }, - "parameters": [ - "Object" - ] - }, { "type": { "inverted": true, - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" + "value": "SpriteMultitouchJoystick::IsInGameEdition" }, "parameters": [ - "Object", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Cache" - }, - "parameters": [ - "Object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "Thumb", + "Border", + "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", + "Border.MultitouchJoystick::JoystickAngle()" + ] + } ] }, { - "type": { - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" - }, - "parameters": [ - "Object", - "no", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "True", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" + }, + "parameters": [ + "Object", + "no", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "False", + "" + ] + } ] } ] @@ -30187,11 +30527,12 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::SetPropertyShouldBeHiddenWhenReleased" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShouldBeHiddenWhenReleased", + "True", + "" ] }, { @@ -30317,10 +30658,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -30342,10 +30685,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -30955,20 +31300,21 @@ "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" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -30977,8 +31323,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" }, { @@ -30986,10 +31330,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -30998,8 +31342,6 @@ "type": "Number", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -31008,10 +31350,10 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbIsScaledProportionally" }, @@ -31020,8 +31362,6 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ParentOrigin" }, @@ -31029,117 +31369,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": [] } ] }, @@ -31148,12 +31382,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Resource bar (continuous)", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/resource-bar", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjgsMTJIMTRINGMtMi4yLDAtNCwxLjgtNCw0czEuOCw0LDQsNGgxMGgxNGMyLjIsMCw0LTEuOCw0LTRTMzAuMiwxMiwyOCwxMnogTTQsMThjLTEuMSwwLTItMC45LTItMnMwLjktMiwyLTJoMTANCgljMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJINHoiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteContinuousBar", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Interface Elements/ea06363a57846caab544f536b78a952234b68d4941d41c1577852a1d61aefec3_Interface Elements_interface_ui_loading_progress_bar.svg", "shortDescription": "A bar that represents a resource in the game (health, mana, ammo, etc).", - "version": "1.1.3", + "version": "2.0.0", "description": [ "A bar that represents a resource in the game (health, mana, ammo, etc).", "", @@ -31178,6 +31413,12 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1", "q8ubdigLvIRXLxsJDDTaokO41mc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Resource bars now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing resource bars 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": [], @@ -31269,7 +31510,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Value" + "CurrentValue" ] } ] @@ -31306,11 +31547,10 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", "clamp(Value, 0, Object.Behavior::MaxValue())" ] @@ -31322,11 +31562,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Value", "<", "Object.Behavior::PreviousHighValue()" ] @@ -31349,11 +31588,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Value", ">=", "PreviousHighValue" ] @@ -31442,11 +31680,10 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", "Value" ] @@ -31481,11 +31718,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", "0" ] @@ -31530,11 +31766,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", "MaxValue" ] @@ -31620,13 +31855,12 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyPreviousHighValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValue", "=", - "Value" + "CurrentValue" ] } ] @@ -31701,11 +31935,10 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyPreviousHighValueDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValueDuration", "=", "Value" ] @@ -31740,14 +31973,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PreviousHighValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValue", "!=", - "Value", - "" + "CurrentValue" ] }, { @@ -31795,27 +32026,18 @@ "value": "1", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "name": "Value" + "name": "CurrentValue" }, { "value": "3", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxValue" }, { "value": "", "type": "Number", "label": "Previous high value", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousHighValue" }, @@ -31823,9 +32045,7 @@ "value": "1", "type": "Number", "label": "Previous high value conservation duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], + "hidden": true, "name": "PreviousHighValueDuration" } ], @@ -31834,7 +32054,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -31843,8 +32063,278 @@ "defaultName": "ResourceBar", "description": "A bar that represents a resource in the game (health, mana, ammo, etc).", "fullName": "Resource bar (continuous)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteContinuousBar", + "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, + "leftEdgeAnchor": 4, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "2 / 3", + "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": "2 / 3", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "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": "ResourceBar", + "type": "PanelSpriteContinuousBar::ResourceBar", + "Value": 1, + "MaxValue": 3, + "PreviousValue": 0, + "CurrentValue": 1 + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Buffer", + "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": "Background", + "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": "FillBar" + }, + { + "objectName": "Buffer" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "fa2b0c42-1baa-489d-9c47-87ec233cbe8c", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "Buffer", + "persistentUuid": "6e01eec9-ca43-4a5c-b4e1-4d9d384473e2", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "4833affb-a8d1-4a2b-9019-a20cf5fdc68e", + "width": 196, + "x": 10, + "y": 10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "0e63f21c-2071-4765-8254-e9021fa84ec4", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 4, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -31862,7 +32352,7 @@ "textG": 0, "textR": 0 }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31870,12 +32360,100 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "FillBar", + "Anchor", + "" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Buffer", + "Anchor", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Buffer", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - (max(FillBar.BoundingBoxRight(), Buffer.BoundingBoxRight()) - min(FillBar.BoundingBoxLeft(), Buffer.BoundingBoxLeft()))" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - (max(FillBar.BoundingBoxBottom(), Buffer.BoundingBoxBottom()) - min(FillBar.BoundingBoxTop(), Buffer.BoundingBoxTop()))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Buffer", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - (FillBar.BoundingBoxRight() - FillBar.BoundingBoxLeft())" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - (FillBar.BoundingBoxBottom() - FillBar.BoundingBoxTop())" + ] + } ] } ] @@ -31890,7 +32468,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances." + "comment": "This allows to detect a change of \"intial value\" on hot reload." }, { "type": "BuiltinCommonInstructions::Standard", @@ -31898,60 +32476,38 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Background", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "FillBar", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Background", - "=", - "1" - ] - }, - { - "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "FillBar", + "PreviousInitialValue", "=", - "3" + "InitialValue" ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create the child-object instances." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyPreviousHighValueDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - ">", + "PreviousHighValueDuration", + "=", "0" ] } @@ -31959,25 +32515,12 @@ "actions": [ { "type": { - "value": "Create" + "value": "Delete" }, "parameters": [ - "", "Buffer", - "0", - "0", "" ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Buffer", - "=", - "2" - ] } ] }, @@ -31993,62 +32536,18 @@ }, "comment": "Create the label over the bar." }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Label", - "=", - "4" - ] - }, - { - "type": { - "value": "TextObject::SetTextAlignment" - }, - "parameters": [ - "Label", - "\"center\"" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyShowLabel" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabel", + "True", + "" ] } ], @@ -32086,50 +32585,62 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetValue" + "value": "PanelSpriteContinuousBar::ResourceBar::SetValue" }, "parameters": [ - "Object", + "FillBar", + "ResourceBar", "=", - "Object.PropertyInitialValue()", - "Object.PropertyInitialValue()" + "InitialValue", + "" ] }, { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPreviousValueDuration" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ - "Object", + "FillBar", + "Resizable", "=", - "Object.PropertyPreviousHighValueDuration()", - "" + "Object.WidthForValue()" ] }, { "type": { - "value": "Tween::RemoveTween" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ - "FillBar", - "Tween", - "\"ChangeValue\"" + "Buffer", + "Resizable", + "=", + "FillBar.Width()" ] }, { "type": { - "value": "PanelSpriteObject::Width" + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPreviousValueDuration" }, "parameters": [ - "FillBar", + "Object", "=", - "Object.WidthForValue()" + "PreviousHighValueDuration", + "" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLabel" + }, + "parameters": [ + "Object", + "" ] } ] @@ -32171,7 +32682,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] } @@ -32182,24 +32693,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -32209,7 +32720,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] }, @@ -32220,7 +32731,7 @@ "parameters": [ "Object", "=", - "Object.PropertyPreviousHighValueDuration()", + "PreviousHighValueDuration", "" ] }, @@ -32242,10 +32753,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] @@ -32270,141 +32782,101 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "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": "NumberVariable" }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the bar size is refreshed according to the value\n- the label is put back at the center of the bar\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": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Background.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Background.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": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Width" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Height" - ] - }, - { - "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "variables": [ - { - "name": "Width", - "type": "number", - "value": 0 - }, - { - "name": "Height", - "type": "number", - "value": 0 - } - ] - } + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.WidthForValue()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "Buffer", + "Resizable", + "=", + "FillBar.Width()" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "FillBar", + "Tween", + "\"ChangeValue\"" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Buffer", + "Tween", + "\"ChangeValue\"" ] } - ], - "parameters": [] + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "Buffer", + "Resizable", + "=", + "FillBar.Height()" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", @@ -32429,7 +32901,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectWidthTween" + "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ "Buffer", @@ -32437,7 +32909,7 @@ "\"ChangeValue\"", "Object.WidthForValue()", "\"linear\"", - "Object.PropertyEasingDuration() * 1000", + "EasingDuration", "" ] } @@ -32448,10 +32920,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::Width" }, "parameters": [ "FillBar", + "Resizable", "<", "Buffer.Width()" ] @@ -32474,10 +32947,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::Width" }, "parameters": [ "FillBar", + "Resizable", ">=", "Buffer.Width()" ] @@ -32519,121 +32993,25 @@ "actions": [ { "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] }, { "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Buffer", - "=", - "FillBar.X()", - "=", - "FillBar.Y()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "Buffer", + "Resizable", "=", "FillBar.Width()" ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Buffer", - "=", - "FillBar.Height()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Object.FullBarWidth()" - ] - }, - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "FillBar.CenterY()" - ] - }, - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()) / 2" - ] } ] } @@ -32714,10 +33092,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "EasingDuration", ">", "0" ] @@ -32726,7 +33104,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectWidthTween" + "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ "FillBar", @@ -32734,7 +33112,7 @@ "\"ChangeValue\"", "Object.WidthForValue()", "\"linear\"", - "Object.PropertyEasingDuration() * 1000", + "EasingDuration", "" ] } @@ -32745,10 +33123,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "EasingDuration", "<=", "0" ] @@ -32757,10 +33135,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] @@ -32799,10 +33178,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "Buffer", + "Resizable", "=", "round(Object.FullBarWidth() * FillBar.ResourceBar::PreviousHighValue() / FillBar.ResourceBar::MaxValue())" ] @@ -32843,7 +33223,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "FillBar.ResourceBar::PropertyMaxValue()" + "FillBar.ResourceBar::MaxValue()" ] } ] @@ -33027,7 +33407,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "FillBar.ResourceBar::PropertyPreviousHighValueDuration()" + "FillBar.ResourceBar::PreviousHighValueDuration()" ] } ] @@ -33235,7 +33615,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -33267,10 +33647,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyShowLabel" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabel", + "True", + "" ] } ], @@ -33310,21 +33692,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyShowLabel" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "ShowLabel", + "False", + "" ] }, { @@ -33342,21 +33727,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyShowLabel" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShowLabel", + "True", + "" ] }, { @@ -33400,10 +33788,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(round(Object.Value())) + \" / \" + ToString(Object.MaxValue())" ] @@ -33423,74 +33812,16 @@ } ], "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarLeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarTopPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarRightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarBottomPadding" - }, { "value": "3", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxValue" }, { "value": "3", "type": "Number", "label": "Initial value", - "description": "", - "group": "", - "extraInformation": [], "name": "InitialValue" }, { @@ -33498,235 +33829,325 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, { "value": "1", "type": "Number", + "unit": "Second", "label": "Previous high value conservation duration (in seconds)", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PreviousHighValueDuration" }, { "value": "0.25", "type": "Number", + "unit": "Second", "label": "Easing duration", - "description": "", "group": "Animation", - "extraInformation": [], "name": "EasingDuration" }, { "value": "true", "type": "Boolean", "label": "Show the label", - "description": "", - "group": "", "extraInformation": [ "Label" ], + "choices": [], "name": "ShowLabel" }, { - "value": "", - "type": "Boolean", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "Buffer" - ], "hidden": true, - "name": "ShowBuffer" + "name": "BarLeftPlusRightMargin" }, { - "value": "Center", - "type": "String", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "Label" - ], "hidden": true, - "name": "LabelVerticalAnchorOrigin" + "name": "BarTopPlusBottomMargin" }, { - "value": "Center", - "type": "String", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "FillBar" - ], "hidden": true, - "name": "LabelVerticalAnchorTarget" + "name": "OldParentWidth" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "2 / 3", - "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": "2 / 3", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ResourceBar", - "type": "PanelSpriteContinuousBar::ResourceBar", - "Value": 1, - "MaxValue": 3, - "PreviousValue": 0 - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Buffer", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "FillBar" - }, - { - "objectName": "Buffer" + "variants": [ + { + "areaMaxX": 224, + "areaMaxY": 34, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "3d6c54e76a9a06cbd7629c1e78388d4ab808bbf36d644c61d6a14c9ad34d4f89", + "assetStoreOriginalName": "Red Flat Bar", + "name": "Red Flat Bar", + "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": "8 / 16", + "font": "", + "textAlignment": "center", + "characterSize": 16, + "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": "8 / 16", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 24, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "Flat Bar Red Fill Bar.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 24, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ResourceBar", + "type": "PanelSpriteContinuousBar::ResourceBar", + "Value": 1, + "MaxValue": 3, + "PreviousValue": 0, + "CurrentValue": 1 + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 24, + "leftMargin": 0, + "name": "Buffer", + "rightMargin": 0, + "texture": "Flat Bar Red Fill Bar.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 24, + "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": 34, + "leftMargin": 4, + "name": "Background", + "rightMargin": 4, + "texture": "Flat Bar White Border.png", + "tiled": false, + "topMargin": 6, + "type": "PanelSpriteObject::PanelSprite", + "width": 224, + "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": "FillBar" + }, + { + "objectName": "Buffer" + }, + { + "objectName": "Background" + } + ] }, - { - "objectName": "Background" - } - ] - }, - "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": [] + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 24, + "keepRatio": true, + "layer": "", + "name": "FillBar", + "persistentUuid": "5a0d266a-f680-4580-8e30-0a8516815f9a", + "width": 216, + "x": 4, + "y": 4, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 24, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "03472802-6b7f-42d1-bf9b-68bf9d0d399f", + "width": 216, + "x": 4, + "y": 16, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {} } - ], - "instances": [] + ] } ] }, @@ -33735,6 +34156,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Flash layer", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", "name": "FlashLayer", @@ -33837,6 +34259,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Health points and damage", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWhlYXJ0LWhhbGYtZnVsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDVDMTUsNSAxMy41OCw1LjkxIDEzLDcuMlYxNy43NEMxNy4yNSwxMy44NyAyMCwxMS4yIDIwLDguNUMyMCw2LjUgMTguNSw1IDE2LjUsNU0xNi41LDNDMTkuNTgsMyAyMiw1LjQxIDIyLDguNUMyMiwxMi4yNyAxOC42LDE1LjM2IDEzLjQ1LDIwLjAzTDEyLDIxLjM1TDEwLjU1LDIwLjAzQzUuNCwxNS4zNiAyLDEyLjI3IDIsOC41QzIsNS40MSA0LjQyLDMgNy41LDNDOS4yNCwzIDEwLjkxLDMuODEgMTIsNS4wOEMxMy4wOSwzLjgxIDE0Ljc2LDMgMTYuNSwzWiIgLz48L3N2Zz4=", "name": "Health", @@ -38490,18 +38913,14 @@ "value": "100", "type": "Number", "label": "Starting health", - "description": "", "group": "Health", - "extraInformation": [], "name": "Health" }, { "value": "0", "type": "Number", "label": "Current health (life) points", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "CurrentHealth" }, @@ -38511,7 +38930,6 @@ "label": "Maximum health", "description": "Use 0 for no maximum.", "group": "Health", - "extraInformation": [], "name": "MaxHealth" }, { @@ -38519,18 +38937,14 @@ "type": "Number", "unit": "Second", "label": "Damage cooldown", - "description": "", "group": "Health", - "extraInformation": [], "name": "DamageCooldown" }, { "value": "", "type": "Boolean", "label": "Allow heals to increase health above max health (regen will never exceed max health)", - "description": "", "group": "Health", - "extraInformation": [], "advanced": true, "name": "AllowOverHealing" }, @@ -38538,9 +38952,7 @@ "value": "", "type": "Boolean", "label": "", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "IsHealthJustDamaged" }, @@ -38548,9 +38960,7 @@ "value": "0", "type": "Number", "label": "Damage to health from the previous incoming damage", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "DamageToBeApplied" }, @@ -38558,9 +38968,7 @@ "value": "", "type": "Boolean", "label": "", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "HitAtLeastOnce" }, @@ -38570,7 +38978,6 @@ "label": "Chance to dodge incoming damage (between 0 and 1)", "description": "When a damage is dodged, no damage is applied.", "group": "Health", - "extraInformation": [], "advanced": true, "name": "ChanceToDodge" }, @@ -38578,9 +38985,7 @@ "value": "", "type": "Boolean", "label": "", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "IsJustDodged" }, @@ -38588,9 +38993,7 @@ "value": "0", "type": "Number", "label": "Health points gained from the previous heal", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "HealToBeApplied" }, @@ -38598,9 +39001,7 @@ "value": "0", "type": "Number", "label": "Rate of health regeneration (points per second)", - "description": "", "group": "Health regeneration", - "extraInformation": [], "advanced": true, "name": "HealthRegenRate" }, @@ -38611,7 +39012,6 @@ "label": "Health regeneration delay ", "description": "Delay before health regeneration starts after a hit.", "group": "Health regeneration", - "extraInformation": [], "advanced": true, "name": "HealthRegenDelay" }, @@ -38619,9 +39019,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsJustHealed" }, @@ -38629,9 +39026,7 @@ "value": "", "type": "Number", "label": "Current shield points", - "description": "", "group": "Shield", - "extraInformation": [], "hidden": true, "name": "CurrentShieldPoints" }, @@ -38641,7 +39036,6 @@ "label": "Maximum shield", "description": "Leave 0 for unlimited.", "group": "Shield", - "extraInformation": [], "advanced": true, "name": "MaxShieldPoints" }, @@ -38652,7 +39046,6 @@ "label": "Duration of shield", "description": "Use 0 to make the shield permanent.", "group": "Shield", - "extraInformation": [], "advanced": true, "name": "ShieldDuration" }, @@ -38660,9 +39053,7 @@ "value": "0", "type": "Number", "label": "Rate of shield regeneration (points per second)", - "description": "", "group": "Shield regeneration", - "extraInformation": [], "advanced": true, "name": "ShieldRegenRate" }, @@ -38670,9 +39061,7 @@ "value": "", "type": "Boolean", "label": "Block excess damage when shield is broken", - "description": "", "group": "Shield", - "extraInformation": [], "advanced": true, "name": "BlockExcessDamage" }, @@ -38683,7 +39072,6 @@ "label": "Shield regeneration delay", "description": "Delay before shield regeneration starts after a hit.", "group": "Shield regeneration", - "extraInformation": [], "advanced": true, "name": "ShieldRegenDelay" }, @@ -38691,9 +39079,7 @@ "value": "", "type": "Boolean", "label": "", - "description": "", "group": "Shield", - "extraInformation": [], "hidden": true, "name": "IsShieldJustDamaged" }, @@ -38701,9 +39087,7 @@ "value": "", "type": "Number", "label": "Damage to shield from the previous incoming damage", - "description": "", "group": "Shield", - "extraInformation": [], "hidden": true, "name": "ShieldDamageTaken" }, @@ -38713,7 +39097,6 @@ "label": "Flat damage reduction from armor", "description": "Incoming damages are reduced by this value.", "group": "Armor", - "extraInformation": [], "advanced": true, "name": "FlatDamageReduction" }, @@ -38721,9 +39104,7 @@ "value": "0", "type": "Number", "label": "Percentage damage reduction from armor (between 0 and 1)", - "description": "", "group": "Armor", - "extraInformation": [], "advanced": true, "name": "PercentDamageReduction" } @@ -38738,6 +39119,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Flash object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", "name": "Flash", @@ -39632,17 +40014,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" }, @@ -39652,8 +40029,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" } @@ -40206,17 +40581,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" }, @@ -40226,8 +40596,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -40235,9 +40603,6 @@ "value": "\"255;255;255\"", "type": "String", "label": "Tint color", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TintColor" } @@ -40840,22 +41205,20 @@ "value": "", "type": "Behavior", "label": "Opacity capability", - "description": "", - "group": "", "extraInformation": [ "OpacityCapability::OpacityBehavior" ], + "choices": [], "name": "Opacity" }, { "value": "", "type": "Behavior", "label": "Tween Behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "TweenBehavior" }, { @@ -40864,17 +41227,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" }, @@ -40884,8 +41242,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -40895,8 +41251,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" }, @@ -40906,8 +41260,6 @@ "unit": "Dimensionless", "label": "Starting opacity", "description": "Opacity will fade between the starting value and a target value", - "group": "", - "extraInformation": [], "hidden": true, "name": "StartingOpacity" } @@ -41725,11 +42077,10 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { @@ -41738,17 +42089,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" }, @@ -41758,8 +42104,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -41767,9 +42111,6 @@ "value": "", "type": "String", "label": "Name of effect", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectName" } @@ -41784,6 +42125,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Shake object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", @@ -46182,20 +46524,16 @@ "value": "", "type": "Behavior", "label": "Scalable capability", - "description": "", - "group": "", "extraInformation": [ "ScalableCapability::ScalableBehavior" ], + "choices": [], "name": "Scale" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "name": "Property" } ], @@ -46209,6 +46547,7 @@ "category": "Camera", "extensionNamespace": "", "fullName": "Camera shake", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZlY3Rvci1kaWZmZXJlbmNlLWFiIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTMsMUMxLjg5LDEgMSwxLjg5IDEsM1Y1SDNWM0g1VjFIM003LDFWM0gxMFYxSDdNMTIsMVYzSDE0VjVIMTZWM0MxNiwxLjg5IDE1LjExLDEgMTQsMUgxMk0xLDdWMTBIM1Y3SDFNMTQsN0MxNCw3IDE0LDExLjY3IDE0LDE0QzExLjY3LDE0IDcsMTQgNywxNEM3LDE0IDcsMTggNywyMEM3LDIxLjExIDcuODksMjIgOSwyMkgyMEMyMS4xMSwyMiAyMiwyMS4xMSAyMiwyMFY5QzIyLDcuODkgMjEuMTEsNyAyMCw3QzE4LDcgMTQsNyAxNCw3TTE2LDlIMjBWMjBIOVYxNkgxNEMxNS4xMSwxNiAxNiwxNS4xMSAxNiwxNFY5TTEsMTJWMTRDMSwxNS4xMSAxLjg5LDE2IDMsMTZINVYxNEgzVjEySDFaIiAvPjwvc3ZnPg==", "name": "CameraShake", @@ -49783,12 +50122,13 @@ "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.2.0", + "version": "1.3.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -49859,11 +50199,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -49872,11 +50211,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -49910,12 +50248,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -49925,11 +50263,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -49946,12 +50285,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -49974,12 +50313,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -49989,11 +50328,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -50012,12 +50350,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -50049,11 +50387,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -50083,23 +50420,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -50115,22 +50451,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -50141,11 +50475,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50160,11 +50493,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -50193,20 +50525,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -50215,11 +50547,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -50231,20 +50562,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -50253,11 +50584,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -50270,20 +50600,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50292,11 +50622,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -50308,20 +50637,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -50330,11 +50659,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50369,11 +50697,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -50385,11 +50712,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50398,11 +50724,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -50415,11 +50740,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50427,11 +50751,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -50440,11 +50763,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -50527,22 +50849,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -50577,11 +50897,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -50626,11 +50945,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -50675,11 +50993,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -50724,11 +51041,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -50750,11 +51066,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -50799,11 +51114,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50848,11 +51162,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -50932,8 +51245,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -50941,14 +51252,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -50957,9 +51281,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -50967,9 +51288,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -50977,9 +51295,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -50987,9 +51302,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -51122,11 +51434,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "!=", "\"\"" ] @@ -51161,11 +51472,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "!=", "\"\"" ] @@ -51200,11 +51510,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "!=", "\"\"" ] @@ -51307,11 +51616,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "=", "Value" ] @@ -51388,11 +51696,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "=", "Value" ] @@ -51469,11 +51776,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "=", "Value" ] @@ -51502,31 +51808,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -51535,16 +51837,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" } ], @@ -51767,11 +52066,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", "Value" ] @@ -51848,11 +52146,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedAnimationName", "=", "Value" ] @@ -51929,11 +52226,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedAnimationName", "=", "Value" ] @@ -51962,31 +52258,27 @@ "value": "", "type": "Behavior", "label": "Animatable capability", - "description": "", - "group": "", "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], + "choices": [], "name": "Animation" }, { "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -51995,16 +52287,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" } ], @@ -52028,11 +52317,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "IdleValue" ] @@ -52085,11 +52373,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -52098,11 +52385,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -52141,11 +52427,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -52154,11 +52439,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -52181,11 +52465,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -52194,11 +52477,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -52233,11 +52515,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -52246,11 +52527,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -52285,11 +52565,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] @@ -52315,11 +52594,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] @@ -52412,44 +52690,40 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", "Value" ] @@ -52490,44 +52764,40 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", "Value" ] @@ -52567,11 +52837,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "<", "Duration" ] @@ -52580,22 +52849,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] @@ -52607,11 +52874,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", ">=", "Duration" ] @@ -52620,22 +52886,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"NoTween\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "TweenTargetedValue" ] @@ -52784,22 +53048,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", "NewEffectName" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", "NewPropertyName" ] @@ -52886,11 +53148,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", "Value" ] @@ -52967,11 +53228,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", "Value" ] @@ -53048,11 +53308,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", "Value" ] @@ -53130,11 +53389,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -53212,11 +53470,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -53293,11 +53550,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -53374,11 +53630,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -53407,31 +53662,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -53440,16 +53691,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" }, { @@ -53458,58 +53706,153 @@ "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", - "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -53517,42 +53860,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -53561,9 +54002,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -53571,21 +54010,26 @@ "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" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -53594,9 +54038,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -53604,9 +54045,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -53614,9 +54052,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -53624,12 +54059,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -53638,9 +54080,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -53722,11 +54161,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -53735,11 +54173,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -53778,11 +54215,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -53791,11 +54227,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -53818,11 +54253,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -53831,11 +54265,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -53870,11 +54303,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -53883,11 +54315,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -54078,11 +54509,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", "Value" ] @@ -54159,11 +54589,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", "Value" ] @@ -54240,11 +54669,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", "Value" ] @@ -54321,11 +54749,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -54402,11 +54829,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -54484,11 +54910,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -54566,11 +54991,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -54599,33 +55023,30 @@ "value": "", "type": "Behavior", "label": "Scalable capability", - "description": "", - "group": "", "extraInformation": [ "ScalableCapability::ScalableBehavior" ], + "choices": [], "name": "Scale" }, { "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -54633,9 +55054,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -54645,7 +55064,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -54653,9 +55071,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -54663,9 +55079,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -54673,51 +55087,147 @@ "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", - "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -54725,42 +55235,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -54768,12 +55376,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -54855,11 +55470,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -54868,11 +55482,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -54911,11 +55524,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -54924,11 +55536,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -54951,11 +55562,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -54964,11 +55574,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -55003,11 +55612,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -55016,11 +55624,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -55213,11 +55820,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", "Value" ] @@ -55296,11 +55902,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", "Value" ] @@ -55379,11 +55984,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", "Value" ] @@ -55462,11 +56066,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -55545,11 +56148,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -55629,11 +56231,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -55713,11 +56314,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -55747,31 +56347,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -55780,16 +56376,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" }, { @@ -55797,9 +56390,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -55807,51 +56398,147 @@ "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", - "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -55859,42 +56546,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "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" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -55902,12 +56687,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -55923,12 +56715,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.2.1", "description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", "origin": { "identifier": "ScreenOrientationChecker", @@ -55951,6 +56744,28 @@ ], "sceneVariables": [], "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, { "fullName": "Get game target orientation", "functionType": "StringExpression", @@ -56014,7 +56829,272 @@ "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, + "lineHeight": 0, + "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": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": true, + "depth": 0.9624060150375939, + "height": 96, + "layer": "", + "name": "Icon", + "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", + "width": 96, + "x": 158, + "y": 16, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.75, + "windowMask": false, + "selectedLayer": "" + }, "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::ClearBetweenFrames" + }, + "parameters": [ + "BackgroundPainter", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, { "fullName": "", "functionType": "Action", @@ -56022,41 +57102,66 @@ "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if the screen must be shown" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ScreenOrientationChecker::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SystemInfo::IsMobile" + "inverted": true, + "value": "ScreenOrientationChecker::IsInGameEdition" }, - "parameters": [] + "parameters": [ + "", + "" + ] } ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if the screen must be shown" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "SystemInfo::IsMobile" }, - "parameters": [ - "SceneWindowWidth()", - ">", - "SceneWindowHeight()" - ] + "parameters": [] } ], "actions": [], @@ -56066,23 +57171,69 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" + "SceneWindowWidth()", + ">", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" - }, - "parameters": [ - "Object", - "yes" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "!=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] @@ -56092,317 +57243,456 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "!=", - "\"portrait\"" + "SceneWindowWidth()", + "<=", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" - }, - "parameters": [ - "Object", - "no" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"landscape\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show/hide the screen as needed" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "SceneWindowWidth()", - "<=", - "SceneWindowHeight()" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [], + "subInstructions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "TargetOrientation", - "=", - "\"landscape\"" + "IsShown", + "True", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "yes" + "IsForceShown", + "True", + "" ] } ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" - }, - "parameters": [ - "Object", - "no" - ] - } + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show/hide the screen as needed" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsShown", + "True", + "" ] }, { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsForceShown", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" }, "parameters": [ "Object" ] } ] - } - ], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "BackgroundPainter", - "BackgroundColor" - ] }, { - "type": { - "value": "PrimitiveDrawing::RoundedRectangle" - }, - "parameters": [ - "BackgroundPainter", - "Padding", - "Padding", - "Object.Width()-Padding", - "Object.Height()-Padding", - "CornerRadius" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Icon", + "=", + "Text.Y() - 100" + ] + } ] }, { - "type": { - "value": "Montre" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Animate the icon" + }, { - "type": { - "inverted": true, - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" - }, - "parameters": [ - "Object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + } ] }, { - "type": { - "inverted": true, - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" - }, - "parameters": [ - "Object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "Cache" - }, - "parameters": [ - "Object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"", + "-8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Draw the background.", + "fullName": "Draw the background", + "functionType": "Action", + "name": "DrawBackground", + "private": true, + "sentence": "Draw the background of _PARAM0_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "MettreY" + "value": "PrimitiveDrawing::RoundedRectangle" }, "parameters": [ - "Icon", - "=", - "Text.Y() - 100" + "BackgroundPainter", + "Padding", + "Padding", + "Object.Width()-Padding", + "Object.Height()-Padding", + "CornerRadius" ] } ] - }, + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Animate the icon" - }, + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game.", + "fullName": "Force show the screen", + "functionType": "Condition", + "name": "IsForceShown", + "sentence": "_PARAM0_ is forced to be shown", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "Tween::Exists" + "value": "BooleanVariable" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" - ] - }, - { - "type": { - "inverted": true, - "value": "Tween::Exists" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" + "IsForceShown", + "True", + "" ] } ], "actions": [ { "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" + "value": "SetReturnBoolean" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", - "" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game.", + "fullName": "Force show the screen", + "functionType": "Action", + "name": "SetIsForceShown", + "sentence": "Force _PARAM0_ to be shown: _PARAM1_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Tween::HasFinished" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" + "value": "SetBooleanVariable" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", + "IsForceShown", + "False", "" ] - }, - { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" - ] } ] }, @@ -56411,39 +57701,25 @@ "conditions": [ { "type": { - "value": "Tween::HasFinished" + "value": "BooleanVariable" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" + "value": "SetBooleanVariable" }, "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"", - "-8", - "\"easeInOutQuad\"", - "2", + "IsForceShown", + "False", "" ] - }, - { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" - ] } ] } @@ -56454,42 +57730,42 @@ "name": "Object", "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", "type": "object" + }, + { + "defaultValue": "yes", + "description": "Force show the screen?", + "name": "Value", + "optional": true, + "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game.", - "fullName": "Force show the screen", - "functionType": "Condition", - "group": "Screen Orientation Checker configuration", - "name": "IsForceShown", - "sentence": "_PARAM0_ is forced to be shown", + "description": "the message of the object.", + "fullName": "Message", + "functionType": "ExpressionAndCondition", + "name": "Message", + "sentence": "the message", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" - }, - "parameters": [ - "Object" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "Text.Text::Value()" ] } ] } ], + "expressionType": { + "type": "string" + }, "parameters": [ { "description": "Object", @@ -56501,58 +57777,25 @@ "objectGroups": [] }, { - "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game.", - "fullName": "Force show the screen", - "functionType": "Action", - "group": "Screen Orientation Checker configuration", - "name": "SetIsForceShown", - "sentence": "Force _PARAM0_ to be shown: _PARAM1_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Message", + "name": "SetMessage", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" - }, - "parameters": [ - "Object", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "yes" + "Text", + "Text", + "=", + "Value" ] } ] @@ -56564,13 +57807,6 @@ "name": "Object", "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", "type": "object" - }, - { - "defaultValue": "yes", - "description": "Force show the screen?", - "name": "Value", - "optional": true, - "type": "yesorno" } ], "objectGroups": [] @@ -56581,9 +57817,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsShown" }, @@ -56592,8 +57825,6 @@ "type": "Boolean", "label": "Force show the screen", "description": "Use this to test the screen in your game", - "group": "", - "extraInformation": [], "name": "IsForceShown" }, { @@ -56601,9 +57832,7 @@ "type": "Number", "unit": "Pixel", "label": "Padding", - "description": "", "group": "Appearance", - "extraInformation": [], "name": "Padding" }, { @@ -56613,271 +57842,277 @@ "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 + "variants": [ + { + "areaMaxX": 400, + "areaMaxY": 200, + "areaMaxZ": 0, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "2743bcd6cf431c6c00cda3a59684eb152b3a09d598b799b15383e4f77daf8b37", + "assetStoreOriginalName": "Black screen orientation checker", + "name": "Black screen orientation checker", + "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, + "lineHeight": 0, + "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 + } }, { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ], - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ { - "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 + "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": 113 - } - ] + "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" + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] }, - { - "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, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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, - "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": [] + "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": [] + } + ], + "editionSettings": {} } ] } diff --git a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json index cf7e6c9d7..a702a0b9b 100644 --- a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json +++ b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json @@ -1115,88 +1115,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Show midgame ad" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Show midgame ad", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Show midgame ad", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -1216,88 +1134,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Show rewarded ad" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Show rewarded ad", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Show rewarded ad", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -1316,88 +1152,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Check adblock" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Check adblock", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Check adblock", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { diff --git a/examples/load-testing/load-testing.json b/examples/load-testing/load-testing.json index 78c312a0c..80dbe4b58 100644 --- a/examples/load-testing/load-testing.json +++ b/examples/load-testing/load-testing.json @@ -1,9 +1,9 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Load Testing GDevelop", "description": "Create thousands of objects to see how they impact the performance of the game.\nIn real games, consider staying under these limits:\n\nSprites:\n \nDesktop < 10,000\nDesktop (with physics collisions) < 1,000\nDesktop (with collisions) < 500\n\nMobile < 5,000\nMobile (with physics collisions) < 500\nMobile (with collisions) < 250\n\nTiled Sprites:\n\nDesktop < 1000\nDesktop (with physics collisions) < 1000\nDesktop (with collisions) < 1000\n\nMobile < 100\n\nParticles: \n\nDesktop < 15,000\nMobile < 5,000", @@ -90,6 +89,7 @@ ], "playableDevices": [ "keyboard", + "mobile", "mobile" ], "extensionProperties": [], @@ -103,7 +103,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Sprite.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -112,7 +111,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Blue Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -125,7 +123,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Blue Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -138,7 +135,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Blue Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -162,7 +158,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -175,7 +170,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -188,7 +182,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -201,7 +194,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -214,7 +206,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -227,7 +218,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -240,7 +230,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -253,7 +242,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -266,7 +254,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -279,7 +266,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Grey Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -292,7 +278,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Grey Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -305,7 +290,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Grey Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -318,7 +302,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Slider Border.png", "kind": "image", "metadata": "", @@ -331,7 +314,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Slider Fill Bar.png", "kind": "image", "metadata": "", @@ -344,7 +326,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Slider Thumb.png", "kind": "image", "metadata": "", @@ -357,7 +338,6 @@ } }, { - "alwaysLoaded": false, "file": "thumbnail.png", "kind": "image", "metadata": "", @@ -366,7 +346,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_1.png", "kind": "image", "metadata": "", @@ -379,7 +358,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_10.png", "kind": "image", "metadata": "", @@ -392,7 +370,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_11.png", "kind": "image", "metadata": "", @@ -405,7 +382,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_12.png", "kind": "image", "metadata": "", @@ -418,7 +394,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_2.png", "kind": "image", "metadata": "", @@ -431,7 +406,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_3.png", "kind": "image", "metadata": "", @@ -444,7 +418,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_4.png", "kind": "image", "metadata": "", @@ -457,7 +430,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_5.png", "kind": "image", "metadata": "", @@ -470,7 +442,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_6.png", "kind": "image", "metadata": "", @@ -483,7 +454,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_7.png", "kind": "image", "metadata": "", @@ -496,7 +466,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_8.png", "kind": "image", "metadata": "", @@ -509,7 +478,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_9.png", "kind": "image", "metadata": "", @@ -522,7 +490,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Fall.png", "kind": "image", "metadata": "", @@ -535,7 +502,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Idle_1.png", "kind": "image", "metadata": "", @@ -548,7 +514,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Idle_2.png", "kind": "image", "metadata": "", @@ -561,7 +526,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Idle_3.png", "kind": "image", "metadata": "", @@ -574,7 +538,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Idle_4.png", "kind": "image", "metadata": "", @@ -587,7 +550,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Jump.png", "kind": "image", "metadata": "", @@ -600,7 +562,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_1.png", "kind": "image", "metadata": "", @@ -613,7 +574,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_10.png", "kind": "image", "metadata": "", @@ -626,7 +586,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_11.png", "kind": "image", "metadata": "", @@ -639,7 +598,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_12.png", "kind": "image", "metadata": "", @@ -652,7 +610,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_13.png", "kind": "image", "metadata": "", @@ -665,7 +622,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_14.png", "kind": "image", "metadata": "", @@ -678,7 +634,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_15.png", "kind": "image", "metadata": "", @@ -691,7 +646,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_16.png", "kind": "image", "metadata": "", @@ -704,7 +658,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_17.png", "kind": "image", "metadata": "", @@ -717,7 +670,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_18.png", "kind": "image", "metadata": "", @@ -730,7 +682,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_19.png", "kind": "image", "metadata": "", @@ -743,7 +694,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_2.png", "kind": "image", "metadata": "", @@ -756,7 +706,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_3.png", "kind": "image", "metadata": "", @@ -769,7 +718,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_4.png", "kind": "image", "metadata": "", @@ -782,7 +730,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_5.png", "kind": "image", "metadata": "", @@ -795,7 +742,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_6.png", "kind": "image", "metadata": "", @@ -808,7 +754,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_7.png", "kind": "image", "metadata": "", @@ -821,7 +766,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_8.png", "kind": "image", "metadata": "", @@ -834,7 +778,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_9.png", "kind": "image", "metadata": "", @@ -847,7 +790,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Toggle_Off.png", "kind": "image", "metadata": "", @@ -860,7 +802,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Toggle_On.png", "kind": "image", "metadata": "", @@ -873,7 +814,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Sprite2.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -882,7 +822,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Sprite3.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -891,7 +830,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Sprite4.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -899,10 +837,12 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -921,13 +861,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 0.3645833333333333, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -1094,8 +1037,8 @@ { "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "CreateSprites_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Blue Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1105,9 +1048,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Create \nSprites" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -1141,6 +1098,28 @@ "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": "Create \nSprites", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -1158,8 +1137,8 @@ { "assetStoreId": "569b45d3c7c34f7706563239938d04ca599016ff9857ee38c945c72330d4339e", "name": "CreateTiledSprites_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1169,9 +1148,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Create \nTiled Sprites" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -1205,6 +1198,28 @@ "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": "Create \nTiled Sprites", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -1222,8 +1237,8 @@ { "assetStoreId": "a48315b9a9c655af87118d7bb8f6be03b4dbb14e066387849b2d2d4c3600573c", "name": "CreateSomething_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Purple Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1233,9 +1248,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Unused\nButton" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -1269,6 +1298,28 @@ "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": "Unused\nButton", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -1286,8 +1337,8 @@ { "assetStoreId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", "name": "CreateParticles_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Red Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1297,9 +1348,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Create \nParticles" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -1333,6 +1398,28 @@ "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": "Create \nParticles", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -1350,8 +1437,8 @@ { "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "ChangeScenes_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1361,9 +1448,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Start Changing Scenes" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -1397,6 +1498,28 @@ "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": "Start Changing Scenes", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -1414,8 +1537,8 @@ { "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", "name": "ObjectCount_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -1464,6 +1587,28 @@ "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": "Quantity", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, "Thumb": { @@ -1481,8 +1626,8 @@ { "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", "name": "SceneChange_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -1531,6 +1676,28 @@ "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": "Quantity", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, "Thumb": { @@ -1551,7 +1718,6 @@ "italic": false, "name": "Quantity_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1565,6 +1731,28 @@ "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": "Object Quantity", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1573,7 +1761,6 @@ "italic": false, "name": "ChangeScenes_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1587,6 +1774,28 @@ "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": "Number of Scene Changes", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1595,7 +1804,6 @@ "italic": false, "name": "TimeToDelete_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1609,9 +1817,66 @@ "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": "Time to return to menu:\n??? seconds", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "CreateSprites_Button" + }, + { + "objectName": "CreateTiledSprites_Button" + }, + { + "objectName": "CreateSomething_Button" + }, + { + "objectName": "CreateParticles_Button" + }, + { + "objectName": "ChangeScenes_Button" + }, + { + "objectName": "ObjectCount_Slider" + }, + { + "objectName": "SceneChange_Slider" + }, + { + "objectName": "Quantity_Text" + }, + { + "objectName": "ChangeScenes_Text" + }, + { + "objectName": "TimeToDelete_Text" + } + ] + }, "events": [ { "colorB": 228, @@ -2020,9 +2285,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -2044,7 +2311,32 @@ "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" + } + ] }, { "b": 0, @@ -2061,13 +2353,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 0.444851599888665, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -2527,7 +2822,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Sprite", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2596,7 +2890,6 @@ "italic": false, "name": "FPS_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2630,6 +2923,28 @@ "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": "FPS: ???", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2638,7 +2953,6 @@ "italic": false, "name": "ObjectCount_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2665,6 +2979,28 @@ "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": "Objects: ???", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2673,7 +3009,6 @@ "italic": false, "name": "TimeToDisplay_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2700,6 +3035,28 @@ "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": "Time to display: ??? seconds", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2708,7 +3065,6 @@ "italic": false, "name": "TimeToDelete_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2735,6 +3091,28 @@ "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": "Time to delete: ??? seconds", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2743,7 +3121,6 @@ "italic": false, "name": "EnablePhysics_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2770,6 +3147,28 @@ "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": "Enable physics", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2778,7 +3177,6 @@ "italic": false, "name": "CheckPointInside_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2805,6 +3203,28 @@ "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": "Check if point inside", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2813,7 +3233,6 @@ "italic": false, "name": "SeparateTwoObjects_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2840,6 +3259,28 @@ "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": "Separate objects", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2848,7 +3289,6 @@ "italic": false, "name": "CollisionCheck_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2875,6 +3315,28 @@ "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": "Check collisions", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2883,7 +3345,6 @@ "italic": false, "name": "PhysicsCollisionCheck_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2910,6 +3371,28 @@ "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": "Show physics collisions", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2918,7 +3401,6 @@ "italic": false, "name": "DisablePhysicsSleep_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2945,6 +3427,28 @@ "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": "Disable physics sleeping", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2953,7 +3457,6 @@ "italic": false, "name": "ChangeColors_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2980,6 +3483,28 @@ "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": "Change colors", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2988,7 +3513,6 @@ "italic": false, "name": "MoveParticles_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -3015,6 +3539,28 @@ "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": "Move Particles", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -3023,7 +3569,6 @@ "italic": false, "name": "ForEach_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -3050,13 +3595,34 @@ "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 (For Each)", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { "assetStoreId": "", "height": 6, "name": "TiledSprite", - "tags": "", "texture": "Sprite", "type": "TiledSpriteObject::TiledSprite", "width": 6, @@ -3110,6 +3676,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 27, "particleBlue2": 27, + "particleColor1": "208;2;27", + "particleColor2": "208;2;27", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 2, @@ -3125,7 +3693,6 @@ "rendererParam1": 5, "rendererParam2": 1, "rendererType": "Point", - "tags": "", "tank": -1, "textureParticleName": "", "type": "ParticleSystem::ParticleEmitter", @@ -3137,8 +3704,8 @@ { "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "GoBack_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -3148,9 +3715,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go back" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -3184,6 +3765,28 @@ "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": "Go back", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -3201,8 +3804,8 @@ { "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "DeleteObjects_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -3212,9 +3815,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Delete Objects" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 16, "height": 69, @@ -3248,6 +3865,28 @@ "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": "Delete Objects", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, "Pressed": { @@ -3266,16 +3905,15 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "0d91b7b0a2a8562a0172b4d5e9bf3d80340f866a030aa7a5f3baf6157840f1c3", "name": "RedHero", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [ { - "checkCollisionMask": true, "name": "Draggable", - "type": "DraggableBehavior::Draggable" + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": true }, { "name": "DraggablePhysics", @@ -4710,8 +5348,8 @@ { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "EnablePhysics_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], @@ -4788,8 +5426,8 @@ { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "SeparateObjects_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], @@ -4866,8 +5504,8 @@ { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "CollisionCheck_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], @@ -4944,8 +5582,8 @@ { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "PhysicsCollisionCheck_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], @@ -5022,8 +5660,8 @@ { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "PhysicsSleep_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], @@ -5100,8 +5738,8 @@ { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "CheckPointInside_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], @@ -5178,8 +5816,8 @@ { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "ChangeColors_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], @@ -5256,8 +5894,8 @@ { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "MoveParticles_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], @@ -5334,8 +5972,8 @@ { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "ForEach_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], @@ -5410,6 +6048,95 @@ } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Sprite" + }, + { + "objectName": "FPS_Text" + }, + { + "objectName": "ObjectCount_Text" + }, + { + "objectName": "TimeToDisplay_Text" + }, + { + "objectName": "TimeToDelete_Text" + }, + { + "objectName": "EnablePhysics_Text" + }, + { + "objectName": "CheckPointInside_Text" + }, + { + "objectName": "SeparateTwoObjects_Text" + }, + { + "objectName": "CollisionCheck_Text" + }, + { + "objectName": "PhysicsCollisionCheck_Text" + }, + { + "objectName": "DisablePhysicsSleep_Text" + }, + { + "objectName": "ChangeColors_Text" + }, + { + "objectName": "MoveParticles_Text" + }, + { + "objectName": "ForEach_Text" + }, + { + "objectName": "TiledSprite" + }, + { + "objectName": "ParticleEmitter" + }, + { + "objectName": "GoBack_Button" + }, + { + "objectName": "DeleteObjects_Button" + }, + { + "objectName": "RedHero" + }, + { + "objectName": "EnablePhysics_Toggle" + }, + { + "objectName": "SeparateObjects_Toggle" + }, + { + "objectName": "CollisionCheck_Toggle" + }, + { + "objectName": "PhysicsCollisionCheck_Toggle" + }, + { + "objectName": "PhysicsSleep_Toggle" + }, + { + "objectName": "CheckPointInside_Toggle" + }, + { + "objectName": "ChangeColors_Toggle" + }, + { + "objectName": "MoveParticles_Toggle" + }, + { + "objectName": "ForEach_Toggle" + } + ] + }, "events": [ { "colorB": 228, @@ -7054,9 +7781,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -7081,9 +7810,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -7095,14 +7826,30 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, { "name": "DraggablePhysics", "type": "DraggablePhysics::DraggablePhysics" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, { "name": "FPSDisplayer", "type": "FPS::FPSDisplayer" }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, { "name": "Physics2", "type": "Physics2::Physics2Behavior", @@ -7110,6 +7857,18 @@ "gravityY": 9.8, "scaleX": 100, "scaleY": 100 + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] }, @@ -7128,13 +7887,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.3645833333333333, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -7162,7 +7924,6 @@ "italic": false, "name": "SceneChangesRemaining_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -7176,9 +7937,39 @@ "b": 35, "g": 5, "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": "Scene Changes Remaining: 000", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 100, + "lineHeight": 0, + "color": "255;5;35" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "SceneChangesRemaining_Text" + } + ] + }, "events": [ { "colorB": 228, @@ -7278,9 +8069,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -7302,7 +8095,24 @@ "effects": [] } ], - "behaviorsSharedData": [] + "behaviorsSharedData": [ + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] }, { "b": 0, @@ -7319,13 +8129,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.3645833333333333, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -7353,7 +8166,6 @@ "italic": false, "name": "SceneChangesRemaining_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -7367,9 +8179,39 @@ "b": 255, "g": 112, "r": 0 + }, + "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": "Scene Changes Remaining: 000", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 100, + "lineHeight": 0, + "color": "0;112;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "SceneChangesRemaining_Text" + } + ] + }, "events": [ { "colorB": 228, @@ -7479,9 +8321,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -7503,7 +8347,24 @@ "effects": [] } ], - "behaviorsSharedData": [] + "behaviorsSharedData": [ + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] } ], "externalEvents": [], @@ -7513,6 +8374,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Draggable (for physics objects)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjcsMTFjMC0yLTIuMi0zLjYtNS42LTQuNEMyMC42LDMuMiwxOSwxLDE3LDFzLTMuNiwyLjItNC40LDUuNkM5LjIsNy40LDcsOSw3LDExYzAsMiwyLjIsMy42LDUuNiw0LjQNCgljMC4zLDEuMiwwLjYsMi4yLDEuMSwzLjFjMC4zLDAuNSwwLjksMC43LDEuNCwwLjRjMC41LTAuMywwLjctMC45LDAuNC0xLjRjLTAuMy0wLjUtMC41LTEuMS0wLjctMS44YzAuNywwLjEsMS41LDAuMSwyLjIsMC4xDQoJYzAuOCwwLDEuNSwwLDIuMi0wLjFjLTAuMywxLTAuNywxLjktMS4xLDIuNWMtMC4zLDAuNC0wLjIsMS4xLDAuMiwxLjRjMC4yLDAuMSwwLjQsMC4yLDAuNiwwLjJjMC4zLDAsMC42LTAuMSwwLjgtMC40DQoJYzAuNy0xLDEuMy0yLjQsMS43LTRDMjQuOCwxNC42LDI3LDEzLDI3LDExeiBNMTcsM2MwLjcsMCwxLjYsMS4yLDIuMiwzLjNjLTAuNy0wLjEtMS41LTAuMS0yLjItMC4xcy0xLjUsMC0yLjIsMC4xDQoJQzE1LjQsNC4yLDE2LjMsMywxNywzeiBNOSwxMWMwLTAuNywxLjItMS42LDMuMy0yLjJjLTAuMSwwLjctMC4xLDEuNS0wLjEsMi4yYzAsMC44LDAsMS41LDAuMSwyLjJDMTAuMiwxMi42LDksMTEuNyw5LDExeiBNMTcsMTMuOQ0KCWMtMSwwLTEuOS0wLjEtMi43LTAuMmMtMC4xLTAuOC0wLjItMS43LTAuMi0yLjdjMC0xLDAuMS0xLjksMC4yLTIuN0MxNS4xLDguMiwxNiw4LjEsMTcsOC4xczEuOSwwLjEsMi43LDAuMg0KCWMwLjEsMC44LDAuMiwxLjcsMC4yLDIuN2MwLDAuOS0wLjEsMS44LTAuMiwyLjdDMTguOSwxMy44LDE4LDEzLjksMTcsMTMuOXogTTIxLjcsMTMuMmMwLjEtMC43LDAuMS0xLjUsMC4xLTIuMg0KCWMwLTAuOCwwLTEuNS0wLjEtMi4yQzIzLjgsOS40LDI1LDEwLjMsMjUsMTFDMjUsMTEuNywyMy44LDEyLjYsMjEuNywxMy4yeiIvPg0KPHBhdGggZD0iTTI5LjksMTcuNUMyOS43LDE3LjIsMjkuNCwxNywyOSwxN2MtMi4yLDAtNC4zLDEtNS42LDIuOEwyMi41LDIxYy0xLjEsMS4zLTIuOCwyLTQuNSwyaC0zYy0wLjYsMC0xLTAuNC0xLTFzMC40LTEsMS0xaDEuOQ0KCWMxLjYsMCwzLjEtMS4zLDMuMS0yLjljMCwwLDAtMC4xLDAtMC4xYzAtMC41LTAuNS0xLTEtMWwtNi4xLDBjLTMuNiwwLTYuNSwxLjYtOC4xLDQuMmwtMi43LDQuMmMtMC4yLDAuMy0wLjIsMC43LDAsMWwzLDUNCgljMC4xLDAuMiwwLjQsMC40LDAuNiwwLjVjMC4xLDAsMC4xLDAsMC4yLDBjMC4yLDAsMC40LTAuMSwwLjYtMC4yYzMuOC0yLjUsOC4yLTMuOCwxMi43LTMuOGMzLjMsMCw2LjMtMS44LDcuOS00LjdsMi43LTQuOA0KCUMzMCwxOC4yLDMwLDE3LjgsMjkuOSwxNy41eiIvPg0KPC9zdmc+DQo=", "name": "DraggablePhysics", @@ -7548,6 +8410,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -8498,26 +9362,30 @@ "value": "", "type": "Behavior", "label": "Physics behavior", - "description": "", - "group": "", "extraInformation": [ "Physics2::Physics2Behavior" ], - "hidden": false, + "choices": [], "name": "PhysicsBehavior" }, { "value": "Left", "type": "Choice", "label": "Mouse button", - "description": "", - "group": "", - "extraInformation": [ - "Left", - "Right", - "Middle" + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + }, + { + "label": "Middle", + "value": "Middle" + } ], - "hidden": false, "name": "MouseButton" }, { @@ -8525,39 +9393,24 @@ "type": "Number", "unit": "Newton", "label": "Maximum force", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxForce" }, { "value": "10", "type": "Number", "label": "Frequency (Hz) ", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Frequency" }, { "value": "1", "type": "Number", "label": "Damping ratio (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Damping" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseJointID" }, @@ -8566,9 +9419,6 @@ "type": "Boolean", "label": "Enable automatic dragging", "description": "If automatic dragging is disabled, use the \"Start drag\" and \"Release drag\" actions.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "EnableAutomaticDragging" } ], @@ -8582,12 +9432,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/toggle-switch", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", "name": "SpriteToggleSwitch", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.3.0", + "version": "2.0.2", "description": [ "Toggle switch that users can click or touch. The switch can be customized with sprites.", "", @@ -8608,8 +9459,39 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Toggle switches now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing toggle switches 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": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the switch object.", @@ -8630,12 +9512,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "WasChecked", + "False", + "" ] } ] @@ -8657,12 +9539,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "WasChecked", + "True", + "" ] } ] @@ -8684,11 +9566,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::TogglePropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "Toggle", + "" ] } ] @@ -8721,11 +9604,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] } ], @@ -8768,21 +9652,23 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -8826,20 +9712,22 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -8871,98 +9759,278 @@ "objectGroups": [] }, { - "description": "Check (or uncheck) the toggle switch.", - "fullName": "Check (or uncheck)", - "functionType": "Action", - "name": "SetChecked", - "sentence": "Check _PARAM0_: _PARAM2_", + "description": "Check if the toggle switch was toggled in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Avoid a started touch to interfere with a state change from events." + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenUnchecked" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check (or uncheck) the toggle switch.", + "fullName": "Check (or uncheck)", + "functionType": "Action", + "name": "SetChecked", + "sentence": "Check _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Avoid a started touch to interfere with a state change from events." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::And" + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } + "parameters": [ + "Object", + "ButtonFSM", + "" ] } ] } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsChecked", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, "parameters": [ "Object", - "ButtonFSM", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", "" ] } @@ -8973,23 +10041,25 @@ "conditions": [ { "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "PreviousIsChecked", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, "parameters": [ "Object", "Behavior", - "no" + "no", + "" ] } ] @@ -8999,22 +10069,26 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "PreviousIsChecked", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, "parameters": [ "Object", "Behavior", - "yes" + "yes", + "" ] } ] @@ -9031,13 +10105,6 @@ "name": "Behavior", "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", "type": "behavior" - }, - { - "defaultValue": "yes", - "description": "IsChecked", - "name": "Value", - "optional": true, - "type": "yesorno" } ], "objectGroups": [] @@ -9048,38 +10115,36 @@ "value": "", "type": "Behavior", "label": "Button finite state machine", - "description": "", - "group": "", "extraInformation": [ "SpriteToggleSwitch::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "false", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "IsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, - "name": "WasChecked" - } - ], - "sharedPropertyDescriptors": [] - }, - { + "name": "PreviousIsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "WasChecked" + } + ], + "sharedPropertyDescriptors": [] + }, + { "description": "The finite state machine used internally by the button object.", "fullName": "Button finite state machine", "name": "ButtonFSM", @@ -9093,61 +10158,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "SpriteToggleSwitch::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -9161,494 +10192,430 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ] - } - ], - "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": [ - "" + "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", + "" + ] + } ] } ], - "actions": [ + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "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": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "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": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -9657,13 +10624,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -9673,50 +10639,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"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": [] + ] } ], "parameters": [ @@ -9785,22 +10852,20 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -9835,11 +10900,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9884,11 +10948,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9933,11 +10996,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9982,11 +11044,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -10008,11 +11069,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10057,11 +11117,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -10106,11 +11165,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10159,7 +11217,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -10190,8 +11248,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -10199,25 +11255,35 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" - ], - "hidden": true, - "name": "State" - }, - { + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -10225,9 +11291,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -10235,9 +11298,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -10245,9 +11305,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -10257,47 +11314,137 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "ToggleSwitch", "description": "A toggle switch that users can click or touch.", "fullName": "Toggle switch", + "isUsingLegacyInstancesRenderer": false, "name": "SpriteToggleSwitch", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": 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." + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "State", - "0", - "0", - "" - ] + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] } ] }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -10315,10 +11462,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] } ], @@ -10336,11 +11485,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -10350,11 +11500,12 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] } ], @@ -10372,10 +11523,11 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", + "PreviousIsChecked", + "False", "" ] } @@ -10443,20 +11595,21 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "False", "" ] } @@ -10474,11 +11627,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -10488,20 +11642,21 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "True", "" ] } @@ -10519,11 +11674,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "PreviousIsChecked", + "False", + "" ] } ] @@ -10700,6 +11856,49 @@ ], "objectGroups": [] }, + { + "description": "Check if the toggle switch was checked or unchecked in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenToggled" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Check (or uncheck) the toggle switch.", "fullName": "Check (or uncheck)", @@ -10713,10 +11912,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -10739,10 +11940,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -10778,6 +11981,40 @@ ], "objectGroups": [] }, + { + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::ToggleChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Check if the button is not used.", "fullName": "Is idle", @@ -10958,7 +12195,6 @@ "fullName": "Is pressed", "functionType": "Condition", "name": "IsPressed", - "private": true, "sentence": "_PARAM0_ is pressed", "events": [ { @@ -10997,6 +12233,49 @@ ], "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": "SpriteToggleSwitch::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Update the state animation.", "fullName": "Update state animation", @@ -11115,10 +12394,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -11141,10 +12422,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -11225,10 +12508,6 @@ "value": "true", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "IsChecked" }, { @@ -11236,65 +12515,170 @@ "type": "Boolean", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousIsChecked" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "State", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false - } - ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "variants": [ + { + "areaMaxX": 32, + "areaMaxY": 34, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", + "assetStoreOriginalName": "Square White Toggle", + "name": "Square White Toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ + ], + "animations": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square White Toggle_Off.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square White Toggle_On.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } ] } - ] + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -11305,6 +12689,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Color Conversion", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWludmVydC1jb2xvcnMiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsMTkuNThWMTkuNThDMTAuNCwxOS41OCA4Ljg5LDE4Ljk2IDcuNzYsMTcuODNDNi42MiwxNi42OSA2LDE1LjE5IDYsMTMuNThDNiwxMiA2LjYyLDEwLjQ3IDcuNzYsOS4zNEwxMiw1LjFNMTcuNjYsNy45M0wxMiwyLjI3VjIuMjdMNi4zNCw3LjkzQzMuMjIsMTEuMDUgMy4yMiwxNi4xMiA2LjM0LDE5LjI0QzcuOSwyMC44IDkuOTUsMjEuNTggMTIsMjEuNThDMTQuMDUsMjEuNTggMTYuMSwyMC44IDE3LjY2LDE5LjI0QzIwLjc4LDE2LjEyIDIwLjc4LDExLjA1IDE3LjY2LDcuOTNaIiAvPjwvc3ZnPg==", "name": "ColorConversion", @@ -11335,6 +12720,8 @@ "onPsboRtDkUHNOsx7OPr8R8G1oj2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Converts a hexadecimal string into a RGB string. Example input: \"0459AF\".", @@ -12319,6 +13706,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": "", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", @@ -12345,6 +13733,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -12800,40 +14190,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Value" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -13911,8 +15285,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -13920,14 +15292,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -13936,9 +15321,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -13946,9 +15328,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -13956,9 +15335,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -13966,9 +15342,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -13978,10 +15351,187 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isUsingLegacyInstancesRenderer": true, "name": "PanelSpriteSlider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -15844,112 +17394,90 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -15957,8 +17485,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -15967,10 +17493,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -15979,10 +17505,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "FillBar" ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -15991,147 +17517,79 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Label" ], + "choices": [], "hidden": true, "name": "ShowLabel" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, + "variants": [] + } + ] + }, + { + "author": "", + "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": "2.1.1", + "description": [ + "A button that can be used for menus and most labelled buttons of a game. 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" + ], + "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": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - } - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } - ] + ], + "parameters": [], + "objectGroups": [] } - ] - }, - { - "author": "", - "category": "User interface", - "extensionNamespace": "", - "fullName": "Panel sprite button", - "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", - "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": [], - "eventsFunctions": [], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -16147,61 +17605,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "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\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -16215,494 +17639,430 @@ "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" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "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 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" + "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", + "" + ] + } ] - } - ] - } - ], - "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" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "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::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "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": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "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::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ], + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "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": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "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": { - "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": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] }, - { - "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" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -16711,13 +18071,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -16727,68 +18086,169 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] - } - ], - "parameters": [] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { + ], + "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": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { "fullName": "", "functionType": "Action", "name": "onDeActivate", @@ -16840,22 +18300,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" ] @@ -16890,11 +18348,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -16939,11 +18396,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -16988,11 +18444,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -17037,11 +18492,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -17063,11 +18517,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -17112,11 +18565,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -17161,11 +18613,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -17214,7 +18665,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -17245,8 +18696,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -17254,14 +18703,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -17270,9 +18732,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -17280,9 +18739,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -17290,9 +18746,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -17300,9 +18753,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -17312,97 +18762,321 @@ ], "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", - "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "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": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -17413,7 +19087,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", @@ -17425,38 +19099,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", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -17495,18 +19222,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": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -17568,12 +19324,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -17608,10 +19365,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -17620,7 +19377,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -17628,7 +19385,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -17639,10 +19396,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -17666,10 +19423,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -17686,10 +19444,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -17718,12 +19477,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -17763,10 +19523,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -17795,12 +19556,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -17852,12 +19614,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -17889,166 +19652,31 @@ } ], "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 - }, - "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" + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" }, "parameters": [ "Idle", @@ -18256,6 +19884,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -18264,21 +19893,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -18293,17 +19914,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": [ { @@ -18312,18 +19933,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -18335,12 +19956,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", @@ -18348,17 +19968,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -18371,91 +19991,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" ] } ] @@ -18469,124 +20108,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\"" - ] - } - ], - "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": "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" + "Labels", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -18605,165 +20194,1633 @@ ], "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", - "extraInformation": [ - "Label" + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.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, - "tags": "", - "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": "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": [] + } + ], + "editionSettings": [] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "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, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [], - "behaviors": [ + "layers": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": [] + } + ], + "editionSettings": [] + }, + { + "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": [] + } + ], + "editionSettings": [] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "tags": "", - "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": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", + "assetStoreOriginalName": "Grey Button With Shadow", + "name": "Grey 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, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Grey 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": "Grey 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": "Grey 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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": 59, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "f71aea9c-9a88-4ed6-a790-fcd132952d5f", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "tags": "", - "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": "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, + "lineHeight": 0, + "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 + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": 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": [] + } + ], + "editionSettings": [] } ] } @@ -18774,6 +21831,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Frames per second (FPS)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMzAsM2gtMkg0SDJDMS40LDMsMSwzLjQsMSw0czAuNCwxLDEsMWgxdjE2YzAsMC42LDAuNCwxLDEsMWg5LjhsLTUuNSw2LjNjLTAuNCwwLjQtMC4zLDEsMC4xLDEuNEM4LjUsMjkuOSw4LjgsMzAsOSwzMA0KCWMwLjMsMCwwLjYtMC4xLDAuOC0wLjNsNS4yLTZWMjhjMCwwLjYsMC40LDEsMSwxczEtMC40LDEtMXYtNC4zbDUuMiw2YzAuMiwwLjIsMC41LDAuMywwLjgsMC4zYzAuMiwwLDAuNS0wLjEsMC43LTAuMg0KCWMwLjQtMC40LDAuNS0xLDAuMS0xLjRMMTguMiwyMkgyOGMwLjYsMCwxLTAuNCwxLTFWNWgxYzAuNiwwLDEtMC40LDEtMVMzMC42LDMsMzAsM3ogTTI0LjgsOC42bC00LDZjLTAuMywwLjQtMC44LDAuNi0xLjMsMC4zDQoJTDE1LjgsMTNoLTMuNGwtMy43LDMuN0M4LjUsMTYuOSw4LjMsMTcsOCwxN3MtMC41LTAuMS0wLjctMC4zYy0wLjQtMC40LTAuNC0xLDAtMS40bDQtNGMwLjItMC4yLDAuNC0wLjMsMC43LTAuM2g0DQoJYzAuMiwwLDAuMywwLDAuNCwwLjFsMy4yLDEuNmwzLjUtNS4zYzAuMy0wLjUsMC45LTAuNiwxLjQtMC4zQzI1LDcuNSwyNS4xLDguMSwyNC44LDguNnoiLz4NCjwvc3ZnPg0K", "name": "FPS", @@ -18805,6 +21863,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "fullName": "", @@ -19188,10 +22248,6 @@ "value": "FPS: ", "type": "String", "label": "The prefix before the FPS count", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "prefix" }, { @@ -19199,10 +22255,6 @@ "type": "Number", "unit": "Dimensionless", "label": "Number of decimal digits to display", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "DecimalDigits" } ], @@ -19216,6 +22268,7 @@ "category": "General", "extensionNamespace": "", "fullName": "Repeat every X seconds", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJlcGVhdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNywxN0g3VjE0TDMsMThMNywyMlYxOUgxOVYxM0gxN003LDdIMTdWMTBMMjEsNkwxNywyVjVINVYxMUg3VjdaIiAvPjwvc3ZnPg==", "name": "RepeatEveryXSeconds", @@ -19238,6 +22291,8 @@ "IRIhkkTTl2UHhfjrLTTH5GYwkYu1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Triggers every X seconds.", @@ -19714,39 +22769,24 @@ "value": "MyTimer", "type": "String", "label": "The name of the timer to repeat", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TimerName" }, { "value": "1", "type": "Number", "label": "The time between each trigger (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TimerLength" }, { "value": "-1", "type": "Number", "label": "How many times should the timer trigger? -1 for forever.", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Limit" }, { "value": "0", "type": "Number", "label": "An internal counter", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Counter" } @@ -19761,6 +22801,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Create multiple copies of an object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdyaWQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAsNFY4SDE0VjRIMTBNMTYsNFY4SDIwVjRIMTZNMTYsMTBWMTRIMjBWMTBIMTZNMTYsMTZWMjBIMjBWMTZIMTZNMTQsMjBWMTZIMTBWMjBIMTRNOCwyMFYxNkg0VjIwSDhNOCwxNFYxMEg0VjE0SDhNOCw4VjRINFY4SDhNMTAsMTRIMTRWMTBIMTBWMTRNNCwySDIwQTIsMiAwIDAsMSAyMiw0VjIwQTIsMiAwIDAsMSAyMCwyMkg0QzIuOTIsMjIgMiwyMS4xIDIsMjBWNEEyLDIgMCAwLDEgNCwyWiIgLz48L3N2Zz4=", "name": "CreateMultipleCopiesOfObject", @@ -19800,6 +22841,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Create multiple copies of an object.\nSelect the object, choose the number of rows and columns, the spacing between rows and columns, the top left starting point, the layer to create the objects on, and the z-order of the objects.", @@ -20221,6 +23264,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/wave-defense-shooter/wave-defense-shooter.json b/examples/wave-defense-shooter/wave-defense-shooter.json index 2e72e4c56..53f857192 100644 --- a/examples/wave-defense-shooter/wave-defense-shooter.json +++ b/examples/wave-defense-shooter/wave-defense-shooter.json @@ -2195,13 +2195,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 1.0615714305220083, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -5306,7 +5309,7 @@ "assetStoreId": "e5919fb86a559b00001678c710efe55f4e9f2e032a9ff9610087370f998d57de", "name": "ScreenOrientationChecker", "type": "ScreenOrientationChecker::ScreenOrientationChecker", - "variant": "", + "variant": "Black screen orientation checker", "variables": [], "effects": [], "behaviors": [ From 19aedbc3ed0e1a12ce3cd0b7674ff9dfb162868a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 19 Nov 2025 16:25:17 +0100 Subject: [PATCH 4/4] Remove unused overriding --- examples/admob/admob.json | 1394 ------ .../conviction-of-gun-dude-mobile.json | 69 - .../crazygames-sdk-demo.json | 1016 +---- examples/load-testing/load-testing.json | 3994 ++++++----------- .../wave-defense-shooter.json | 111 - 5 files changed, 1445 insertions(+), 5139 deletions(-) diff --git a/examples/admob/admob.json b/examples/admob/admob.json index 408594c3c..1f8e3927e 100644 --- a/examples/admob/admob.json +++ b/examples/admob/admob.json @@ -3094,88 +3094,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Load" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -3194,88 +3112,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Display" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -3294,88 +3130,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Load And Display" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -3394,88 +3148,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Go To Banners" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -3494,88 +3166,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Go To Rewarded Videos" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } } ], @@ -4326,88 +3916,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Load" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -4426,88 +3934,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Display" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -4526,88 +3952,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Load And Display" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -4626,88 +3970,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Claim Reward" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -4726,88 +3988,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Go to Rewarded Interstitials" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -4826,88 +4006,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Go to Interstitials" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } } ], @@ -5733,88 +4831,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Load" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -5833,88 +4849,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Display" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -5933,88 +4867,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Load And Display" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -6033,88 +4885,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Claim Reward" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -6133,88 +4903,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Go to App Opens" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -6233,88 +4921,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Go to Rewarded Videos" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "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": 20, - "lineHeight": 0, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } } ], diff --git a/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json b/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json index 3bc22b327..1a0174e94 100644 --- a/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json +++ b/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json @@ -9417,75 +9417,6 @@ "BarRightPadding": 4, "MaxValue": 6, "InitialValue": 6 - }, - "childrenContent": { - "Background": { - "bottomMargin": 6, - "height": 34, - "leftMargin": 4, - "rightMargin": 4, - "texture": "assets\\HealthbarBorder.png", - "tiled": true, - "topMargin": 6, - "width": 224 - }, - "Buffer": { - "bottomMargin": 0, - "height": 24, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Healthbar.png", - "tiled": true, - "topMargin": 0, - "width": 24 - }, - "FillBar": { - "bottomMargin": 0, - "height": 24, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Healthbar.png", - "tiled": true, - "topMargin": 0, - "width": 24 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "6 / 6", - "font": "PTSans-Bold.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": "6 / 6", - "font": "PTSans-Bold.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 22, - "lineHeight": 0, - "color": "255;255;255" - } - } } }, { diff --git a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json index a702a0b9b..9959ecc79 100644 --- a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json +++ b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json @@ -2128,88 +2128,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Request banners" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Request banners", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Request banners", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -2228,88 +2146,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Hide all banners" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Hide all banners", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Hide all banners", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -3013,88 +2849,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Happy time" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Happy time", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Happy time", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -3131,88 +2885,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Gameplay stop" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -3231,88 +2903,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Generate invite link" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -3331,88 +2921,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Get room id" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Get room id", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Get room id", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -3729,88 +3237,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Open invite button" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Open invite button", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Open invite button", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -3829,188 +3255,24 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Hide invite button" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Hide invite button", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Hide invite button", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "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": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Loading_start", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Grey Button 2", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Game loading start" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Game loading start", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Game loading start", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "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": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Loading_start", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Game loading start" } }, { @@ -4029,88 +3291,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Game loading stop" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Game loading stop", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Game loading stop", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -6454,88 +5634,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Save session data" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "Save session data", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "Save session data", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { @@ -6554,88 +5652,6 @@ "TopPadding": 16, "HoveredFadeOutDuration": 0.25, "LabelText": "Load session data" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "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": "", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "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": "", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } } }, { diff --git a/examples/load-testing/load-testing.json b/examples/load-testing/load-testing.json index 80dbe4b58..ed48efcc4 100644 --- a/examples/load-testing/load-testing.json +++ b/examples/load-testing/load-testing.json @@ -301,42 +301,6 @@ "name": "Grey Button With Shadow_Pressed.png" } }, - { - "file": "assets/Square White Slider Border.png", - "kind": "image", - "metadata": "", - "name": "Square White Slider Border.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/324e5f522f6242e9f93090e75ddc38427c3a6c42e8236dbf0ed541bd85cf7221_Square White Slider Border.png", - "name": "Square White Slider Border.png" - } - }, - { - "file": "assets/Square White Slider Fill Bar.png", - "kind": "image", - "metadata": "", - "name": "Square White Slider Fill Bar.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/47bc684198cd25b3ec74b0e72c2e2c7abb1b6736bd9f4b78a943c663e83118bf_Square White Slider Fill Bar.png", - "name": "Square White Slider Fill Bar.png" - } - }, - { - "file": "assets/Square White Slider Thumb.png", - "kind": "image", - "metadata": "", - "name": "Square White Slider Thumb.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/848f861767e7ce4581dba9e122ee7bafeaca57987655cebe1f78ab31d1300f0f_Square White Slider Thumb.png", - "name": "Square White Slider Thumb.png" - } - }, { "file": "thumbnail.png", "kind": "image", @@ -836,6 +800,42 @@ "name": "Sprite4", "smoothed": true, "userAdded": true + }, + { + "file": "assets/Square White Slider Border.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Border.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/324e5f522f6242e9f93090e75ddc38427c3a6c42e8236dbf0ed541bd85cf7221_Square White Slider Border.png", + "name": "Square White Slider Border.png" + } + }, + { + "file": "assets/Square White Slider Fill Bar.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Fill Bar.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/47bc684198cd25b3ec74b0e72c2e2c7abb1b6736bd9f4b78a943c663e83118bf_Square White Slider Fill Bar.png", + "name": "Square White Slider Fill Bar.png" + } + }, + { + "file": "assets/Square White Slider Thumb.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Thumb.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/848f861767e7ce4581dba9e122ee7bafeaca57987655cebe1f78ab31d1300f0f_Square White Slider Thumb.png", + "name": "Square White Slider Thumb.png" + } } ] }, @@ -943,12 +943,13 @@ }, { "angle": 0, - "customSize": false, - "height": 48, + "customSize": true, + "depth": 64, + "height": 46, "layer": "", "name": "ObjectCount_Slider", "persistentUuid": "e1b31e8e-179b-4141-b609-6b7611c95823", - "width": 1792, + "width": 1782, "x": 64, "y": 208, "zOrder": 6, @@ -1003,12 +1004,13 @@ }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "depth": 64, + "height": 46, "layer": "", "name": "SceneChange_Slider", "persistentUuid": "2e30ddf9-d599-41b6-a506-ec8ea97ad049", - "width": 0, + "width": 1782, "x": 64, "y": 832, "zOrder": 10, @@ -1050,88 +1052,6 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Create \nSprites" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Create \nSprites", - "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": "Create \nSprites", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } } }, { @@ -1150,88 +1070,6 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Create \nTiled Sprites" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Create \nTiled Sprites", - "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": "Create \nTiled Sprites", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } } }, { @@ -1250,88 +1088,6 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Unused\nButton" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Purple Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Purple Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Unused\nButton", - "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": "Unused\nButton", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Purple Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } } }, { @@ -1350,88 +1106,6 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Create \nParticles" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Create \nParticles", - "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": "Create \nParticles", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } } }, { @@ -1450,95 +1124,13 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Start Changing Scenes" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Start Changing Scenes", - "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": "Start Changing Scenes", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } } }, { "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", "name": "ObjectCount_Slider", "type": "PanelSpriteSlider::PanelSpriteSlider", - "variant": "", + "variant": "Square white slider", "variables": [], "effects": [], "behaviors": [], @@ -1552,82 +1144,13 @@ "MaxValue": 500000, "MinValue": 500, "StepSize": 500 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 48, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square White Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 1792 - }, - "FillBar": { - "bottomMargin": 2, - "height": 46, - "leftMargin": 10, - "rightMargin": 0, - "texture": "Square White Slider Fill Bar.png", - "tiled": false, - "topMargin": 0, - "width": 1782 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Quantity", - "font": "", - "textAlignment": "", - "characterSize": 20, - "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": "Quantity", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 2, - "height": 64, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square White Slider Thumb.png", - "tiled": false, - "topMargin": 2, - "width": 32 - } } }, { "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", "name": "SceneChange_Slider", "type": "PanelSpriteSlider::PanelSpriteSlider", - "variant": "", + "variant": "Square white slider", "variables": [], "effects": [], "behaviors": [], @@ -1641,75 +1164,6 @@ "MaxValue": 1000, "MinValue": 1, "StepSize": 1 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 48, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square White Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 1792 - }, - "FillBar": { - "bottomMargin": 2, - "height": 46, - "leftMargin": 10, - "rightMargin": 0, - "texture": "Square White Slider Fill Bar.png", - "tiled": false, - "topMargin": 0, - "width": 1782 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Quantity", - "font": "", - "textAlignment": "", - "characterSize": 20, - "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": "Quantity", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 2, - "height": 64, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square White Slider Thumb.png", - "tiled": false, - "topMargin": 2, - "width": 32 - } } }, { @@ -3717,88 +3171,6 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Go back" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go back", - "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": "Go back", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } } }, { @@ -3817,88 +3189,6 @@ "TopPadding": 32, "HoveredFadeOutDuration": 0.25, "LabelText": "Delete Objects" - }, - "childrenContent": { - "BitmapLabel": { - "content": { - "text": "Text", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "center" - } - }, - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Delete Objects", - "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": "Delete Objects", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } } }, { @@ -5355,72 +4645,6 @@ "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { @@ -5433,72 +4657,6 @@ "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { @@ -5511,72 +4669,6 @@ "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { @@ -5589,72 +4681,6 @@ "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { @@ -5667,72 +4693,6 @@ "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { @@ -5745,72 +4705,6 @@ "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { @@ -5823,72 +4717,6 @@ "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { @@ -5901,72 +4729,6 @@ "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { @@ -5979,72 +4741,6 @@ "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } } ], @@ -13706,13 +12402,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", - "gdevelopVersion": "", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -13732,10 +12428,39 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders 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": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -13760,7 +12485,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyValue()" + "CurrentValue" ] } ] @@ -13796,11 +12521,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", "0" ] @@ -13809,13 +12533,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -13825,11 +12548,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "!=", "0" ] @@ -13838,13 +12560,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -13882,7 +12603,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMinValue()" + "MinValue" ] } ] @@ -13919,13 +12640,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -13975,7 +12695,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxValue()" + "MaxValue" ] } ] @@ -14012,13 +12732,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -14108,7 +12827,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyStepSize()" + "StepSize" ] } ] @@ -14145,13 +12864,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -14190,7 +12908,7 @@ "value": "0", "type": "Number", "label": "Value", - "name": "Value" + "name": "CurrentValue" }, { "value": "0", @@ -14227,61 +12945,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "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": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -14295,494 +12979,430 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "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": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "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", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "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::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "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": [], - "subInstructions": [ + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ], + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "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": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -14791,13 +13411,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -14807,66 +13426,167 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] - } - ], - "parameters": [] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] + ], + "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": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] }, { "fullName": "", @@ -14880,22 +13600,20 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -14930,11 +13648,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14979,11 +13696,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -15028,11 +13744,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -15077,11 +13792,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -15103,11 +13817,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -15152,11 +13865,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -15201,11 +13913,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -15254,7 +13965,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -15351,7 +14062,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -15360,7 +14071,8 @@ "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", "objects": [ { @@ -15421,6 +14133,16 @@ "variables": [], "effects": [], "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, { "name": "Draggable", "type": "DraggableBehavior::Draggable", @@ -15436,13 +14158,23 @@ "name": "FillBar", "rightMargin": 0, "texture": "", - "tiled": true, + "tiled": false, "topMargin": 0, "type": "PanelSpriteObject::PanelSprite", "width": 32, "variables": [], "effects": [], "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, { "name": "Slider", "type": "PanelSpriteSlider::Slider", @@ -15461,13 +14193,23 @@ "name": "Background", "rightMargin": 0, "texture": "", - "tiled": true, + "tiled": false, "topMargin": 0, "type": "PanelSpriteObject::PanelSprite", "width": 32, "variables": [], "effects": [], "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, { "name": "ButtonFSM", "type": "PanelSpriteSlider::ButtonFSM", @@ -15530,8 +14272,57 @@ "effects": [] } ], - "instances": [], - "editionSettings": [], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -15539,30 +14330,28 @@ "name": "onCreated", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "PanelSpriteSlider::IsInGameEdition" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Thumb", + "Draggable", + "" ] } ] @@ -15577,7 +14366,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances." + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15585,68 +14374,70 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Background", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, "parameters": [ - "", "FillBar", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, "parameters": [ - "", "Thumb", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Background", + "BarLeftPlusRightMargin", "=", - "1" + "Object.Width() - FillBar.Width()" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "FillBar", + "BarTopPlusBottomMargin", "=", - "2" + "Object.Height() - FillBar.Height()" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Thumb", + "PreviousInitialValue", "=", - "3" + "InitialValue" ] } ] @@ -15679,25 +14470,6 @@ "" ] }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Label", - "=", - "4" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "no" - ] - }, { "type": { "value": "Cache" @@ -15740,7 +14512,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -15800,15 +14572,6 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" @@ -15825,24 +14588,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -15852,7 +14615,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -15876,452 +14639,386 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Background", - "ButtonFSM" - ] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - }, - { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" + "value": "BehaviorActivated" }, "parameters": [ - "Thumb", - "Draggable" + "Background", + "ButtonFSM" ] - }, + } + ], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "inverted": true, + "value": "DraggableBehavior::Dragged" }, "parameters": [ - "Background", - "ButtonFSM", - "" + "Thumb", + "Draggable" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "inverted": true, + "value": "DraggableBehavior::Dropped" }, "parameters": [ - "Background", - "ButtonFSM", - "" + "Thumb", + "Draggable" ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, "parameters": [ - "Label", - "" + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" ] - }, - { + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { "type": { - "value": "ResetObjectTimer" + "value": "DraggableBehavior::Dragged" }, "parameters": [ - "Label", - "\"HideBack\"" + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "DraggableBehavior::Dropped" }, "parameters": [ - "Object" + "Thumb", + "Draggable" ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "ResetObjectTimer" }, "parameters": [ "Label", - "" + "\"HideBack\"" ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": [ - "Object" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Label", - "" - ] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Label" - ] }, { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - } - ] - } - ], - "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 parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\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(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } ] } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, + ], "parameters": [] } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": [ - "Object", - "" - ] - } ] } ], @@ -16460,7 +15157,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -16547,16 +15244,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -16643,16 +15331,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -16739,7 +15418,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -16775,10 +15454,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabelAtChanges", + "True", + "" ] } ], @@ -16818,21 +15499,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "ShowLabelAtChanges", + "False", + "" ] }, { @@ -16850,21 +15534,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShowLabelAtChanges", + "True", + "" ] }, { @@ -16894,53 +15581,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -16973,10 +15613,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -16994,7 +15635,7 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { @@ -17015,10 +15656,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -17029,105 +15671,35 @@ }, "parameters": [ "Label", - "=", - "Thumb.CenterX()" - ] - }, - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Label", - "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" - ] - }, - { - "type": { - "value": "TextObject::Angle" - }, - "parameters": [ - "Label", - "=", - "-Object.Angle()" - ] - } - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.PropertyBarLeftPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" + "=", + "Thumb.CenterX()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Label", + "=", + "-Object.Angle()" + ] + } ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -17154,7 +15726,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -17204,9 +15776,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -17216,7 +15787,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -17227,7 +15798,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -17256,10 +15827,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -17292,10 +15865,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -17400,6 +15975,7 @@ "FillBar" ], "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { @@ -17412,6 +15988,7 @@ "FillBar" ], "choices": [], + "hidden": true, "name": "BarTopPadding" }, { @@ -17424,6 +16001,7 @@ "FillBar" ], "choices": [], + "hidden": true, "name": "BarRightPadding" }, { @@ -17436,6 +16014,7 @@ "FillBar" ], "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { @@ -17448,6 +16027,7 @@ { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", "group": "Label", "name": "LabelMargin" @@ -17455,6 +16035,7 @@ { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", "group": "Value", "name": "MinValue" @@ -17462,6 +16043,7 @@ { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", "group": "Value", "name": "MaxValue" @@ -17469,6 +16051,7 @@ { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", "group": "Value", "name": "StepSize" @@ -17476,6 +16059,7 @@ { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", "group": "Value", "name": "InitialValue" @@ -17523,9 +16107,289 @@ "choices": [], "hidden": true, "name": "ShowLabel" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" } ], - "variants": [] + "variants": [ + { + "areaMaxX": 265, + "areaMaxY": 28, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", + "assetStoreOriginalName": "Square white slider", + "name": "Square white slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "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": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 2, + "height": 36, + "leftMargin": 1, + "name": "Thumb", + "rightMargin": 2, + "texture": "Square White Slider Thumb.png", + "tiled": false, + "topMargin": 2, + "type": "PanelSpriteObject::PanelSprite", + "width": 22, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 2, + "height": 16, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "Square White Slider Fill Bar.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 16, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 4, + "height": 28, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square White Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 265, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 16, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 253, + "x": 6, + "y": 6, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 248, + "y": -4, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {} + } + ] } ] }, diff --git a/examples/wave-defense-shooter/wave-defense-shooter.json b/examples/wave-defense-shooter/wave-defense-shooter.json index 53f857192..b6faa348a 100644 --- a/examples/wave-defense-shooter/wave-defense-shooter.json +++ b/examples/wave-defense-shooter/wave-defense-shooter.json @@ -5329,117 +5329,6 @@ "BackgroundColor": "24;24;24", "CornerRadius": 8, "Padding": 5 - }, - "childrenContent": { - "BackgroundPainter": { - "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 - } - }, - "Icon": { - "adaptCollisionMaskAutomatically": true, - "updateIfNotVisible": false, - "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 - } - ] - ] - } - ] - } - ] - } - ] - }, - "Text": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "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, - "lineHeight": 0, - "color": "255;255;255" - } - } } } ],