diff --git a/examples/rectangular-movement/README.md b/examples/rectangular-movement/README.md index 5cd5bb18e..555aa28f9 100644 --- a/examples/rectangular-movement/README.md +++ b/examples/rectangular-movement/README.md @@ -1,3 +1 @@ -# Rectangular Movement Example - -This project implements the Rectangular Movement extension and demonstrates how to use its events and actions. +Show how to use the "Rectangular movement" extension. diff --git a/examples/rectangular-movement/assets/Blank button.png b/examples/rectangular-movement/assets/Blank button.png deleted file mode 100644 index f4ca60589..000000000 Binary files a/examples/rectangular-movement/assets/Blank button.png and /dev/null differ diff --git a/examples/rectangular-movement/assets/Blueenemy2-1.png b/examples/rectangular-movement/assets/Blueenemy2-1.png deleted file mode 100644 index 91a136acc..000000000 Binary files a/examples/rectangular-movement/assets/Blueenemy2-1.png and /dev/null differ diff --git a/examples/rectangular-movement/assets/Bottom arrow round button.png b/examples/rectangular-movement/assets/Bottom arrow round button.png new file mode 100644 index 000000000..20778061b Binary files /dev/null and b/examples/rectangular-movement/assets/Bottom arrow round button.png differ diff --git a/examples/rectangular-movement/assets/BottomLeftButton.png b/examples/rectangular-movement/assets/BottomLeftButton.png new file mode 100644 index 000000000..0d5da95cf Binary files /dev/null and b/examples/rectangular-movement/assets/BottomLeftButton.png differ diff --git a/examples/rectangular-movement/assets/BottomLeftCorner.png b/examples/rectangular-movement/assets/BottomLeftCorner.png new file mode 100644 index 000000000..607d523ed Binary files /dev/null and b/examples/rectangular-movement/assets/BottomLeftCorner.png differ diff --git a/examples/rectangular-movement/assets/BottomRightButton.png b/examples/rectangular-movement/assets/BottomRightButton.png new file mode 100644 index 000000000..060ef0f4c Binary files /dev/null and b/examples/rectangular-movement/assets/BottomRightButton.png differ diff --git a/examples/rectangular-movement/assets/BottomRightCorner.png b/examples/rectangular-movement/assets/BottomRightCorner.png new file mode 100644 index 000000000..19b79c79e Binary files /dev/null and b/examples/rectangular-movement/assets/BottomRightCorner.png differ diff --git a/examples/rectangular-movement/assets/HorizontalEdgeIcon.png b/examples/rectangular-movement/assets/HorizontalEdgeIcon.png new file mode 100644 index 000000000..2d9897d6f Binary files /dev/null and b/examples/rectangular-movement/assets/HorizontalEdgeIcon.png differ diff --git a/examples/rectangular-movement/assets/Launch round button.png b/examples/rectangular-movement/assets/Launch round button.png new file mode 100644 index 000000000..01fc3586b Binary files /dev/null and b/examples/rectangular-movement/assets/Launch round button.png differ diff --git a/examples/rectangular-movement/assets/Left arrow round button.png b/examples/rectangular-movement/assets/Left arrow round button.png new file mode 100644 index 000000000..67a58b14b Binary files /dev/null and b/examples/rectangular-movement/assets/Left arrow round button.png differ diff --git a/examples/rectangular-movement/assets/Red playerShip (1).png b/examples/rectangular-movement/assets/Red playerShip (1).png new file mode 100644 index 000000000..213f1be09 Binary files /dev/null and b/examples/rectangular-movement/assets/Red playerShip (1).png differ diff --git a/examples/rectangular-movement/assets/Right arrow round button.png b/examples/rectangular-movement/assets/Right arrow round button.png new file mode 100644 index 000000000..0abd109d1 Binary files /dev/null and b/examples/rectangular-movement/assets/Right arrow round button.png differ diff --git a/examples/rectangular-movement/assets/Top arrow round button.png b/examples/rectangular-movement/assets/Top arrow round button.png new file mode 100644 index 000000000..ff83e7288 Binary files /dev/null and b/examples/rectangular-movement/assets/Top arrow round button.png differ diff --git a/examples/rectangular-movement/assets/TopLeftButton.png b/examples/rectangular-movement/assets/TopLeftButton.png new file mode 100644 index 000000000..f446b5370 Binary files /dev/null and b/examples/rectangular-movement/assets/TopLeftButton.png differ diff --git a/examples/rectangular-movement/assets/TopLeftCorner.png b/examples/rectangular-movement/assets/TopLeftCorner.png new file mode 100644 index 000000000..ae105d886 Binary files /dev/null and b/examples/rectangular-movement/assets/TopLeftCorner.png differ diff --git a/examples/rectangular-movement/assets/TopRightButton.png b/examples/rectangular-movement/assets/TopRightButton.png new file mode 100644 index 000000000..49eb91de3 Binary files /dev/null and b/examples/rectangular-movement/assets/TopRightButton.png differ diff --git a/examples/rectangular-movement/assets/TopRightCorner.png b/examples/rectangular-movement/assets/TopRightCorner.png new file mode 100644 index 000000000..d572f6577 Binary files /dev/null and b/examples/rectangular-movement/assets/TopRightCorner.png differ diff --git a/examples/rectangular-movement/assets/VerticalEdgeIcon.png b/examples/rectangular-movement/assets/VerticalEdgeIcon.png new file mode 100644 index 000000000..ef14ab6c0 Binary files /dev/null and b/examples/rectangular-movement/assets/VerticalEdgeIcon.png differ diff --git a/examples/rectangular-movement/rectangular-movement.json b/examples/rectangular-movement/rectangular-movement.json index 416952870..cc2fd0000 100644 --- a/examples/rectangular-movement/rectangular-movement.json +++ b/examples/rectangular-movement/rectangular-movement.json @@ -10,18 +10,20 @@ "adaptGameResolutionAtRuntime": true, "folderProject": false, "orientation": "landscape", - "packageName": "com.example.rectanglemovement", + "packageName": "com.example.gamename", "pixelsRounding": false, - "projectUuid": "55e2cfd8-022d-4f73-93cf-cc038b71d8a1", + "projectUuid": "be98d949-c9a0-4972-86df-1cfb5a10fea6", "scaleMode": "linear", "sizeOnStartupMode": "", + "templateSlug": "", "useExternalSourceFiles": false, "version": "1.0.0", - "name": "Rectangular Movement", - "author": "Tristan Rhodes (https://victrisgames.itch.io/)", - "windowWidth": 1280, - "windowHeight": 720, - "latestCompilationDirectory": "C:\\Users\\User\\Downloads\\RectangularMovementExtension", + "name": "Rectangular movement example", + "description": "Show how to use the \"Rectangular movement\" extension.", + "author": "", + "windowWidth": 854, + "windowHeight": 480, + "latestCompilationDirectory": "", "maxFPS": 60, "minFPS": 20, "verticalSync": false, @@ -42,10 +44,12 @@ "showGDevelopSplash": true, "showProgressBar": true }, - "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "categories": [], + "playableDevices": [], "extensionProperties": [], "platforms": [ { @@ -58,23 +62,169 @@ "resources": [ { "alwaysLoaded": false, - "file": "assets/Blank button.png", + "file": "assets/Red playerShip (1).png", "kind": "image", "metadata": "", - "name": "Blank button.png", + "name": "Red playerShip (1).png", "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://resources.gdevelop-app.com/assets/On-Screen Controls/Sprites/Shaded Light/Blank button.png", + "identifier": "https://resources.gdevelop-app.com/assets/Space Shooter/PNG/Red playerShip (1).png", "name": "gdevelop-asset-store" } }, { "alwaysLoaded": false, - "file": "assets/Blueenemy2-1.png", + "file": "assets/Bottom arrow round button.png", "kind": "image", "metadata": "", - "name": "Blueenemy2-1.png", + "name": "Bottom arrow round button.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/On-Screen Controls/Sprites/Line Light/Bottom arrow round button.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Left arrow round button.png", + "kind": "image", + "metadata": "", + "name": "Left arrow round button.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/On-Screen Controls/Sprites/Line Light/Left arrow round button.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Right arrow round button.png", + "kind": "image", + "metadata": "", + "name": "Right arrow round button.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/On-Screen Controls/Sprites/Line Light/Right arrow round button.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Top arrow round button.png", + "kind": "image", + "metadata": "", + "name": "Top arrow round button.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/On-Screen Controls/Sprites/Line Light/Top arrow round button.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Launch round button.png", + "kind": "image", + "metadata": "", + "name": "Launch round button.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/On-Screen Controls/Sprites/Shaded Light/Launch round button.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/TopLeftButton.png", + "kind": "image", + "metadata": "", + "name": "assets\\TopLeftButton.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/BottomLeftButton.png", + "kind": "image", + "metadata": "", + "name": "assets\\BottomLeftButton.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/TopRightButton.png", + "kind": "image", + "metadata": "", + "name": "assets\\TopRightButton.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/BottomRightButton.png", + "kind": "image", + "metadata": "", + "name": "assets\\BottomRightButton.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/TopLeftCorner.png", + "kind": "image", + "metadata": "", + "name": "assets\\TopLeftCorner.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/TopRightCorner.png", + "kind": "image", + "metadata": "", + "name": "assets\\TopRightCorner.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/BottomRightCorner.png", + "kind": "image", + "metadata": "", + "name": "assets\\BottomRightCorner.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/BottomLeftCorner.png", + "kind": "image", + "metadata": "", + "name": "assets\\BottomLeftCorner.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/VerticalEdgeIcon.png", + "kind": "image", + "metadata": "", + "name": "assets\\VerticalEdgeIcon.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/HorizontalEdgeIcon.png", + "kind": "image", + "metadata": "", + "name": "assets\\HorizontalEdgeIcon.png", "smoothed": true, "userAdded": true } @@ -86,20 +236,17 @@ "variables": [], "layouts": [ { - "b": 209, + "b": 31, "disableInputWhenNotFocused": true, - "mangledName": "RectangularMovement_32Test_32Game", - "name": "RectangularMovement Test Game", - "oglFOV": 90, - "oglZFar": 500, - "oglZNear": 1, - "r": 209, + "mangledName": "Rectangular_32Movement", + "name": "Rectangular Movement", + "r": 31, "standardSortMethod": true, "stopSoundsOnStartup": true, "title": "", - "v": 209, + "v": 31, "uiSettings": { - "grid": true, + "grid": false, "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, @@ -107,16 +254,25 @@ "gridOffsetY": 0, "gridColor": 10401023, "gridAlpha": 0.8, - "snap": true, - "zoomFactor": 0.41000000000000014, + "snap": false, + "zoomFactor": 1.1333333183288583, "windowMask": false }, "objectsGroups": [ { - "name": "Group", + "name": "Corner", "objects": [ { - "name": "MovingObject" + "name": "TopLeftCorner" + }, + { + "name": "TopRightCorner" + }, + { + "name": "BottomRightCorner" + }, + { + "name": "BottomLeftCorner" } ] } @@ -128,13 +284,12 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, - "name": "MainObject", - "persistentUuid": "1fca795b-8789-4747-b9ba-d04824d62859", + "name": "RedPlayerShip1", + "persistentUuid": "dd4c94fd-46c2-4295-a91f-dd5bd83adcdc", "width": 0, - "x": 600, - "y": 516, - "zOrder": 2, + "x": 135, + "y": 191, + "zOrder": 3, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -144,77 +299,72 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, - "name": "MovingObject", - "persistentUuid": "09dbf012-2918-4cf5-bc8d-cab1b8b8cd18", + "name": "Trajectory", + "persistentUuid": "14c2a1d9-7d36-41d4-ac60-819e8820da0e", "width": 0, - "x": 640, - "y": 288, - "zOrder": 1000, + "x": 364, + "y": -60, + "zOrder": 1, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "height": 32, "layer": "", - "locked": false, - "name": "Title", - "persistentUuid": "872296ea-6d2e-4cd6-8178-a885fd0eac8b", - "width": 0, - "x": 352, - "y": 32, - "zOrder": 11, + "name": "BottomArrowRoundButton", + "persistentUuid": "df762352-5127-472c-93a3-0afcdde4d15e", + "width": 32, + "x": 777, + "y": 70, + "zOrder": 4, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "height": 32, "layer": "", - "locked": false, - "name": "SliderAmplitudeX", - "persistentUuid": "5fdeecdf-99b3-43b3-9c0a-d432191e03c2", - "width": 0, - "x": 32, - "y": 256, - "zOrder": 12, + "name": "LeftArrowRoundButton", + "persistentUuid": "82b9d847-0e61-44ff-9347-fc1e56a83474", + "width": 32, + "x": 750, + "y": 43, + "zOrder": 5, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "height": 32, "layer": "", - "locked": false, - "name": "SliderAmplitudeY", - "persistentUuid": "8f8904ee-711d-4c93-a7c7-f6e01da90e19", - "width": 0, - "x": 32, - "y": 320, - "zOrder": 13, + "name": "RightArrowRoundButton", + "persistentUuid": "92a19aae-673d-4369-93a5-75c5f2a646a6", + "width": 32, + "x": 804, + "y": 43, + "zOrder": 6, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "height": 32, "layer": "", - "locked": false, - "name": "SliderInitialY", - "persistentUuid": "50f0cd3d-b330-4a2b-901d-551a67ae946d", - "width": 0, - "x": 32, - "y": 192, - "zOrder": 14, + "name": "TopArrowRoundButton", + "persistentUuid": "c61738a6-47b5-4043-a440-c74dfd737dcd", + "width": 32, + "x": 777, + "y": 16, + "zOrder": 7, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -224,29 +374,27 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, - "name": "SliderInitialX", - "persistentUuid": "8d8998c0-97bd-411e-ba55-3591f1cb471d", + "name": "CurrentEdge", + "persistentUuid": "13e1b39b-e9b4-4f52-80cb-d16367629ae0", "width": 0, - "x": 32, - "y": 128, - "zOrder": 15, + "x": 400, + "y": -60, + "zOrder": 2, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "height": 32, "layer": "", - "locked": false, - "name": "AmplitudeX", - "persistentUuid": "5a9f9754-ce5f-4164-a2e5-ff4e1afbe956", - "width": 0, - "x": 32, - "y": 224, - "zOrder": 16, + "name": "LaunchRoundButton", + "persistentUuid": "dbb9127d-4786-4677-8bbd-7d82ac5ffe6c", + "width": 32, + "x": 117, + "y": 46, + "zOrder": 8, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -256,77 +404,72 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, - "name": "AmplitudeY", - "persistentUuid": "baae9530-00af-41a9-88a8-3404a3bb21af", + "name": "HorizontalDurationSlider", + "persistentUuid": "4fc8c105-82d3-4ac0-bd31-ed0b22e65bcf", "width": 0, - "x": 32, - "y": 288, - "zOrder": 17, + "x": 284, + "y": 32, + "zOrder": 9, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "height": 32, "layer": "", - "locked": false, - "name": "InitialY", - "persistentUuid": "ee53f801-bcce-41b7-a229-3e8dafa70fb2", - "width": 0, - "x": 32, - "y": 160, - "zOrder": 18, + "name": "TopRightButton", + "persistentUuid": "9102e136-36a2-4ede-b327-6edd216c51ab", + "width": 32, + "x": 65, + "y": 20, + "zOrder": 10, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "height": 32, "layer": "", - "locked": false, - "name": "InitialX", - "persistentUuid": "e3e32539-b298-408d-ae57-89ff3f8b74ae", - "width": 0, - "x": 32, - "y": 96, - "zOrder": 19, + "name": "TopLeftButton", + "persistentUuid": "46c5ca26-1377-4924-af5d-ca27f6e1834e", + "width": 32, + "x": 16, + "y": 20, + "zOrder": 11, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "height": 32, "layer": "", - "locked": false, - "name": "SpeedX", - "persistentUuid": "79dfcc0e-8408-485a-876f-744a61a2e6bd", - "width": 0, - "x": 32, - "y": 352, - "zOrder": 20, + "name": "BottomLeftButton", + "persistentUuid": "c1f0c170-7c20-461f-83e3-74e05dca06a2", + "width": 32, + "x": 16, + "y": 70, + "zOrder": 12, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "height": 32, "layer": "", - "locked": false, - "name": "SpeedY", - "persistentUuid": "ff2be163-7d39-4b81-8dcb-0b67c89e499a", - "width": 0, - "x": 32, - "y": 416, - "zOrder": 21, + "name": "BottomRightButton", + "persistentUuid": "55f62165-8179-4057-9b59-cfdb14295aac", + "width": 32, + "x": 65, + "y": 70, + "zOrder": 13, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -336,13 +479,12 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, - "name": "SliderSpeedX", - "persistentUuid": "fb5c942c-976d-4ed3-af8a-17d9bc6a7683", + "name": "VerticalDurationText", + "persistentUuid": "c9d9f889-f23a-4d32-8052-5ba2fd810116", "width": 0, - "x": 32, - "y": 384, - "zOrder": 22, + "x": 512, + "y": 78, + "zOrder": 14, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -352,29 +494,12 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, - "name": "SliderSpeedY", - "persistentUuid": "c62d30e7-9dac-4ed9-a8bf-18f7d87e95d3", + "name": "HorizontalDurationText", + "persistentUuid": "fd3d01e7-ecaf-4235-a687-7512106f5a39", "width": 0, - "x": 32, - "y": 448, - "zOrder": 23, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 64, - "layer": "", - "locked": false, - "name": "BlankButton", - "persistentUuid": "059e9b6e-51ae-44a7-ac63-330a9cd4c563", - "width": 160, - "x": 32, - "y": 608, - "zOrder": 24, + "x": 512, + "y": 18, + "zOrder": 15, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -384,13 +509,12 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, - "name": "Reset", - "persistentUuid": "8c29a9dc-dbe5-409e-9c58-9cbf89098385", + "name": "VerticalDurationSlider", + "persistentUuid": "cf4d24ec-5bfb-49ba-91f9-854d4e576372", "width": 0, - "x": 64, - "y": 608, - "zOrder": 25, + "x": 284, + "y": 92, + "zOrder": 16, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -400,13 +524,12 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, - "name": "BorderLine", - "persistentUuid": "28b85ea2-008d-4695-b971-3c520eb633f5", + "name": "VerticalEdgeIcon", + "persistentUuid": "85025344-06bd-4f92-b80f-e90d74bb8941", "width": 0, - "x": 576, - "y": -32, - "zOrder": 1000, + "x": 228, + "y": 76, + "zOrder": 17, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -416,202 +539,210 @@ "customSize": false, "height": 0, "layer": "", - "locked": false, - "name": "AboveHorizon", - "persistentUuid": "38b5e782-4bd3-497c-9590-5e1ebb0c4a75", + "name": "HorizontalEdgeIcon", + "persistentUuid": "4eed9e50-163a-47c9-86ed-29d24ee93c4b", "width": 0, - "x": 672, - "y": -32, - "zOrder": 0, + "x": 228, + "y": 16, + "zOrder": 18, "numberProperties": [], "stringProperties": [], "initialVariables": [] - }, + } + ], + "objects": [ { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "locked": false, - "name": "SineProgressX", - "persistentUuid": "934ee344-bc2b-437f-856f-00582ddb79b1", - "width": 0, - "x": 384, - "y": 640, - "zOrder": 100, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "assetStoreId": "2b2dfbbe01d820384d341ecfa1cf553b2700019a4f78c1d6fc4c55cb4b373bf5", + "name": "RedPlayerShip1", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "RectangularMovement", + "type": "RectangleMovement::RectangleMovement", + "Width": 500, + "Height": 200, + "CounterClockwise": false, + "LoopDuration": 4, + "Left": 4, + "Top": 4, + "Progress": 4, + "Easing": "easeInOutBack", + "InitialPosition": "Top-left corner", + "Clockwise": true, + "HorizontalEdgeDuration": 2, + "VerticalEdgeDuration": 1.25 + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Red playerShip (1).png", + "points": [], + "originPoint": { + "name": "origine", + "x": 50, + "y": 37 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 32, + "y": 32 + }, + { + "x": 67, + "y": 32 + }, + { + "x": 67, + "y": 64 + }, + { + "x": 32, + "y": 64 + } + ] + ] + } + ] + } + ] + } + ] }, { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "locked": false, - "name": "SineProgressY", - "persistentUuid": "38cce5c2-fa75-49ad-b976-8d4b50fc6d13", - "width": 0, - "x": 384, - "y": 672, - "zOrder": 100, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "assetStoreId": "", + "name": "Trajectory", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 0, + "outlineSize": 2, + "outlineOpacity": 255, + "fillColor": { + "b": 255, + "g": 255, + "r": 255 + }, + "outlineColor": { + "b": 111, + "g": 111, + "r": 111 + }, + "absoluteCoordinates": true, + "clearBetweenFrames": true }, { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "locked": false, - "name": "SineValueX", - "persistentUuid": "30727279-248d-41c7-9d82-d136b3a3ff0e", - "width": 0, - "x": 672, - "y": 640, - "zOrder": 100, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "locked": false, - "name": "SineValueY", - "persistentUuid": "a48c8e04-740d-4222-9012-c0b3a3a1110f", - "width": 0, - "x": 672, - "y": 672, - "zOrder": 100, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "locked": false, - "name": "CheckboxConstantSpeed", - "persistentUuid": "05cadcf9-73e7-426a-8ed9-ef12a14caa1f", - "width": 0, - "x": 32, - "y": 480, - "zOrder": 1001, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "locked": false, - "name": "ConstantSpeed", - "persistentUuid": "c4c9ce4a-b23d-4d1a-8585-ce1d08fdb890", - "width": 0, - "x": 64, - "y": 480, - "zOrder": 1002, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "locked": false, - "name": "CheckboxCounterClockwise", - "persistentUuid": "95315f11-619c-47a6-b6ae-5eb03e354c90", - "width": 0, - "x": 32, - "y": 544, - "zOrder": 1003, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "locked": false, - "name": "CounterClockwise", - "persistentUuid": "5b5a6116-ee20-4fb3-810b-4158bfa94868", - "width": 0, - "x": 64, - "y": 544, - "zOrder": 1004, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "assetStoreId": "", + "name": "CurrentEdge", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 2, + "outlineOpacity": 255, + "fillColor": { + "b": 27, + "g": 2, + "r": 208 + }, + "outlineColor": { + "b": 27, + "g": 2, + "r": 208 + }, + "absoluteCoordinates": true, + "clearBetweenFrames": true }, { - "angle": 0, - "customSize": true, - "height": 64, - "layer": "", - "locked": false, - "name": "Direction", - "persistentUuid": "3eac246c-bd8b-4fe2-895c-4f674e65ea68", - "width": 192, - "x": 1056, - "y": 640, - "zOrder": 1005, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - } - ], - "objects": [ - { - "name": "MovingObject", + "assetStoreId": "e8d619ef35124fd6ba96fafde6790bdd7f80b9c65b4bccfbcbdb4e5025bc2788", + "name": "TopArrowRoundButton", "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [ + "behaviors": [], + "animations": [ { - "name": "RectangularMovement", - "type": "RectangularMovement::RectangularMovement", - "HorizontalSpeed": 100, - "VerticalSpeed": 100, - "HorizontalDistance": 100, - "VerticalDistance": 100, - "CenterPointX": 0, - "CenterPointY": 0, - "SineProgressX": 0, - "SineProgressY": 0, - "RectangularCounter": 0 + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Top arrow round button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } - ], + ] + }, + { + "assetStoreId": "4992f730d6f87d96e8bc8c4279b76e3df5b1a53bf611023b547674d38a52f49e", + "name": "BottomArrowRoundButton", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], "animations": [ { - "name": "Crate", + "name": "", "useMultipleDirections": false, "directions": [ { - "looping": false, - "timeBetweenFrames": 0.07999999821186066, + "looping": true, + "timeBetweenFrames": 0.02500000037252903, "sprites": [ { "hasCustomCollisionMask": false, - "image": "Blueenemy2-1.png", + "image": "Bottom arrow round button.png", "points": [], "originPoint": { "name": "origine", - "x": 42, - "y": 51 + "x": 0, + "y": 0 }, "centerPoint": { "automatic": true, @@ -628,211 +759,319 @@ ] }, { - "bold": true, - "italic": false, - "name": "Title", - "smoothed": true, + "assetStoreId": "63f198801b80f7d94ab9653a37dcda58393fb32c380cec95815084894f3cf0ec", + "name": "LeftArrowRoundButton", "tags": "", - "type": "TextObject::Text", - "underlined": false, + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [], - "string": "Extension: Rectangular Movement", - "font": "", - "characterSize": 40, - "color": { - "b": 0, - "g": 0, - "r": 0 - } + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Left arrow round button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] }, { - "name": "SliderAmplitudeX", + "assetStoreId": "7ef2a3d09ff02fd3f647486fdf8cb9c0ef78506840b7fab91bfcbbbb4a5d8cb4", + "name": "RightArrowRoundButton", "tags": "", - "type": "PrimitiveDrawing::Drawer", + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [ + "behaviors": [], + "animations": [ { - "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 + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Right arrow round button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + ] }, { - "name": "SliderAmplitudeY", + "assetStoreId": "", + "name": "TopLeftCorner", "tags": "", - "type": "PrimitiveDrawing::Drawer", + "type": "Sprite", + "updateIfNotVisible": false, "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 + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false } ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\TopLeftCorner.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] }, { - "name": "SliderInitialY", + "assetStoreId": "", + "name": "TopRightCorner", "tags": "", - "type": "PrimitiveDrawing::Drawer", + "type": "Sprite", + "updateIfNotVisible": false, "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 + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false } ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "animations": [ + { + "name": "TopRightCorner", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\TopRightCorner.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 32, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] }, { - "name": "SliderSpeedY", + "assetStoreId": "", + "name": "BottomRightCorner", "tags": "", - "type": "PrimitiveDrawing::Drawer", + "type": "Sprite", + "updateIfNotVisible": false, "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 + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false } ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "animations": [ + { + "name": "BottomRightCorner", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\BottomRightCorner.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 32, + "y": 32 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "BottomLeftCorner", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\BottomLeftCorner.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 32 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "1f5153411e23a057456c7c73223a9e82d85ebe12f98ee07b95eed2baaa49b5c8", + "name": "LaunchRoundButton", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Launch round button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] }, { - "name": "SliderSpeedX", + "assetStoreId": "", + "name": "HorizontalDurationSlider", "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], @@ -841,13 +1080,16 @@ { "name": "DraggableSliderControl", "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0.25, + "ValueMax": 4, + "TickSpacing": 0.01, "ThumbShape": "circle", "ThumbWidth": 20, "ThumbHeight": 20, - "ThumbColor": " 24;119;211", + "ThumbColor": "219;219;219", "ThumbOpacity": 255, - "TrackWidth": 200, - "TrackHeight": 4, + "TrackLength": 200, + "TrackThickness": 4, "InactiveTrackColor": "", "InactiveTrackOpacity": 96, "ActiveTrackColor": " ", @@ -855,10 +1097,18 @@ "HaloRadius": 24, "HaloOpacityHover": 32, "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, "IsBeingDragged": false, "Value": 0, "ThumbOffset": 0, - "RoundedTrack": true + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0.19999992847442627 } ], "fillOpacity": 255, @@ -878,7 +1128,8 @@ "clearBetweenFrames": true }, { - "name": "SliderSineOffset", + "assetStoreId": "", + "name": "VerticalDurationSlider", "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], @@ -887,13 +1138,16 @@ { "name": "DraggableSliderControl", "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0.25, + "ValueMax": 4, + "TickSpacing": 0.01, "ThumbShape": "circle", "ThumbWidth": 20, "ThumbHeight": 20, - "ThumbColor": " 24;119;211", + "ThumbColor": "219;219;219", "ThumbOpacity": 255, - "TrackWidth": 200, - "TrackHeight": 4, + "TrackLength": 200, + "TrackThickness": 4, "InactiveTrackColor": "", "InactiveTrackOpacity": 96, "ActiveTrackColor": " ", @@ -901,10 +1155,18 @@ "HaloRadius": 24, "HaloOpacityHover": 32, "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, "IsBeingDragged": false, "Value": 0, "ThumbOffset": 0, - "RoundedTrack": true + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0.19999992847442627 } ], "fillOpacity": 255, @@ -924,193 +1186,174 @@ "clearBetweenFrames": true }, { - "name": "SliderPowerY", + "assetStoreId": "14d7be205d64a5719d7d63a4cc681d984a67948efe4caa888fd054e268dad255", + "name": "TopRightButton", "tags": "", - "type": "PrimitiveDrawing::Drawer", + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [ + "behaviors": [], + "animations": [ { - "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 + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\BottomRightButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + ] }, { - "name": "SliderMaxScale", + "assetStoreId": "14d7be205d64a5719d7d63a4cc681d984a67948efe4caa888fd054e268dad255", + "name": "TopLeftButton", "tags": "", - "type": "PrimitiveDrawing::Drawer", + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [ + "behaviors": [], + "animations": [ { - "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 + "name": "TopLeftButton", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\TopLeftButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + ] }, { - "name": "SliderHorizon", + "assetStoreId": "14d7be205d64a5719d7d63a4cc681d984a67948efe4caa888fd054e268dad255", + "name": "BottomLeftButton", "tags": "", - "type": "PrimitiveDrawing::Drawer", + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [ + "behaviors": [], + "animations": [ { - "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 + "name": "BottomLeftButton", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\BottomLeftButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + ] }, { - "name": "SliderInitialX", + "assetStoreId": "14d7be205d64a5719d7d63a4cc681d984a67948efe4caa888fd054e268dad255", + "name": "BottomRightButton", "tags": "", - "type": "PrimitiveDrawing::Drawer", + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [ + "behaviors": [], + "animations": [ { - "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 + "name": "TopRightButton", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.02500000037252903, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\TopRightButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } - ], - "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": "", "bold": false, "italic": false, - "name": "SineProgressY", + "name": "VerticalDurationText", "smoothed": true, "tags": "", "type": "TextObject::Text", @@ -1118,19 +1361,20 @@ "variables": [], "effects": [], "behaviors": [], - "string": "SineProgress Y: 123", + "string": "1.25 seconds", "font": "", "characterSize": 20, "color": { - "b": 0, - "g": 0, - "r": 0 + "b": 233, + "g": 233, + "r": 233 } }, { + "assetStoreId": "", "bold": false, "italic": false, - "name": "SineProgressX", + "name": "HorizontalDurationText", "smoothed": true, "tags": "", "type": "TextObject::Text", @@ -1138,257 +1382,59 @@ "variables": [], "effects": [], "behaviors": [], - "string": "SineProgress X: 123", + "string": "2 seconds", "font": "", "characterSize": 20, "color": { - "b": 0, - "g": 0, - "r": 0 + "b": 233, + "g": 233, + "r": 233 } }, { - "bold": false, - "italic": false, - "name": "SineValueY", - "smoothed": true, + "assetStoreId": "", + "name": "VerticalEdgeIcon", "tags": "", - "type": "TextObject::Text", - "underlined": false, + "type": "Sprite", + "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [], - "string": "Sine Y: 123", - "font": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "bold": false, - "italic": false, - "name": "SineValueX", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Cosine X: 123", - "font": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "bold": true, - "italic": false, - "name": "Direction", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "UP/DOWN/\nLEFT/RIGHT", - "font": "", - "characterSize": 30, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "bold": false, - "italic": false, - "name": "InitialX", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Center X: 123", - "font": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "bold": false, - "italic": false, - "name": "InitialY", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Center Y: 123", - "font": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "bold": false, - "italic": false, - "name": "SpeedY", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Vertical Speed: 123", - "font": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "bold": false, - "italic": false, - "name": "SpeedX", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Horizontal Speed: 123", - "font": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "bold": false, - "italic": false, - "name": "CounterClockwise", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Counter-clockwise direction", - "font": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "bold": false, - "italic": false, - "name": "ConstantSpeed", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Constant speed", - "font": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "bold": false, - "italic": false, - "name": "AmplitudeY", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Vertical Distance: 123", - "font": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "bold": false, - "italic": false, - "name": "AmplitudeX", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Horizontal Distance: 123", - "font": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "bold": false, - "italic": false, - "name": "Reset", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": " Reset\nProgress", - "font": "", - "characterSize": 25, - "color": { - "b": 0, - "g": 0, - "r": 0 - } + "animations": [ + { + "name": "VerticalEdgeIcon", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\VerticalEdgeIcon.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] }, { - "name": "BlankButton", + "assetStoreId": "", + "name": "HorizontalEdgeIcon", "tags": "", "type": "Sprite", "updateIfNotVisible": false, @@ -1397,16 +1443,16 @@ "behaviors": [], "animations": [ { - "name": "", + "name": "VerticalEdgeIcon", "useMultipleDirections": false, "directions": [ { - "looping": true, - "timeBetweenFrames": 0.02500000037252903, + "looping": false, + "timeBetweenFrames": 0.07999999821186066, "sprites": [ { "hasCustomCollisionMask": false, - "image": "Blank button.png", + "image": "assets\\HorizontalEdgeIcon.png", "points": [], "originPoint": { "name": "origine", @@ -1426,1148 +1472,929 @@ ] } ] - }, - { - "name": "BorderLine", - "tags": "", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [], - "fillOpacity": 255, - "outlineSize": 5, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 224, - "g": 16, - "r": 189 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": true - }, - { - "name": "AboveHorizon", - "tags": "", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": true - }, - { - "name": "CheckboxCounterClockwise", - "tags": "", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Checkbox", - "type": "Checkbox::Checkbox", - "Checked": false, - "PrimaryColor": "24;119;211", - "SecondaryColor": "255;255;255", - "SideLength": 24, - "LineWidth": 5, - "HaloRadius": 0, - "ToggleChanged": false, - "Disabled": false, - "BorderThickness": 2, - "HaloOpacityHover": 64, - "HaloOpacityPressed": 96 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true - }, - { - "name": "CheckboxConstantSpeed", - "tags": "", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Checkbox", - "type": "Checkbox::Checkbox", - "Checked": false, - "PrimaryColor": "24;119;211", - "SecondaryColor": "255;255;255", - "SideLength": 24, - "LineWidth": 5, - "HaloRadius": 0, - "ToggleChanged": false, - "Disabled": false, - "BorderThickness": 2, - "HaloOpacityHover": 64, - "HaloOpacityPressed": 96 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true - } - ], - "events": [ + } + ], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "disabled": false, - "folded": false, - "name": "SineMovement", + "name": "Drag", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Set initial values of sliders", - "comment2": "" - }, - { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, "value": "DepartScene" }, "parameters": [ "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetValue" - }, - "parameters": [ - "SliderInitialX", - "DraggableSliderControl", - "0.5", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + "value": "Create" }, "parameters": [ - "SliderInitialY", - "DraggableSliderControl", - "0.5", + "", + "TopLeftCorner", + "RedPlayerShip1.RectangularMovement::Left()", + "RedPlayerShip1.RectangularMovement::Top()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + "value": "Create" }, "parameters": [ - "SliderAmplitudeX", - "DraggableSliderControl", - "0.8", + "", + "TopRightCorner", + "RedPlayerShip1.RectangularMovement::Right()", + "RedPlayerShip1.RectangularMovement::Top()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + "value": "Create" }, "parameters": [ - "SliderAmplitudeY", - "DraggableSliderControl", - "0.6", + "", + "BottomRightCorner", + "RedPlayerShip1.RectangularMovement::Right()", + "RedPlayerShip1.RectangularMovement::Bottom()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + "value": "Create" }, "parameters": [ - "SliderSpeedX", - "DraggableSliderControl", - "0.5", + "", + "BottomLeftCorner", + "RedPlayerShip1.RectangularMovement::Left()", + "RedPlayerShip1.RectangularMovement::Bottom()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + "value": "ChangePlan" }, "parameters": [ - "SliderSpeedY", - "DraggableSliderControl", - "0.5", - "" - ], - "subInstructions": [] + "Corner", + "=", + "3" + ] } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Update variables based on sliders", - "comment2": "" + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "ModVarScene" + "value": "DraggableBehavior::Dragged" }, "parameters": [ - "InitialX", - "=", - "round(SliderInitialX.DraggableSliderControl::Value()*1280)" - ], - "subInstructions": [] - }, + "TopLeftCorner", + "Draggable" + ] + } + ], + "actions": [ { "type": { - "inverted": false, - "value": "ModVarScene" + "value": "RectangleMovement::RectangleMovement::SetLeft" }, "parameters": [ - "InitialY", - "=", - "round(SliderInitialY.DraggableSliderControl::Value()*720)" - ], - "subInstructions": [] + "RedPlayerShip1", + "RectangularMovement", + "TopLeftCorner.X()", + "" + ] }, { "type": { - "inverted": false, - "value": "ModVarScene" + "value": "RectangleMovement::RectangleMovement::SetTop" }, "parameters": [ - "SpeedX", - "=", - "round(SliderSpeedX.DraggableSliderControl::Value()*600)" - ], - "subInstructions": [] - }, + "RedPlayerShip1", + "RectangularMovement", + "TopLeftCorner.Y()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "inverted": false, - "value": "ModVarScene" + "value": "DraggableBehavior::Dragged" }, "parameters": [ - "SpeedY", - "=", - "round(SliderSpeedY.DraggableSliderControl::Value()*600)" - ], - "subInstructions": [] - }, + "TopRightCorner", + "Draggable" + ] + } + ], + "actions": [ { "type": { - "inverted": false, - "value": "ModVarScene" + "value": "RectangleMovement::RectangleMovement::SetRight" }, "parameters": [ - "AmplitudeX", - "=", - "round(SliderAmplitudeX.DraggableSliderControl::Value()*700)" - ], - "subInstructions": [] + "RedPlayerShip1", + "RectangularMovement", + "TopRightCorner.X()", + "" + ] }, { "type": { - "inverted": false, - "value": "ModVarScene" + "value": "RectangleMovement::RectangleMovement::SetTop" }, "parameters": [ - "AmplitudeY", - "=", - "round(SliderAmplitudeY.DraggableSliderControl::Value()*700)" - ], - "subInstructions": [] + "RedPlayerShip1", + "RectangularMovement", + "TopRightCorner.Y()", + "" + ] } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Update object based on variables", - "comment2": "" + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetCenterX" + "value": "DraggableBehavior::Dragged" }, "parameters": [ - "MovingObject", - "RectangularMovement", - "Variable(InitialX)", - "" - ], - "subInstructions": [] - }, + "BottomRightCorner", + "Draggable" + ] + } + ], + "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetCenterY" + "value": "RectangleMovement::RectangleMovement::SetRight" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", - "Variable(InitialY)", + "BottomRightCorner.X()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetHorizontalDistance" + "value": "RectangleMovement::RectangleMovement::SetBottom" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", - "Variable(AmplitudeX)", + "BottomRightCorner.Y()", "" - ], - "subInstructions": [] - }, + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetVerticalDistance" + "value": "DraggableBehavior::Dragged" }, "parameters": [ - "MovingObject", - "RectangularMovement", - "Variable(AmplitudeY)", - "" - ], - "subInstructions": [] - }, + "BottomLeftCorner", + "Draggable" + ] + } + ], + "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetHorizontalSpeed" + "value": "RectangleMovement::RectangleMovement::SetLeft" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", - "Variable(SpeedX)", + "BottomLeftCorner.X()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetVerticalSpeed" + "value": "RectangleMovement::RectangleMovement::SetBottom" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", - "Variable(SpeedY)", + "BottomLeftCorner.Y()", "" - ], - "subInstructions": [] + ] } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Update text based on variables", - "comment2": "" + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "TextObject::String" + "value": "MettreXY" }, "parameters": [ - "InitialX", + "TopLeftCorner", "=", - "\"Center X: \" + ToString(Variable(InitialX))" - ], - "subInstructions": [] + "RedPlayerShip1.RectangularMovement::Left()", + "=", + "RedPlayerShip1.RectangularMovement::Top()" + ] }, { "type": { - "inverted": false, - "value": "TextObject::String" + "value": "MettreXY" }, "parameters": [ - "InitialY", + "TopRightCorner", "=", - "\"Center Y: \" + ToString(Variable(InitialY))" - ], - "subInstructions": [] + "RedPlayerShip1.RectangularMovement::Right()", + "=", + "RedPlayerShip1.RectangularMovement::Top()" + ] }, { "type": { - "inverted": false, - "value": "TextObject::String" + "value": "MettreXY" }, "parameters": [ - "AmplitudeX", + "BottomRightCorner", "=", - "\"Horizontal Distance: \" + ToString(Variable(AmplitudeX))" - ], - "subInstructions": [] + "RedPlayerShip1.RectangularMovement::Right()", + "=", + "RedPlayerShip1.RectangularMovement::Bottom()" + ] }, { "type": { - "inverted": false, - "value": "TextObject::String" + "value": "MettreXY" }, "parameters": [ - "AmplitudeY", + "BottomLeftCorner", "=", - "\"Vertical Distance: \" + ToString(Variable(AmplitudeY))" - ], - "subInstructions": [] - }, + "RedPlayerShip1.RectangularMovement::Left()", + "=", + "RedPlayerShip1.RectangularMovement::Bottom()" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Speed", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "inverted": false, - "value": "TextObject::String" + "value": "DepartScene" }, "parameters": [ - "SpeedX", - "=", - "\"Horizontal Speed: \" + ToString(Variable(SpeedX))" - ], - "subInstructions": [] - }, + "" + ] + } + ], + "actions": [ { "type": { - "inverted": false, - "value": "TextObject::String" + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" }, "parameters": [ - "SpeedY", - "=", - "\"Vertical Speed: \" + ToString(Variable(SpeedY))" - ], - "subInstructions": [] + "HorizontalDurationSlider", + "DraggableSliderControl", + "RedPlayerShip1.RectangularMovement::HorizontalEdgeDuration()", + "" + ] }, { "type": { - "inverted": false, - "value": "TextObject::String" + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" }, "parameters": [ - "SineProgressX", - "=", - "\"SineProgress X: \" + ToString(round(MovingObject.RectangularMovement::ProgressX()))" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "TextObject::String" - }, - "parameters": [ - "SineProgressY", - "=", - "\"SineProgress Y: \" + ToString(round(MovingObject.RectangularMovement::ProgressY()))" - ], - "subInstructions": [] + "VerticalDurationSlider", + "DraggableSliderControl", + "RedPlayerShip1.RectangularMovement::VerticalEdgeDuration()", + "" + ] }, { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ - "SineValueX", + "HorizontalDurationText", "=", - "\"Cosine X: \" + ToString(trunc(cos(ToRad(MovingObject.RectangularMovement::ProgressX())) * 100) / 100)" - ], - "subInstructions": [] + "ToString(RedPlayerShip1.RectangularMovement::HorizontalEdgeDuration()) + \" seconds\"" + ] }, { "type": { - "inverted": false, "value": "TextObject::String" }, "parameters": [ - "SineValueY", + "VerticalDurationText", "=", - "\"Sine Y: \" + ToString(trunc(sin(ToRad(MovingObject.RectangularMovement::ProgressY())) * 100) / 100)" - ], - "subInstructions": [] + "ToString(RedPlayerShip1.RectangularMovement::VerticalEdgeDuration()) + \" seconds\"" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "Checkbox::Checkbox::IsChecked" + "value": "MouseButtonReleased" }, "parameters": [ - "CheckboxConstantSpeed", - "Checkbox", - "" - ], - "subInstructions": [] + "", + "Left" + ] }, { "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" + "value": "SourisSurObjet" }, - "parameters": [], - "subInstructions": [] + "parameters": [ + "LaunchRoundButton", + "", + "", + "" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetConstantSpeed" - }, - "parameters": [ - "MovingObject", - "RectangularMovement", - "yes", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::ResetProgressCounters" + "value": "RectangleMovement::RectangleMovement::ToogleClockwise" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", - "" - ], - "subInstructions": [] + "yes" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "Checkbox::Checkbox::IsChecked" + "value": "DraggableSliderControl::DraggableSliderControl::IsBeingDragged" }, "parameters": [ - "CheckboxConstantSpeed", - "Checkbox", + "HorizontalDurationSlider", + "DraggableSliderControl", "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetConstantSpeed" + "value": "RectangleMovement::RectangleMovement::SetHorizontalEdgeDuration" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", - "no", + "HorizontalDurationSlider.DraggableSliderControl::Value()", "" - ], - "subInstructions": [] + ] }, { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::ResetProgressCounters" + "value": "TextObject::String" }, "parameters": [ - "MovingObject", - "RectangularMovement", - "" - ], - "subInstructions": [] + "HorizontalDurationText", + "=", + "ToString(RedPlayerShip1.RectangularMovement::HorizontalEdgeDuration()) + \" seconds\"" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "Checkbox::Checkbox::IsChecked" + "value": "DraggableSliderControl::DraggableSliderControl::IsBeingDragged" }, "parameters": [ - "CheckboxCounterClockwise", - "Checkbox", + "VerticalDurationSlider", + "DraggableSliderControl", "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetCounterClockwise" + "value": "RectangleMovement::RectangleMovement::SetVerticalEdgeDuration" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", - "yes", + "VerticalDurationSlider.DraggableSliderControl::Value()", "" - ], - "subInstructions": [] + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "VerticalDurationText", + "=", + "ToString(RedPlayerShip1.RectangularMovement::VerticalEdgeDuration()) + \" seconds\"" + ] } - ], - "events": [] - }, + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Teleport", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "Checkbox::Checkbox::IsChecked" + "value": "MouseButtonReleased" }, "parameters": [ - "CheckboxCounterClockwise", - "Checkbox", - "" + "", + "Left" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "TopLeftButton", + "", + "", + "" + ] + } ], - "subInstructions": [] + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "RedPlayerShip1", + "RectangularMovement", + "\"Top-left corner\"", + "" + ] + } + ] }, { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] - } - ], - "actions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "TopRightButton", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "RedPlayerShip1", + "RectangularMovement", + "\"Top-right corner\"", + "" + ] + } + ] + }, { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetCounterClockwise" - }, - "parameters": [ - "MovingObject", - "RectangularMovement", - "no", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "BottomRightButton", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "RedPlayerShip1", + "RectangularMovement", + "\"Bottom-right corner\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "BottomLeftButton", + "", + "", + "" + ] + } ], - "subInstructions": [] + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "RedPlayerShip1", + "RectangularMovement", + "\"Bottom-left corner\"", + "" + ] + } + ] } - ], - "events": [] - }, + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Draw", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "TextObject::String" + "value": "PrimitiveDrawing::Rectangle" }, "parameters": [ - "Direction", - "=", - "\"Direction Not Set\"" - ], - "subInstructions": [] + "Trajectory", + "RedPlayerShip1.RectangularMovement::Left()", + "RedPlayerShip1.RectangularMovement::Top()", + "RedPlayerShip1.RectangularMovement::Right()", + "RedPlayerShip1.RectangularMovement::Bottom()" + ] } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Rotate Object", - "comment2": "" + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::IsMovingDown" + "value": "RectangleMovement::RectangleMovement::IsOnTop" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "TextObject::String" - }, - "parameters": [ - "Direction", - "=", - "\"Down\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RotateTowardAngle" + "value": "PrimitiveDrawing::LineV2" }, "parameters": [ - "MovingObject", - "90", - "360", - "" - ], - "subInstructions": [] + "CurrentEdge", + "RedPlayerShip1.RectangularMovement::Left()", + "RedPlayerShip1.RectangularMovement::Top()", + "RedPlayerShip1.RectangularMovement::Right()", + "RedPlayerShip1.RectangularMovement::Top()", + "2" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::IsMovingLeft" + "value": "RectangleMovement::RectangleMovement::IsOnBottom" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "TextObject::String" - }, - "parameters": [ - "Direction", - "=", - "\"Left\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RotateTowardAngle" + "value": "PrimitiveDrawing::LineV2" }, "parameters": [ - "MovingObject", - "180", - "360", - "" - ], - "subInstructions": [] + "CurrentEdge", + "RedPlayerShip1.RectangularMovement::Left()", + "RedPlayerShip1.RectangularMovement::Bottom()", + "RedPlayerShip1.RectangularMovement::Right()", + "RedPlayerShip1.RectangularMovement::Bottom()", + "2" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::IsMovingRight" + "value": "RectangleMovement::RectangleMovement::IsOnLeft" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "TextObject::String" - }, - "parameters": [ - "Direction", - "=", - "\"Right\"" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RotateTowardAngle" + "value": "PrimitiveDrawing::LineV2" }, "parameters": [ - "MovingObject", - "0", - "360", - "" - ], - "subInstructions": [] + "CurrentEdge", + "RedPlayerShip1.RectangularMovement::Left()", + "RedPlayerShip1.RectangularMovement::Top()", + "RedPlayerShip1.RectangularMovement::Left()", + "RedPlayerShip1.RectangularMovement::Bottom()", + "2" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::IsMovingUp" + "value": "RectangleMovement::RectangleMovement::IsOnRight" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "TextObject::String" + "value": "PrimitiveDrawing::LineV2" }, "parameters": [ - "Direction", - "=", - "\"Up\"" - ], - "subInstructions": [] + "CurrentEdge", + "RedPlayerShip1.RectangularMovement::Right()", + "RedPlayerShip1.RectangularMovement::Top()", + "RedPlayerShip1.RectangularMovement::Right()", + "RedPlayerShip1.RectangularMovement::Bottom()", + "2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "TopArrowRoundButton", + "\"255;255;255\"" + ] }, { "type": { - "inverted": false, - "value": "RotateTowardAngle" + "value": "ChangeColor" }, "parameters": [ - "MovingObject", - "270", - "360", - "" - ], - "subInstructions": [] + "BottomArrowRoundButton", + "\"255;255;255\"" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "LeftArrowRoundButton", + "\"255;255;255\"" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "RightArrowRoundButton", + "\"255;255;255\"" + ] } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Button", - "comment2": "" + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "MouseButtonPressed" + "value": "RectangleMovement::RectangleMovement::IsMovingUp" }, "parameters": [ - "", - "Left" - ], - "subInstructions": [] - }, + "RedPlayerShip1", + "RectangularMovement", + "" + ] + } + ], + "actions": [ { "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" + "value": "ChangeColor" }, - "parameters": [], - "subInstructions": [] - }, + "parameters": [ + "TopArrowRoundButton", + "\"208;2;27\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "inverted": false, - "value": "SourisSurObjet" + "value": "RectangleMovement::RectangleMovement::IsMovingDown" }, "parameters": [ - "BlankButton", - "", - "", + "RedPlayerShip1", + "RectangularMovement", "" - ], - "subInstructions": [] + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ChangeColor" }, "parameters": [ - "BlankButton", + "BottomArrowRoundButton", "\"208;2;27\"" - ], - "subInstructions": [] - }, + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::ResetProgressCounters" + "value": "RectangleMovement::RectangleMovement::IsMovingLeft" }, "parameters": [ - "MovingObject", + "RedPlayerShip1", "RectangularMovement", "" - ], - "subInstructions": [] + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "LeftArrowRoundButton", + "\"208;2;27\"" + ] + } + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "MouseButtonReleased" + "value": "RectangleMovement::RectangleMovement::IsMovingRight" }, "parameters": [ - "", - "Left" - ], - "subInstructions": [] + "RedPlayerShip1", + "RectangularMovement", + "" + ] } ], "actions": [ { "type": { - "inverted": false, "value": "ChangeColor" }, "parameters": [ - "BlankButton", - "\"255;255;255\"" - ], - "subInstructions": [] + "RightArrowRoundButton", + "\"208;2;27\"" + ] } - ], - "events": [] + ] } ], "parameters": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], - "events": [] } ], "layers": [ { - "ambientLightColorB": 36, - "ambientLightColorG": 7437376, - "ambientLightColorR": 32, + "ambientLightColorB": 0, + "ambientLightColorG": 7893896, + "ambientLightColorR": 16, "followBaseLayerCamera": false, "isLightingLayer": false, "name": "", @@ -2588,25 +2415,13 @@ } ], "behaviorsSharedData": [ - { - "name": "Checkbox", - "type": "Checkbox::Checkbox" - }, - { - "name": "DepthEffect_Text", - "type": "DepthEffect::DepthEffect_Text" - }, { "name": "DraggableSliderControl", "type": "DraggableSliderControl::DraggableSliderControl" }, { "name": "RectangularMovement", - "type": "RectangularMovement::RectangularMovement" - }, - { - "name": "SineMovement", - "type": "RectangularMovement::RectangularMovement" + "type": "RectangleMovement::RectangleMovement" } ] } @@ -2614,47 +2429,51 @@ "externalEvents": [], "eventsFunctionsExtensions": [ { - "author": "@4ian, Tristan Rhodes (https://victrisgames.itch.io/)", - "description": "Allow an object to move smoothly on the X and/or Y axis following a sine wave, or an ellipsis.\n\n\nExample uses:\n- Floating objects, such as powerups or coins\n- Moveable platforms\n- Enemy movement patterns\n\nProperties:\n- Horizontal distance\n- Vertical distance\n- Horizontal speed\n- Vertical speed\n- Center of movement, X position\n- Center of movement, Y position\n\nTips:\n- For circular or elliptical movement, the horizontal and vertical speed need to be the same\n- For horizontal movement only, set vertical distance to 0\n- For vertical movement only, set horizontal distance to 0\n- For figure-8 movement, set horizontal speed to 1/2 of the vertical speed", + "author": "Tristan Rhodes (https://victrisgames.itch.io/), D8H", + "category": "Input", + "description": "Draws a draggable slider that users can move to select a numerical value.\nThe value range, tick spacing, and the appearance of the slider can be defined with properties.\n\nHow to use:\n- Add this behavior a **Shape Painter** object\n- Place an instance of that shape painter on the screen where you want the slider to appear\n- Use the \"Value\" expression to find the Value based on the position of the slider\n\nTips:\n- You can disable the slider to prevent a user from interacting with it\n- You can set the Value of the slider and the slider will move to the correct position\n\nFurther details can be found in [this tutorial video](https://youtu.be/iiTUwdAT_hs).\n\nBreaking changes (1.0.0)\n- Track thickness and length properties replaced track width and height. These 2 properties must be set again if they were different from the default size.\n- Hidden sliders can be dragged. The \"enable\" action must be used to disable them.\n", "extensionNamespace": "", - "fullName": "Sine (or ellipsis) Movement", - "helpPath": "https://victrisgames.itch.io/extension-sinemovement-and-deptheffect", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNpbmUtd2F2ZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDIxQzEzLjUsMjEgMTIuMzEsMTYuNzYgMTEuMDUsMTIuMjhDMTAuMTQsOS4wNCA5LDUgNy41LDVDNC4xMSw1IDQsMTEuOTMgNCwxMkgyQzIsMTEuNjMgMi4wNiwzIDcuNSwzQzEwLjUsMyAxMS43MSw3LjI1IDEyLjk3LDExLjc0QzEzLjgzLDE0LjggMTUsMTkgMTYuNSwxOUMxOS45NCwxOSAyMC4wMywxMi4wNyAyMC4wMywxMkgyMi4wM0MyMi4wMywxMi4zNyAyMS45NywyMSAxNi41LDIxWiIgLz48L3N2Zz4=", - "name": "SineMovement", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/sine-wave.svg", - "shortDescription": "Allow an object to move smoothly on the X and/or Y axis following a sine wave, or an ellipsis.", - "version": "0.0.5", + "fullName": "Draggable slider", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", + "name": "DraggableSliderControl", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/UI Essentials/UI Essentials_sliders_options.svg", + "shortDescription": "A draggable slider that users can move to select a numerical value.", + "version": "1.0.5", + "origin": { + "identifier": "DraggableSliderControl", + "name": "gdevelop-extension-store" + }, "tags": [ - "sine", - "ellipsis", - "movement", - "circular", - "circle", - "floating", - "platform", - "enemy" + "draggable", + "slider", + "shape painter", + "ui", + "widget" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], - "authorIds": [], "dependencies": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "Allow an object to move smoothly on the X and/or Y axis following a sine wave.\n\nExample uses:\n- Floating pickups\n- Moveable platforms\n- Enemy movement\n\nProperties:\n- Center of movement, X position\n- Center of movement, Y position\n- Horizontal distance\n- Vertical distance\n- Horizontal speed\n- Horizontal distance\n\nTips:\n- For circular or elliptical movement, the horizontal and vertical speed need to be the same\n- For horizontal movement, set vertical distance to 0\n- For vertical movement, set horizontal distance to 0\n- For figure-8 movement, set horizontal speed to 1/2 of the vertical speed", - "fullName": "Sine Movement", - "name": "SineMovement", - "objectType": "", + "description": "Let users select a numerical value by dragging a slider.", + "fullName": "Draggable slider", + "name": "DraggableSliderControl", + "objectType": "PrimitiveDrawing::Drawer", "eventsFunctions": [ { "description": "", "fullName": "", "functionType": "Action", - "name": "doStepPreEvents", + "group": "", + "name": "onCreated", "private": false, "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -2664,74 +2483,25 @@ "textG": 0, "textR": 0 }, - "comment": "Set the center of movement to the initial location of the object", + "comment": "Make sure object doesn't get re-drawn every frame", "comment2": "" }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::PropertyCenterPointX" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::PropertyCenterPointY" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertyCenterPointX" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.X()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertyCenterPointY" + "value": "PrimitiveDrawing::ClearBetweenFrames" }, "parameters": [ "Object", - "Behavior", - "=", - "Object.Y()" - ], - "subInstructions": [] + "no" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -2741,82 +2511,57 @@ "textG": 0, "textR": 0 }, - "comment": "Move the object", + "comment": "Use correct min value (instead of always starting at 0)", "comment2": "" }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::PropertyHorizontalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "MettreX" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" }, "parameters": [ "Object", + "Behavior", "=", - "Object.Behavior::PropertyCenterPointX() + cos(ToRad(Object.Behavior::PropertySineProgressX())) * Object.Behavior::PropertyHorizontalDistance()" - ], - "subInstructions": [] + "Object.Behavior::PropertyValueMin()" + ] } - ], - "events": [] + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set track height function (which enforces valid thumb sizes)", + "comment2": "" }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::PropertyVerticalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "MettreY" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTrackThickness" }, "parameters": [ "Object", + "Behavior", "=", - "Object.Behavior::PropertyCenterPointY() + sin(ToRad(Object.Behavior::PropertySineProgressY())) * Object.Behavior::PropertyVerticalDistance()" - ], - "subInstructions": [] + "Object.Behavior::PropertyTrackThickness()" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -2826,52 +2571,41 @@ "textG": 0, "textR": 0 }, - "comment": "Increment counters that are used to caclulate movement", + "comment": "Start halo at same size as thumb", "comment2": "" }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertySineProgressX" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyCurrentHaloRadius" }, "parameters": [ "Object", "Behavior", - "+", - "Object.Behavior::PropertyHorizontalSpeed() * TimeDelta()" - ], - "subInstructions": [] + "=", + "min(Object.Behavior::PropertyThumbHeight()/2,Object.Behavior::PropertyThumbWidth()/2)" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertySineProgressY" + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, "parameters": [ "Object", "Behavior", - "+", - "Object.Behavior::PropertyVerticalSpeed() * TimeDelta()" - ], - "subInstructions": [] + "" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -2882,7 +2616,7 @@ "longDescription": "", "name": "Object", "optional": false, - "supplementaryInformation": "", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" }, { @@ -2892,2313 +2626,646 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Counter used to change the Y position of the object", - "fullName": "Sine progress Y", - "functionType": "Expression", - "name": "SineProgressY", + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPreEvents", "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "sentence": "", "events": [ { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Slider logic", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertySineProgressY()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Counter used to change the X position of the object", - "fullName": "Sine progress X", - "functionType": "Expression", - "name": "SineProgressX", - "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertySineProgressX()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Horizontal speed", - "fullName": "Horizontal speed ", - "functionType": "Expression", - "name": "HorizontalSpeed", - "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyHorizontalSpeed()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Vertical speed", - "fullName": "Vertical speed", - "functionType": "Expression", - "name": "VerticalSpeed", - "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyVerticalSpeed()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Horizontal distance", - "fullName": "Horizontal distance", - "functionType": "Expression", - "name": "HorizontalDistance", - "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyHorizontalDistance()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Vertical distance", - "fullName": "Vertical distance", - "functionType": "Expression", - "name": "VerticalDistance", - "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyVerticalDistance()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::IsEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Center of movement, X position", - "fullName": "Center of movement, X position", - "functionType": "Expression", - "name": "CenterX", - "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyCenterPointX()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Center of movement, Y position", - "fullName": "Center of movement, Y position", - "functionType": "Expression", - "name": "CenterY", - "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyCenterPointY()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Set center Y position", - "fullName": "Set center Y position", - "functionType": "Action", - "name": "SetCenterY", - "private": false, - "sentence": "Set center Y position of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertyCenterPointY" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Y position", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Set center X position", - "fullName": "Set center X position", - "functionType": "Action", - "name": "SetCenterX", - "private": false, - "sentence": "Set center X position of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertyCenterPointX" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "X position", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Set horizontal distance", - "fullName": "Set horizontal distance", - "functionType": "Action", - "name": "SetHorizontalDistance", - "private": false, - "sentence": "Set horizontal distance of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertyHorizontalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Distance", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Set vertical distance", - "fullName": "Set vertical distance", - "functionType": "Action", - "name": "SetVerticalDistance", - "private": false, - "sentence": "Set vertical distance of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertyVerticalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Distance", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Set horizontal speed", - "fullName": "Set horizontal speed", - "functionType": "Action", - "name": "SetHorizontalSpeed", - "private": false, - "sentence": "Set horizontal speed of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertyHorizontalSpeed" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Speed (in degrees per second)", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Set vertical speed", - "fullName": "Set vertical speed", - "functionType": "Action", - "name": "SetVerticalSpeed", - "private": false, - "sentence": "Set vertical speed of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertyVerticalSpeed" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Speed (in degrees per second)", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Reset sine progress counters. The object will return to the initial state", - "fullName": "Reset sine progress counters", - "functionType": "Action", - "name": "ResetSineCounters", - "private": false, - "sentence": "Reset sine progress counters on _PARAM0_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertySineProgressX" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SineMovement::SineMovement::SetPropertySineProgressY" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "SineMovement::SineMovement", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "60", - "type": "Number", - "label": "Horizontal speed, in degrees per second", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "HorizontalSpeed" - }, - { - "value": "60", - "type": "Number", - "label": "Vertical speed, in degrees per second", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "VerticalSpeed" - }, - { - "value": "100", - "type": "Number", - "label": "Horizontal distance: amplitude of the movement on X axis (0 to deactivate)", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "HorizontalDistance" - }, - { - "value": "0", - "type": "Number", - "label": "Vertical distance: amplitude of the movement on Y axis (0 to deactivate)", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "VerticalDistance" - }, - { - "value": "0", - "type": "Number", - "label": "Center of movement, X position", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "CenterPointX" - }, - { - "value": "0", - "type": "Number", - "label": "Center of movement, Y position", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "CenterPointY" - }, - { - "value": "0", - "type": "Number", - "label": "Counter used to change X position", - "description": "", - "extraInformation": [], - "hidden": true, - "name": "SineProgressX" - }, - { - "value": "0", - "type": "Number", - "label": "Counter used to change Y position", - "description": "", - "extraInformation": [], - "hidden": true, - "name": "SineProgressY" - } - ] - } - ] - }, - { - "author": "Tristan Rhodes (https://victrisgames.itch.io/)", - "description": "When the checkbox is checked, the condition `Checked` is verified.\nA halo appears when the mouse hovers near the checkbox.\n\nCheckbox cannot be toggled by users if any of these are true:\n- Checkbox is hidden\n- Checkbox's layer is hidden\n- Checkbox is disabled\n\nCheckbox can always be changed by an action.", - "extensionNamespace": "", - "fullName": "Checkbox", - "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.0.4", - "tags": [ - "checkbox", - "ui", - "widget", - "shape painter", - "toggle", - "checkmark" - ], - - "authorIds": [], - "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "Checkbox can be toggled by a left-click or touch. \n\nWhen the checkbox is checked, the condition `Checked` is TRUE.\nA halo appears when the mouse hovers near the checkbox.\n\nCheckbox cannot be toggled by users if any of these are true:\n- Checkbox is hidden\n- Checkbox's layer is hidden\n- Checkbox is disabled\n\nCheckbox can always be changed by an action.", - "fullName": "Checkbox", - "name": "Checkbox", - "objectType": "PrimitiveDrawing::Drawer", - "eventsFunctions": [ - { - "description": "", - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "private": false, - "sentence": "", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": false, - "folded": false, - "name": "Fix inputs", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Fix inputs that create malformed checkboxes", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertySideLength()", - "<", - "10" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetSideLength" - }, - "parameters": [ - "Object", - "Behavior", - "10", - "" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertyLineWidth()", - "<", - "1" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyLineWidth" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertyLineWidth()", - ">", - "Object.Behavior::PropertySideLength()/4" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetLineWidth" - }, - "parameters": [ - "Object", - "Behavior", - "Object.Behavior::PropertySideLength()/4", - "" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": false, - "folded": false, - "name": "Draw checkbox", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change shape painter based on properties", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::PropertyChecked" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyPrimaryColor()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::OutlineColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyPrimaryColor()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyChecked" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertySecondaryColor()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::OutlineColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyPrimaryColor()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::OutlineSize" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyBorderThickness()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillOpacity" - }, - "parameters": [ - "Object", - "=", - "255" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::OutlineOpacity" - }, - "parameters": [ - "Object", - "=", - "255" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Draw checkbox", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::Rectangle" - }, - "parameters": [ - "Object", - "0", - "0", - "Object.Behavior::PropertySideLength()", - "Object.Behavior::PropertySideLength()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": false, - "folded": false, - "name": "Checkbox logic", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Set halo radius, if not specified", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::PropertyHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertySideLength() * 1.5" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect hover", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "LayerVisible" - }, - "parameters": [ - "", - "Object.Layer()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Visible" - }, - "parameters": [ - "Object" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyDisabled" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SourisX" - }, - "parameters": [ - "", - ">", - "(Object.X() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadius(),Object.Behavior::PropertySideLength())", - "Object.Layer()", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SourisX" - }, - "parameters": [ - "", - "<", - "(Object.X() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadius(),Object.Behavior::PropertySideLength())", - "Object.Layer()", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SourisY" - }, - "parameters": [ - "", - ">", - "(Object.Y() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadius(),Object.Behavior::PropertySideLength())", - "Object.Layer()", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SourisY" - }, - "parameters": [ - "", - "<", - "(Object.Y() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadius(),Object.Behavior::PropertySideLength())", - "Object.Layer()", - "" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change shape painter for halo", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillOpacity" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyHaloOpacityHover()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::OutlineSize" - }, - "parameters": [ - "Object", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyPrimaryColor()" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect touch/click", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SourisBouton" - }, - "parameters": [ - "", - "Left" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillOpacity" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyHaloOpacityPressed()" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::ToggleChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Draw halo", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::Circle" - }, - "parameters": [ - "Object", - "0.5 * Object.Behavior::SideLength()", - "0.5 * Object.Behavior::SideLength()", - "Object.Behavior::PropertyHaloRadius()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::PropertyChecked" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillOpacity" - }, - "parameters": [ - "Object", - "=", - "255" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Draw left-side of checkmark", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::OutlineColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertySecondaryColor()" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "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()" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Draw right-side of checkmark", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "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()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check (or uncheck) the checkbox", - "fullName": "Check (or uncheck) the checkbox", - "functionType": "Action", - "name": "SetChecked", - "private": false, - "sentence": "Add checkmark to _PARAM0_? _PARAM2_ ", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"State\"" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyChecked" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"State\"" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyChecked" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Check the checkbox?", - "longDescription": "", - "name": "State", - "optional": false, - "supplementaryInformation": "", - "type": "yesorno" - } - ], - "objectGroups": [] - }, - { - "description": "Disable (or enable) the checkbox", - "fullName": "Disable (or enable) the checkbox", - "functionType": "Action", - "name": "SetDisabled", - "private": false, - "sentence": "Disable _PARAM0_? _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"State\"" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyDisabled" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"State\"" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyDisabled" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Disable the checkbox?", - "longDescription": "", - "name": "State", - "optional": false, - "supplementaryInformation": "", - "type": "yesorno" - } - ], - "objectGroups": [] - }, - { - "description": "If checked, change to unchecked. If unchecked, change to checked.", - "fullName": "Change checkbox to opposite state", - "functionType": "Action", - "name": "ToggleChecked", - "private": false, - "sentence": "Change _PARAM0_ to opposite state (checked/unchecked)", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyToggleChanged" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::PropertyChecked" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyChecked" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyToggleChanged" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyChecked" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Track where the mouse is (in relation to object)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyMouseX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.ToDrawingX(MouseX(Object.Layer(), 0), MouseY(Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyMouseY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.ToDrawingY(MouseX(Object.Layer(), 0), MouseY(Object.Layer(), 0))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move slider when being dragged", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOffset" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyMouseX()" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "End sliding and update variables", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update \"Value\" based on the location of the thumb", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyValueMin() + (Object.Behavior::PropertyValueMax() - Object.Behavior::PropertyValueMin()) * Object.Behavior::PropertyThumbOffset() / Object.Behavior::PropertyTrackLength()", + "" + ] + } + ] + }, + { + "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": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1.25 * Object.Behavior::PropertyHaloRadius()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "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": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "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 track, start dragging", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisBouton" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + ">=", + "-Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + "<=", + "Object.Behavior::PropertyTrackLength() + Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + ">=", + "-Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + "<=", + "Object.Behavior::PropertyHaloRadius()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + }, + { + "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": "DraggableSliderControl::DraggableSliderControl::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": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + ">=", + "Object.Behavior::PropertyThumbOffset() - Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + "<=", + "Object.Behavior::PropertyThumbOffset() + Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + ">=", + "- Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + "<=", + "Object.Behavior::PropertyHaloRadius()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyHaloRadius()" + ] + } + ] + }, + { + "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": "DraggableSliderControl::DraggableSliderControl::PropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 2" + ] + } + ] + } + ] + } + ] }, { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyToggleChanged" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyChecked" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Change primary color of checkbox", - "fullName": "Change primary color of checkbox", - "functionType": "Action", - "name": "SetPrimaryColor", - "private": false, - "sentence": "Change primary color of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyPrimaryColor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"Color\")" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Primary Color", - "longDescription": "", - "name": "Color", - "optional": false, - "supplementaryInformation": "", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Change secondary color of checkbox", - "fullName": "Change secondary color of checkbox", - "functionType": "Action", - "name": "SetSecondaryColor", - "private": false, - "sentence": "Change secondary color of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertySecondaryColor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"Color\")" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + } ], - "subInstructions": [] + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Redraw slider 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": "DraggableSliderControl::DraggableSliderControl::SetPropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "lerp(Object.Behavior::PropertyCurrentHaloRadius(), Object.Behavior::PropertyTargetHaloRadius(), Object.Behavior::PropertyHaloGrowSpeed())" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] } ], - "events": [] + "parameters": [] } ], "parameters": [ @@ -5219,51 +3286,740 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Secondary Color", - "longDescription": "", - "name": "Color", - "optional": false, - "supplementaryInformation": "", - "type": "string" } ], "objectGroups": [] }, { - "description": "Change halo opacity (pressed)", - "fullName": "Change halo opacity (pressed)", + "description": "", + "fullName": "", "functionType": "Action", - "name": "SetHaloOpacityPressed", + "group": "", + "name": "doStepPostEvents", "private": false, - "sentence": "Change halo opacity (pressed) of _PARAM0_ to _PARAM2_", + "sentence": "", "events": [ { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Slider drawing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyHaloOpacityPressed" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "LayerVisible" + }, + "parameters": [ + "", + "Object.Layer()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Drawer::ClearShapes" + }, + "parameters": [ + "Object" + ] + } ], - "subInstructions": [] + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Inactive track", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set inactive track parameters (by default, use thumb color)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyInactiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyInactiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyInactiveTrackColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyInactiveTrackOpacity()" + ] + }, + { + "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 inactive track", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "-Object.Behavior::PropertyTrackThickness() / 2", + "Object.Behavior::PropertyTrackLength()", + "Object.Behavior::PropertyTrackThickness() / 2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw half circle at end of track (inactive side)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Arc" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyTrackLength()", + "0", + "Object.Behavior::PropertyTrackThickness() / 2", + "270", + "90", + "", + "yes" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Active track", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set active track parameters (by default, use thumb color)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyActiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyActiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyActiveTrackColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyActiveTrackOpacity()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw active track (2 pixels bigger than property) ", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "0", + "-(Object.Behavior::PropertyTrackThickness() / 2 + 1)", + "Object.Behavior::PropertyThumbOffset()", + "Object.Behavior::PropertyTrackThickness() / 2 + 1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw half circle at end of track (active side)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Arc" + }, + "parameters": [ + "Object", + "0", + "0", + "1 + Object.Behavior::PropertyTrackThickness() / 2", + "90", + "270", + "", + "yes" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Halo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 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::PropertyThumbColor()" + ] + }, + { + "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": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyHaloOpacityHover()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "0", + "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": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyHaloOpacityClick()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "0", + "Object.Behavior::PropertyCurrentHaloRadius()" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Thumb", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Prepare thumb settings", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyThumbOpacity()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw Circle thumb", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"circle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "0", + "ceil(max(Object.Behavior::PropertyThumbWidth(),Object.Behavior::PropertyThumbHeight())/2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw Rectangle thumb", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"rectangle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset() - (Object.Behavior::PropertyThumbWidth() / 2)", + "-Object.Behavior::PropertyThumbHeight() / 2", + "Object.Behavior::PropertyThumbOffset() + (Object.Behavior::PropertyThumbWidth() / 2)", + "Object.Behavior::PropertyThumbHeight() / 2" + ] + } + ] + } + ], + "parameters": [] + } + ] } ], - "events": [] + "parameters": [] } ], "parameters": [ @@ -5284,116 +4040,44 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Halo opacity", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Change halo opacity (hover)", - "fullName": "Change halo opacity (hover)", - "functionType": "Action", - "name": "SetHaloOpacityHover", + "description": "Check if the slider is being dragged.", + "fullName": "Being dragged", + "functionType": "Condition", + "group": "Slider", + "name": "IsBeingDragged", "private": false, - "sentence": "Change halo opacity (hover) of _PARAM0_ to _PARAM2_", + "sentence": "_PARAM0_ is being dragged", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyHaloOpacityHover" + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" }, "parameters": [ "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "Behavior" + ] } ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Halo opacity", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Change halo radius of checkmark", - "fullName": "Change halo radius of checkmark", - "functionType": "Action", - "name": "SetHaloRadius", - "private": false, - "sentence": "Change halo radius of _PARAM0_ to _PARAM2_ pixels", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyHaloRadius" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "True" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -5414,51 +4098,44 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Halo radius (px)", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Change border thickness of checkmark", - "fullName": "Change border thickness of checkmark", - "functionType": "Action", - "name": "SetBorderThickness", + "description": "Check if the slider interactions are enabled.", + "fullName": "Interactions enabled", + "functionType": "Condition", + "group": "Slider", + "name": "IsEnabled", "private": false, - "sentence": "Change border thickness of _PARAM0_ to _PARAM2_ pixels", + "sentence": "Interactions of _PARAM0_ are enabled", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyBorderThickness" + "value": "DraggableSliderControl::DraggableSliderControl::PropertyEnabled" }, "parameters": [ "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "Behavior" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -5479,51 +4156,148 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Border thickness (px)", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Change side length of checkbox", - "fullName": "Change side length of checkbox", + "description": "Enable or disable the slider. Users cannot interact while it is disabled.", + "fullName": "Enable interactions", "functionType": "Action", - "name": "SetSideLength", + "group": "Slider", + "name": "SetEnabled", "private": false, - "sentence": "Change side length of _PARAM0_ to _PARAM2_ pixels", + "sentence": "Enable interactions of _PARAM0_: _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Enable\"" + ] + } + ], "actions": [ { "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertySideLength" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyEnabled" }, "parameters": [ "Object", "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "no" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop dragging (so the slider won't be dragging when it gets enabled)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" + }, + "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 slider gets enabled)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 2" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Enable\"" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] } ], "parameters": [ @@ -5544,51 +4318,44 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" }, { "codeOnly": false, "defaultValue": "", - "description": "Side length (px)", + "description": "Enable", "longDescription": "", - "name": "Value", + "name": "Enable", "optional": false, "supplementaryInformation": "", - "type": "expression" + "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Change line width of checkmark", - "fullName": "Change line width of checkmark", - "functionType": "Action", - "name": "SetLineWidth", + "description": "The value of the slider (based on position of the thumb).", + "fullName": "Slider value", + "functionType": "Expression", + "group": "Slider", + "name": "Value", "private": false, - "sentence": "Change line width of _PARAM0_ to _PARAM2_ pixels", + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "Checkbox::Checkbox::SetPropertyLineWidth" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "Object.Behavior::PropertyValue()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -5609,238 +4376,176 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Line width (px)", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if the checkbox is checked", - "fullName": "Is checked", - "functionType": "Condition", - "name": "IsChecked", + "description": "Change the value of a slider (this will move the thumb to the correct position).", + "fullName": "Slider value", + "functionType": "Action", + "group": "Slider", + "name": "SetValue", "private": false, - "sentence": "_PARAM0_ is checked", + "sentence": "Change the value of _PARAM0_: _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "Checkbox::Checkbox::PropertyChecked" + "value": "DraggableSliderControl::DraggableSliderControl::PropertyTickSpacing" }, "parameters": [ "Object", - "Behavior" - ], - "subInstructions": [] + "Behavior", + "<=", + "0" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyChecked" + "value": "DraggableSliderControl::DraggableSliderControl::PropertyTickSpacing" }, "parameters": [ "Object", - "Behavior" - ], - "subInstructions": [] + "Behavior", + ">", + "0" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" }, "parameters": [ - "False" - ], - "subInstructions": [] + "Object", + "Behavior", + "=", + "round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyTickSpacing()) * Object.Behavior::PropertyTickSpacing()" + ] } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" + ] }, { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the checkbox is disabled", - "fullName": "Is disabled", - "functionType": "Condition", - "name": "IsDisabled", - "private": false, - "sentence": "_PARAM0_ is disabled", - "events": [ - { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "Checkbox::Checkbox::PropertyDisabled" + "value": "DraggableSliderControl::DraggableSliderControl::PropertyValue" }, "parameters": [ "Object", - "Behavior" - ], - "subInstructions": [] + "Behavior", + "<", + "Object.Behavior::PropertyValueMin()" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyValueMin()" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyDisabled" + "value": "DraggableSliderControl::DraggableSliderControl::PropertyValue" }, "parameters": [ "Object", - "Behavior" - ], - "subInstructions": [] + "Behavior", + ">", + "Object.Behavior::PropertyValueMax()" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" }, "parameters": [ - "False" - ], - "subInstructions": [] + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyValueMax()" + ] } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" + ] }, { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Used to draw the outline of the checkbox (when it is unchecked) and the fill color (when checkbox is checked).", - "fullName": "Primary color of checkbox", - "functionType": "StringExpression", - "name": "PrimaryColor", - "private": false, - "sentence": "_PARAM0_ ", - "events": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set the proper offset (it moves the slider)", + "comment2": "" + }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnString" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOffset" }, "parameters": [ - "Object.Behavior::PropertyPrimaryColor()" - ], - "subInstructions": [] + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyTrackLength() * (Object.Behavior::PropertyValue() - Object.Behavior::PropertyValueMin()) / (Object.Behavior::PropertyValueMax() - Object.Behavior::PropertyValueMin())" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -5861,38 +4566,44 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Slider value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Used to fill the checkbox (when it is unchecked) and to draw the checkmark (when checkbox is checked)", - "fullName": "Secondary color of checkbox", - "functionType": "StringExpression", - "name": "SecondaryColor", + "description": "The minimum value of a slider.", + "fullName": "Slider minimum value", + "functionType": "Expression", + "group": "Slider value configuration", + "name": "ValueMin", "private": false, - "sentence": "_PARAM0_ ", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnString" + "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertySecondaryColor()" - ], - "subInstructions": [] + "Object.Behavior::PropertyValueMin()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -5913,38 +4624,48 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Opacity of the halo while the checkbox is touched or clicked", - "fullName": "Halo opacity (while touched or clicked)", - "functionType": "Expression", - "name": "HaloOpacityPressed", + "description": "Change the minimum value of a slider.", + "fullName": "Slider minimum value", + "functionType": "Action", + "group": "Slider value configuration", + "name": "SetValueMin", "private": false, - "sentence": "_PARAM0_ ", + "sentence": "Change the minimum value of _PARAM0_: _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValueMin" }, "parameters": [ - "Object.Behavior::PropertyHaloOpacityPressed()" - ], - "subInstructions": [] + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"ValueMin\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::Value()", + "" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -5965,38 +4686,44 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Minimum value", + "longDescription": "", + "name": "ValueMin", + "optional": false, + "supplementaryInformation": "", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Opacity of the halo when the mouse is hovering near the checkbox", - "fullName": "Halo opacity (during hover)", + "description": "The maximum value of a slider.", + "fullName": "Slider maximum value", "functionType": "Expression", - "name": "HaloOpacityHover", + "group": "Slider value configuration", + "name": "ValueMax", "private": false, - "sentence": "_PARAM0_ ", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyHaloOpacityHover()" - ], - "subInstructions": [] + "Object.Behavior::PropertyValueMax()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -6017,38 +4744,34 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Line width of checkmark (pixels)", - "fullName": "Line width", + "description": "Thickness of track.", + "fullName": "Slider track thickness", "functionType": "Expression", - "name": "LineWidth", + "group": "Slider track configuration", + "name": "TrackThickness", "private": false, - "sentence": "_PARAM0_ ", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyLineWidth()" - ], - "subInstructions": [] + "Object.Behavior::PropertyTrackThickness()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -6069,38 +4792,34 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Side length of checkbox (pixels)", - "fullName": "Side length ", + "description": "Length of track.", + "fullName": "Slider track length", "functionType": "Expression", - "name": "SideLength", + "group": "Slider track configuration", + "name": "TrackLength", "private": false, - "sentence": "_PARAM0_ ", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertySideLength()" - ], - "subInstructions": [] + "Object.Behavior::PropertyTrackLength()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -6121,39 +4840,34 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" } ], "objectGroups": [] }, { - "description": "", - "fullName": "", - "functionType": "Action", - "name": "onCreated", + "description": "Height of thumb.", + "fullName": "Slider thumb height", + "functionType": "Expression", + "group": "Slider thumb configuration", + "name": "ThumbHeight", "private": false, - "sentence": "", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "PrimitiveDrawing::ClearBetweenFrames" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "yes" - ], - "subInstructions": [] + "Object.Behavior::PropertyThumbHeight()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -6172,640 +4886,263 @@ "defaultValue": "", "description": "Behavior", "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Boolean", - "label": "Checked", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "Checked" - }, - { - "value": "24;119;211", - "type": "String", - "label": "Primary color of checkbox. (Example: 24;119;211) Fill color when box is checked.", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "PrimaryColor" - }, - { - "value": "255;255;255", - "type": "String", - "label": "Secondary color of checkbox. (Example: 255;255;255) Color of checkmark when box is checked.", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "SecondaryColor" - }, - { - "value": "24", - "type": "Number", - "label": "Length of each side (px) Min: 10 Default: 24", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "SideLength" - }, - { - "value": "5", - "type": "Number", - "label": "Line width of checkmark (px) Min: 1 Max: 1/4 * SideLength Default: 5", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "LineWidth" - }, - { - "value": "", - "type": "Number", - "label": "Radius of halo during hover. If blank, this is set to 1.5x the \"SideLength\".", - "description": "", - "extraInformation": [], - "hidden": true, - "name": "HaloRadius" - }, - { - "value": "", - "type": "Boolean", - "label": "State of the checkbox has changed (Used in \"ToggleChecked\" function)", - "description": "", - "extraInformation": [], - "hidden": true, - "name": "ToggleChanged" - }, - { - "value": "", - "type": "Boolean", - "label": "Disabled (the checkbox cannot be toggled by user)", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "Disabled" - }, - { - "value": "2", - "type": "Number", - "label": "Border thickness (px) This border is only visible when the checkbox is unchecked. ", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "BorderThickness" - }, - { - "value": "64", - "type": "Number", - "label": "Opacity of halo during hover", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "HaloOpacityHover" - }, - { - "value": "96", - "type": "Number", - "label": "Opacity of halo while being pressed", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "HaloOpacityPressed" - } - ] - } - ] - }, - { - "author": "Tristan Rhodes (https://victrisgames.itch.io/)", - "description": "The `Value` expression will return the position of the slider on the bar, from 0 to 1, where 0 is the left-side, and 1 is the right-side.\n\nYou can [watch this tutorial](https://youtu.be/iiTUwdAT_hs) showing how to use this extension - remember to attach it to a **Shape Painter** object.", - "extensionNamespace": "", - "fullName": "Draggable Slider Control", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", - "name": "DraggableSliderControl", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/UI Essentials/UI Essentials_sliders_options.svg", - "shortDescription": "Use a shape-painter object to draw a horizontal slider that can be dragged by the users. ", - "version": "0.3.3", - "tags": [ - "draggable", - "slider", - "control", - "shape painter", - "ui", - "widget" - ], - "authorIds": [], - "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "Use a shape-painter object to draw a horizontal slider that can be dragged by the users. \n\nThe `Value` expression will return the position of the slider on the bar, from 0 to 1, where 0 is the left-side, and 1 is the right-side.", - "fullName": "Draggable Slider Control", - "name": "DraggableSliderControl", - "objectType": "PrimitiveDrawing::Drawer", - "eventsFunctions": [ + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, { - "description": "", - "fullName": "", + "description": "Change the maximum value of a slider.", + "fullName": "Slider maximum value", "functionType": "Action", - "name": "doStepPostEvents", + "group": "Slider value configuration", + "name": "SetValueMax", "private": false, - "sentence": "", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", "events": [ { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move slider when being dragged", - "comment2": "" - }, - { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOffset" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValueMax" }, "parameters": [ "Object", "Behavior", "=", - "MouseX(Object.Layer())-Object.X()" - ], - "subInstructions": [] - } - ], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Enforce left boundry", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SourisX" - }, - "parameters": [ - "", - "<", - "Object.X()", - "Object.Layer()", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOffset" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Enforce right boundry", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SourisX" - }, - "parameters": [ - "", - ">", - "Object.X() + Object.Behavior::PropertyTrackWidth()", - "Object.Layer()", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOffset" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertyTrackWidth()" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Use darker halo while being dragged", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillOpacity" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyHaloOpacityClick()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::OutlineOpacity" - }, - "parameters": [ - "Object", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::Circle" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyThumbOffset()", - "Object.Behavior::PropertyTrackHeight()/2", - "Object.Behavior::PropertyHaloRadius()" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "End sliding and update variables", - "comment2": "" + "GetArgumentAsNumber(\"ValueMax\")" + ] }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "MouseButtonReleased" - }, - "parameters": [ - "", - "Left" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__DraggableSliderBehavior.SlideInProgress", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Update \"Value\" based on the location of the thumb", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" }, "parameters": [ "Object", "Behavior", - "=", - "Object.Behavior::PropertyThumbOffset() / Object.Behavior::PropertyTrackWidth()" - ], - "subInstructions": [] + "Object.Behavior::Value()", + "" + ] } - ], - "events": [] + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" }, { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Set inactive track parameters (by default, use thumb color)", - "comment2": "" + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" }, { - "disabled": false, - "folded": false, + "codeOnly": false, + "defaultValue": "", + "description": "Maximum value", + "longDescription": "", + "name": "ValueMax", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The tick spacing of a slider.", + "fullName": "Tick spacing", + "functionType": "Expression", + "group": "Slider value configuration", + "name": "TickSpacing", + "private": false, + "sentence": "Change the tick spacing of _PARAM0_: _PARAM2_", + "events": [ + { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyInactiveTrackColor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"\"" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillColor" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Object.Behavior::PropertyThumbColor()" - ], - "subInstructions": [] + "Object.Behavior::PropertyTickSpacing()" + ] } - ], - "events": [] + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" }, { - "disabled": false, - "folded": false, + "codeOnly": false, + "defaultValue": "", + "description": "Tick spacing", + "longDescription": "", + "name": "TickSpacing", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the tick spacing of a slider.", + "fullName": "Tick spacing", + "functionType": "Action", + "group": "Slider value configuration", + "name": "SetTickSpacing", + "private": false, + "sentence": "Change the tick spacing of _PARAM0_: _PARAM2_", + "events": [ + { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": true, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyInactiveTrackColor" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTickSpacing" }, "parameters": [ "Object", "Behavior", "=", - "\"\"" - ], - "subInstructions": [] - } - ], - "actions": [ + "GetArgumentAsNumber(\"TickSpacing\")" + ] + }, { "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillColor" + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" }, "parameters": [ "Object", - "Object.Behavior::PropertyInactiveTrackColor()" - ], - "subInstructions": [] + "Behavior", + "Object.Behavior::Value()", + "" + ] } - ], - "events": [] + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" }, { - "disabled": false, - "folded": false, + "codeOnly": false, + "defaultValue": "", + "description": "Tick spacing", + "longDescription": "", + "name": "TickSpacing", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change length of track.", + "fullName": "Track length", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetTrackLength", + "private": false, + "sentence": "Change track length of _PARAM0_ to _PARAM2_ px", + "events": [ + { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillOpacity" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTrackLength" }, "parameters": [ "Object", + "Behavior", "=", - "Object.Behavior::PropertyInactiveTrackOpacity()" - ], - "subInstructions": [] + "GetArgumentAsNumber(\"Value\")" + ] }, { "type": { - "inverted": false, - "value": "PrimitiveDrawing::OutlineOpacity" - }, - "parameters": [ - "Object", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Draw half circle at end (optional)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, "parameters": [ "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ + "Behavior", + "" + ] + }, { "type": { - "inverted": false, - "value": "PrimitiveDrawing::Arc" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, "parameters": [ "Object", - "Object.Behavior::PropertyTrackWidth()", - "Object.Behavior::PropertyTrackHeight()/2", - "Object.Behavior::PropertyTrackHeight()/2", - "270", - "90", - "", + "Behavior", "yes" - ], - "subInstructions": [] + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -6815,139 +5152,98 @@ "textG": 0, "textR": 0 }, - "comment": "Draw inactive track", + "comment": "Move thumb to correct place (based on new track size)", "comment2": "" }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "PrimitiveDrawing::Rectangle" + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" }, "parameters": [ "Object", - "0", - "0", - "Object.Behavior::PropertyTrackWidth()", - "min(Object.Behavior::PropertyTrackHeight(),Object.Behavior::PropertyThumbHeight())" - ], - "subInstructions": [] + "Behavior", + "Object.Behavior::PropertyValue()", + "" + ] } - ], - "events": [] - }, + ] + } + ], + "parameters": [ { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Set active track parameters (by default, use thumb color)", - "comment2": "" + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" }, { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyActiveTrackColor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"\"" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyThumbColor()" - ], - "subInstructions": [] - } - ], - "events": [] + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" }, { - "disabled": false, - "folded": false, + "codeOnly": false, + "defaultValue": "", + "description": "Track width", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change thickness of track.", + "fullName": "Track thickness", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetTrackThickness", + "private": false, + "sentence": "Change track thickness of _PARAM0_ to _PARAM2_ px", + "events": [ + { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyActiveTrackColor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"\"" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillColor" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTrackThickness" }, - "parameters": [ - "Object", - "Object.Behavior::PropertyActiveTrackColor()" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, { "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillOpacity" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, "parameters": [ "Object", - "=", - "Object.Behavior::PropertyActiveTrackOpacity()" - ], - "subInstructions": [] + "Behavior", + "yes" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -6957,88 +5253,112 @@ "textG": 0, "textR": 0 }, - "comment": "Draw half circle at end (optional)", + "comment": "Make sure thumb width is not smaller than track height + 2 pixels (to prevent track ends from showing)", "comment2": "" }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbWidth" }, "parameters": [ "Object", - "Behavior" - ], - "subInstructions": [] + "Behavior", + "<", + "Object.Behavior::PropertyTrackThickness() + 2" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "PrimitiveDrawing::Arc" + "value": "DraggableSliderControl::DraggableSliderControl::SetThumbWidth" }, "parameters": [ "Object", - "0", - "Object.Behavior::PropertyTrackHeight()/2", - "Object.Behavior::PropertyTrackHeight()/2", - "90", - "270", - "", - "yes" - ], - "subInstructions": [] + "Behavior", + "Object.Behavior::PropertyTrackThickness() + 2", + "" + ] } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Draw active track (2 pixels bigger than property) ", - "comment2": "" + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "PrimitiveDrawing::Rectangle" + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbHeight" }, "parameters": [ "Object", - "0", - "-1", - "Object.Behavior::PropertyThumbOffset()", - "min(Object.Behavior::PropertyTrackHeight(),Object.Behavior::PropertyThumbHeight()) + 1" - ], - "subInstructions": [] + "Behavior", + "<", + "Object.Behavior::PropertyTrackThickness() + 2" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetThumbHeight" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyTrackThickness() + 2", + "" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" }, { - "disabled": false, - "folded": false, + "codeOnly": false, + "defaultValue": "", + "description": "Track thickness", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change width of thumb.", + "fullName": "Thumb width", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbWidth", + "private": false, + "sentence": "Change thumb width of _PARAM0_ to _PARAM2_ px", + "events": [ + { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -7048,95 +5368,97 @@ "textG": 0, "textR": 0 }, - "comment": "Prepare thumb settings", + "comment": "Thumb cannot be less than track thickness (plus 2 pixels)", "comment2": "" }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyThumbColor()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillOpacity" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbWidth" }, "parameters": [ "Object", + "Behavior", "=", - "Object.Behavior::PropertyThumbOpacity()" - ], - "subInstructions": [] + "max(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyTrackThickness() + 2)" + ] } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Draw Circle thumb", - "comment2": "" + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, "parameters": [ "Object", "Behavior", - "=", - "\"circle\"" - ], - "subInstructions": [] - } - ], - "actions": [ + "" + ] + }, { "type": { - "inverted": false, - "value": "PrimitiveDrawing::Circle" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, "parameters": [ "Object", - "Object.Behavior::PropertyThumbOffset()", - "Object.Behavior::PropertyTrackHeight() / 2", - "max(Object.Behavior::PropertyThumbWidth(),Object.Behavior::PropertyThumbHeight()) / 2" - ], - "subInstructions": [] + "Behavior", + "yes" + ] } - ], - "events": [] + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" }, { - "disabled": false, - "folded": false, + "codeOnly": false, + "defaultValue": "", + "description": "Thumb width", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change height of thumb.", + "fullName": "Thumb height", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbHeight", + "private": false, + "sentence": "Change thumb height of _PARAM0_ to _PARAM2_ px", + "events": [ + { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -7146,406 +5468,191 @@ "textG": 0, "textR": 0 }, - "comment": "Draw Rectangle thumb", + "comment": "Thumb cannot be less than track thickness (plus 2 pixels)", "comment2": "" }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbHeight" }, "parameters": [ "Object", "Behavior", "=", - "\"rectangle\"" - ], - "subInstructions": [] + "max(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyTrackThickness() + 2)" + ] } - ], - "actions": [], - "events": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, - "comment": "Make sure thumb width is not smaller than track height (to prevent track ends from showing)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbWidth" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "Object.Behavior::PropertyTrackHeight()" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetThumbWidth" - }, - "parameters": [ - "Object", - "Behavior", - "Object.Behavior::PropertyTrackHeight()", - "" - ], - "subInstructions": [] - } - ], - "events": [] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::Rectangle" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyThumbOffset() - (Object.Behavior::PropertyThumbWidth() / 2)", - "-1 * (Object.Behavior::PropertyThumbHeight() - Object.Behavior::PropertyTrackHeight()) / 2", - "Object.Behavior::PropertyThumbOffset() + (Object.Behavior::PropertyThumbWidth() / 2)", - "(Object.Behavior::PropertyThumbHeight() + Object.Behavior::PropertyTrackHeight()) / 2" - ], - "subInstructions": [] - } - ], - "events": [] + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" }, { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "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": "" + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" }, { - "disabled": false, - "folded": false, + "codeOnly": false, + "defaultValue": "", + "description": "Thumb height", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change radius of the halo around the thumb. This size is also used to detect interaction with the slider.", + "fullName": "Halo radius", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetHaloRadius", + "private": false, + "sentence": "Change halo radius of _PARAM0_ to _PARAM2_ px", + "events": [ + { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": true, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyHaloRadius" }, "parameters": [ "Object", - "Behavior" - ], - "subInstructions": [] + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] }, { "type": { - "inverted": false, - "value": "VarScene" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, "parameters": [ - "__DraggableSliderBehavior.SlideInProgress", - "=", - "0" - ], - "subInstructions": [] - }, + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Halo radius", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the halo opacity when the thumb is hovered.", + "fullName": "Halo opacity (hover)", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetHaloOpacityHover", + "private": false, + "sentence": "Change the halo opacity when hovered of _PARAM0_ to _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "inverted": false, - "value": "LayerVisible" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyHaloOpacityHover" }, "parameters": [ "Object", - "Object.Layer()" - ], - "subInstructions": [] + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] }, { "type": { - "inverted": false, - "value": "Visible" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, "parameters": [ - "Object" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect mouse clicks near track, start dragging", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SourisBouton" - }, - "parameters": [ - "", - "Left" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SourisX" - }, - "parameters": [ - "", - ">=", - "Object.X() - Object.Behavior::PropertyThumbWidth() / 2", - "Object.Layer()", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SourisX" - }, - "parameters": [ - "", - "<=", - "Object.X() + Object.Behavior::PropertyTrackWidth() + Object.Behavior::PropertyThumbWidth() / 2", - "Object.Layer()", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SourisY" - }, - "parameters": [ - "", - ">=", - "Object.Y() - (Object.Behavior::PropertyThumbHeight() - Object.Behavior::PropertyTrackHeight()) / 2", - "Object.Layer()", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SourisY" - }, - "parameters": [ - "", - "<=", - "Object.Y() + (Object.Behavior::PropertyThumbHeight() + Object.Behavior::PropertyTrackHeight()) / 2", - "Object.Layer()", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "ModVarScene" - }, - "parameters": [ - "__DraggableSliderBehavior.SlideInProgress", - "=", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Draw halo when the mouse is hovering over thumb ", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "SourisX" - }, - "parameters": [ - "", - ">=", - "Object.X() + Object.Behavior::PropertyThumbOffset() - max(Object.Behavior::PropertyThumbWidth(),Object.Behavior::PropertyThumbHeight()) / 2", - "Object.Layer()", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SourisX" - }, - "parameters": [ - "", - "<=", - "Object.X() + Object.Behavior::PropertyThumbOffset() + max(Object.Behavior::PropertyThumbWidth(),Object.Behavior::PropertyThumbHeight()) / 2", - "Object.Layer()", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SourisY" - }, - "parameters": [ - "", - ">=", - "Object.Y() - (Object.Behavior::PropertyThumbHeight() - Object.Behavior::PropertyTrackHeight()) / 2", - "Object.Layer()", - "" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "SourisY" - }, - "parameters": [ - "", - "<=", - "Object.Y() + (Object.Behavior::PropertyThumbHeight() + Object.Behavior::PropertyTrackHeight()) / 2", - "Object.Layer()", - "" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::FillOpacity" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyHaloOpacityHover()" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::OutlineOpacity" - }, - "parameters": [ - "Object", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "PrimitiveDrawing::Circle" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyThumbOffset()", - "Object.Behavior::PropertyTrackHeight()/2", - "Object.Behavior::PropertyHaloRadius()" - ], - "subInstructions": [] - } - ], - "events": [] + "Object", + "Behavior", + "yes" + ] } ] } @@ -7570,48 +5677,55 @@ "optional": false, "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Halo opacity (hover)", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if the slider is being dragged.", - "fullName": "Is being dragged", - "functionType": "Condition", - "name": "IsBeingDragged", + "description": "Change opacity of halo when pressed.", + "fullName": "Halo opacity (pressed)", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetHaloOpacityPressed", "private": false, - "sentence": "Slider _PARAM0_ is being dragged using the _PARAM1_ behavior", + "sentence": "Change halo opacity when pressed of _PARAM0_ to _PARAM2_ px", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyHaloOpacityClick" }, "parameters": [ "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Object", + "Behavior", + "yes" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -7634,21 +5748,57 @@ "optional": false, "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Halo opacity (pressed)", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" } ], "objectGroups": [] }, { - "description": "", - "fullName": "", + "description": "Change shape of thumb (circle or rectangle).", + "fullName": "Thumb shape", "functionType": "Action", - "name": "onCreated", + "group": "Slider thumb configuration", + "name": "SetThumbShape", "private": false, - "sentence": "", + "sentence": "Change shape of _PARAM0_ to _PARAM2_", "events": [ { - "disabled": false, - "folded": false, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbShape" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Shape\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -7658,28 +5808,48 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure object gets re-drawn every frame", + "comment": "Make sure thumb width is not smaller than track height (to prevent track ends from showing)", "comment2": "" }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "PrimitiveDrawing::ClearBetweenFrames" + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" }, "parameters": [ "Object", - "yes" - ], - "subInstructions": [] + "Behavior", + "=", + "\"rectangle\"" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyTrackThickness()" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyTrackThickness()", + "" + ] + } + ] } ], "parameters": [ @@ -7702,39 +5872,98 @@ "optional": false, "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "New thumb shape", + "longDescription": "", + "name": "Shape", + "optional": false, + "supplementaryInformation": "[\"circle\",\"rectangle\"]", + "type": "stringWithSelector" } ], "objectGroups": [] }, { - "description": "Change height of track", - "fullName": "Change height of track", + "description": "Make track use rounded ends.", + "fullName": "Rounded track ends", "functionType": "Action", - "name": "SetTrackHeight", + "group": "Slider track configuration", + "name": "SetRoundedTrack", "private": false, - "sentence": "Set track height of _PARAM0_ to _PARAM2_px", + "sentence": "Draw _PARAM0_ with a rounded track: _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "GetArgumentAsNumber(\"Value\")", + "=", + "0" + ] + } + ], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTrackHeight" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" }, "parameters": [ "Object", "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "GetArgumentAsNumber(\"Value\")", "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "1" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] } ], "parameters": [ @@ -7761,45 +5990,51 @@ { "codeOnly": false, "defaultValue": "", - "description": "New track height (px)", + "description": "Rounded track", "longDescription": "", "name": "Value", "optional": false, "supplementaryInformation": "", - "type": "expression" + "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Change height of thumb", - "fullName": "Change height of thumb", + "description": "Change opacity of thumb.", + "fullName": "Thumb opacity", "functionType": "Action", - "name": "SetThumbHeight", + "group": "Slider thumb configuration", + "name": "SetThumbOpacity", "private": false, - "sentence": "Set thumb height of _PARAM0_ to _PARAM2_px", + "sentence": "Change thumb opacity of _PARAM0_ to _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbHeight" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOpacity" }, "parameters": [ "Object", "Behavior", "=", "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -7826,7 +6061,7 @@ { "codeOnly": false, "defaultValue": "", - "description": "New thumb height (px)", + "description": "Thumb opacity", "longDescription": "", "name": "Value", "optional": false, @@ -7837,34 +6072,40 @@ "objectGroups": [] }, { - "description": "Change opacity of thumb", - "fullName": "Change opacity of thumb", + "description": "Change opacity of inactive track.", + "fullName": "Inactive track opacity", "functionType": "Action", - "name": "SetThumbOpacity", + "group": "Slider track configuration", + "name": "SetInactiveTrackOpacity", "private": false, - "sentence": "Set thumb opacity of _PARAM0_ to _PARAM2_", + "sentence": "Change inactive track opacity of _PARAM0_ to _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOpacity" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyInactiveTrackOpacity" }, "parameters": [ "Object", "Behavior", "=", "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -7891,7 +6132,7 @@ { "codeOnly": false, "defaultValue": "", - "description": "New thumb opacity", + "description": "Inactive track opacity", "longDescription": "", "name": "Value", "optional": false, @@ -7902,34 +6143,40 @@ "objectGroups": [] }, { - "description": "Change opacity of inactive track", - "fullName": "Change opacity of inactive track", + "description": "Change opacity of active track.", + "fullName": "Active track opacity", "functionType": "Action", - "name": "SetInactiveTrackOpacity", + "group": "Slider track configuration", + "name": "SetActiveTrackOpacity", "private": false, - "sentence": "Set inactive track opacity of _PARAM0_ to _PARAM2_", + "sentence": "Change active track opacity of _PARAM0_ to _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyInactiveTrackOpacity" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyActiveTrackOpacity" }, "parameters": [ "Object", "Behavior", "=", "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -7956,7 +6203,7 @@ { "codeOnly": false, "defaultValue": "", - "description": "New inactive track opacity", + "description": "Active track opacity", "longDescription": "", "name": "Value", "optional": false, @@ -7967,34 +6214,40 @@ "objectGroups": [] }, { - "description": "Change opacity of active track", - "fullName": "Change opacity of active track", + "description": "Change the color of the track that is LEFT of the thumb.", + "fullName": "Active track color ", "functionType": "Action", - "name": "SetActiveTrackOpacity", + "group": "Slider track configuration", + "name": "SetActiveTrackColor", "private": false, - "sentence": "Set active track opacity of _PARAM0_ to _PARAM2_", + "sentence": "Change active track color of _PARAM0_ to _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyActiveTrackOpacity" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyActiveTrackColor" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -8021,45 +6274,51 @@ { "codeOnly": false, "defaultValue": "", - "description": "New active track opacity", + "description": "Active track color", "longDescription": "", - "name": "Value", + "name": "Color", "optional": false, "supplementaryInformation": "", - "type": "expression" + "type": "color" } ], "objectGroups": [] }, { - "description": "Change width of track", - "fullName": "Change width of track", + "description": "Change the color of the track that is RIGHT of the thumb.", + "fullName": "Inactive track color", "functionType": "Action", - "name": "SetTrackWidth", + "group": "Slider track configuration", + "name": "SetInactiveTrackColor", "private": false, - "sentence": "Set track width of _PARAM0_ to _PARAM2_px", + "sentence": "Change inactive track color of _PARAM0_ to _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTrackWidth" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyInactiveTrackColor" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -8086,45 +6345,50 @@ { "codeOnly": false, "defaultValue": "", - "description": "New track width (px)", + "description": "Inactive track color", "longDescription": "", - "name": "Value", + "name": "Color", "optional": false, "supplementaryInformation": "", - "type": "expression" + "type": "color" } ], "objectGroups": [] }, { - "description": "Change width of thumb", - "fullName": "Change width of thumb", + "description": "Change the thumb color to a specific value.", + "fullName": "Thumb color", "functionType": "Action", - "name": "SetThumbWidth", + "group": "Slider thumb configuration", + "name": "SetThumbColor", "private": false, - "sentence": "Set thumb width of _PARAM0_ to _PARAM2_px", + "sentence": "Change thumb color of _PARAM0_ to _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbWidth" + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbColor" }, "parameters": [ "Object", "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -8151,45 +6415,52 @@ { "codeOnly": false, "defaultValue": "", - "description": "New thumb width (px)", + "description": "Thumb color", "longDescription": "", - "name": "Value", + "name": "Color", "optional": false, "supplementaryInformation": "", - "type": "expression" + "type": "color" } ], "objectGroups": [] }, { - "description": "Change shape of thumb (circle or rectangle)", - "fullName": "Change shape of thumb (circle or rectangle)", + "description": "Update the hitbox.", + "fullName": "Update hitbox", "functionType": "Action", - "name": "SetThumbShape", - "private": false, - "sentence": "Set shape of _PARAM0_ to _PARAM2_.", + "group": "Private", + "name": "UpdateHitbox", + "private": true, + "sentence": "Update the hitbox of _PARAM0_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbShape" + "value": "PrimitiveDrawing::SetRotationCenter" }, "parameters": [ "Object", - "Behavior", - "=", - "GetArgumentAsString(\"Shape\")" - ], - "subInstructions": [] + "Object.Behavior::PropertyTrackLength() / 2", + "Object.Behavior::PropertyTrackThickness() / 2" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::SetRectangularCollisionMask" + }, + "parameters": [ + "Object", + "-Object.Behavior::PropertyThumbWidth() / 2", + "-Object.Behavior::PropertyThumbHeight() / 2", + "Object.Behavior::PropertyTrackLength() + Object.Behavior::PropertyThumbWidth() / 2", + "Object.Behavior::PropertyThumbHeight() / 2" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -8212,529 +6483,512 @@ "optional": false, "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "New thumb shape", - "longDescription": "", - "name": "Shape", - "optional": false, - "supplementaryInformation": "[\"circle\",\"rectangle\"]", - "type": "stringWithSelector" } ], "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "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, + "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" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Value" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ThumbOffset" + }, + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "NeedRedraw" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsHovered" }, { - "description": "Change the radius of halo", - "fullName": "Change radius of halo", - "functionType": "Action", - "name": "SetHaloRadius", - "private": false, - "sentence": "Set halo radius of _PARAM0_ to _PARAM2_px", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "New halo radius (px)", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" - } - ], - "objectGroups": [] + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MouseX" }, { - "description": "Change the color of the track that is LEFT of the thumb.", - "fullName": "Change color of active track", - "functionType": "Action", - "name": "SetActiveTrackColor", - "private": false, - "sentence": "Set active track color of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyActiveTrackColor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"Color\")" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "New color for active track", - "longDescription": "", - "name": "Color", - "optional": false, - "supplementaryInformation": "", - "type": "color" - } - ], - "objectGroups": [] + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MouseY" }, { - "description": "Change the color of the track that is RIGHT of the thumb.", - "fullName": "Change color of inactive track", - "functionType": "Action", - "name": "SetInactiveTrackColor", - "private": false, - "sentence": "Set inactive track color of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyInactiveTrackColor" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"Color\")" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "New color for inactive track", - "longDescription": "", - "name": "Color", - "optional": false, - "supplementaryInformation": "", - "type": "color" - } - ], - "objectGroups": [] + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CurrentHaloRadius" }, { - "description": "Make track use rounded ends.", - "fullName": "Make track use rounded ends.", + "value": "0.2", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "HaloGrowSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TargetHaloRadius" + } + ] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "@4ian, Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "Movement", + "description": "Move objects in a rectangular pattern with easing functions from the Tween extension.\n\nIt can be used for:\n- Moveable platforms\n- Enemy movement patterns", + "extensionNamespace": "", + "fullName": "Rectangular movement", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNoYXBlLXJlY3RhbmdsZS1wbHVzIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LDZIMjJWOEgxOVYxMUgxN1Y4SDE0VjZIMTdWM0gxOVY2TTE3LDE3VjE0SDE5VjE5SDNWNkgxMVY4SDVWMTdIMTdaIiAvPjwvc3ZnPg==", + "name": "RectangleMovement", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/shape-rectangle-plus.svg", + "shortDescription": "Move objects in a rectangular pattern.", + "version": "1.0.0", + "origin": { + "identifier": "RectangularMovement", + "name": "gdevelop-extension-store" + }, + "tags": [ + "rectangular", + "movement", + "rectangle", + "patrol", + "platform", + "enemy" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Move objects in a rectangular pattern.", + "fullName": "Rectangular movement", + "name": "RectangleMovement", + "objectType": "", + "eventsFunctions": [ + { + "description": "", + "fullName": "", "functionType": "Action", - "name": "SetRoundedTrack", - "private": false, - "sentence": "Draw _PARAM0_ with a rounded track? _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "Egal" - }, - "parameters": [ - "GetArgumentAsNumber(\"Value\")", - "=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] - } - ], - "events": [] - }, + "group": "", + "name": "onCreated", + "private": false, + "sentence": "", + "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": false, - "value": "Egal" + "value": "RectangleMovement::RectangleMovement::SetPropertyOldX" }, "parameters": [ - "GetArgumentAsNumber(\"Value\")", + "Object", + "Behavior", "=", - "1" - ], - "subInstructions": [] - } - ], - "actions": [ + "Object.X()" + ] + }, { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" + "value": "RectangleMovement::RectangleMovement::SetPropertyOldY" }, "parameters": [ "Object", "Behavior", - "yes" - ], - "subInstructions": [] + "=", + "Object.Y()" + ] } - ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" + ] }, { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", - "type": "behavior" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set the initial state according to the configuration.", + "comment2": "" }, { - "codeOnly": false, - "defaultValue": "", - "description": "", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "yesorno" - } - ], - "objectGroups": [] - }, - { - "description": "Change the color of thumb to a specific value.", - "fullName": "Change color of thumb", - "functionType": "Action", - "name": "SetThumbColor", - "private": false, - "sentence": "Set thumb color of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbColor" + "value": "RectangleMovement::RectangleMovement::PropertyInitialPosition" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsString(\"Color\")" - ], - "subInstructions": [] + "\"Top-right corner\"" + ] } ], - "events": [] - } - ], - "parameters": [ - { - "codeOnly": false, - "defaultValue": "", - "description": "Object", - "longDescription": "", - "name": "Object", - "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Behavior", - "longDescription": "", - "name": "Behavior", - "optional": false, - "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", - "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "New thumb color", - "longDescription": "", - "name": "Color", - "optional": false, - "supplementaryInformation": "", - "type": "color" - } - ], - "objectGroups": [] - }, - { - "description": "Change the value of a slider to a specific value (this will move the thumb to the correct position).", - "fullName": "Change value of slider", - "functionType": "Action", - "name": "SetValue", - "private": false, - "sentence": "Set value of _PARAM0_ to _PARAM2_", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "Object.Behavior::TopRightDuration() / Object.Behavior::Perimeter()" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyValue" + "value": "RectangleMovement::RectangleMovement::PropertyInitialPosition" }, "parameters": [ "Object", "Behavior", - "<", - "0" - ], - "subInstructions": [] + "=", + "\"Bottom-right corner\"" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" }, "parameters": [ "Object", "Behavior", "=", - "0" - ], - "subInstructions": [] + "Object.Behavior::BottomRightDuration() / Object.Behavior::Perimeter()" + ] } - ], - "events": [] + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::PropertyValue" + "value": "RectangleMovement::RectangleMovement::PropertyInitialPosition" }, "parameters": [ "Object", "Behavior", - ">", - "1" - ], - "subInstructions": [] + "=", + "\"Bottom-left corner\"" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" }, "parameters": [ "Object", "Behavior", "=", - "1" - ], - "subInstructions": [] + "Object.Behavior::BottomLeftDuration() / Object.Behavior::Perimeter()" + ] } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Set the proper offset (this is move the slider)", - "comment2": "" + ] }, { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOffset" + "value": "RectangleMovement::RectangleMovement::SetPropertyLeft" }, "parameters": [ "Object", "Behavior", "=", - "Object.Behavior::PropertyValue() * Object.Behavior::PropertyTrackWidth()" - ], - "subInstructions": [] + "Object.X() - Object.Behavior::DeltaX()" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyTop" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y() - Object.Behavior::DeltaY()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -8745,7 +6999,7 @@ "longDescription": "", "name": "Object", "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", + "supplementaryInformation": "", "type": "object" }, { @@ -8755,48 +7009,133 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "New slider value", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "The value of the slider (based on position of the thumb).", - "fullName": "Value", - "functionType": "Expression", - "name": "Value", + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPreEvents", "private": false, "sentence": "", "events": [ { - "disabled": false, - "folded": false, + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update the rectangle when the object is moved outside of the behavior.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.X() - Object.Behavior::PropertyOldX()" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyTop" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Y() - Object.Behavior::PropertyOldY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move the object on the rectangular path.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyLeft() + Object.Behavior::DeltaX()", + "=", + "Object.Behavior::PropertyTop() + Object.Behavior::DeltaY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save the position to detect when the object is moved outside of the behavior.", + "comment2": "" + }, + { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "RectangleMovement::RectangleMovement::SetPropertyOldX" }, "parameters": [ - "Object.Behavior::PropertyValue()" - ], - "subInstructions": [] + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyOldY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -8807,7 +7146,7 @@ "longDescription": "", "name": "Object", "optional": false, - "supplementaryInformation": "PrimitiveDrawing::Drawer", + "supplementaryInformation": "", "type": "object" }, { @@ -8817,2197 +7156,1197 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "circle", - "type": "String", - "label": "Shape of the thumb. Either \"circle\" or \"rectangle\".", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "ThumbShape" - }, - { - "value": "20", - "type": "Number", - "label": "Width of the thumb (px) Example: 20", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "ThumbWidth" - }, - { - "value": "20", - "type": "Number", - "label": "Height of the thumb (px) Example: 20", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "ThumbHeight" - }, - { - "value": " 24;119;211", - "type": "String", - "label": "Color string for the thumb. Example: 24;119;211", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "ThumbColor" - }, - { - "value": "255", - "type": "Number", - "label": "Opacity of the thumb. Example: 255", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "ThumbOpacity" - }, - { - "value": "200", - "type": "Number", - "label": "Width of the track (px) Example: 200", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "TrackWidth" - }, - { - "value": "4", - "type": "Number", - "label": "Height of the track (px) Example: 4", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "TrackHeight" - }, - { - "value": "", - "type": "String", - "label": "Color string for the track that is RIGHT of the thumb. Example: 24;119;211 (Leave blank to use thumb color)", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "InactiveTrackColor" - }, - { - "value": "96", - "type": "Number", - "label": "Opacity of the track that is RIGHT of the thumb. Example: 96", - "description": "", - "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": "", - "extraInformation": [], - "hidden": false, - "name": "ActiveTrackColor" - }, - { - "value": "255", - "type": "Number", - "label": "Opacity of the track that is LEFT of the thumb. Example: 255", - "description": "", - "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": "", - "extraInformation": [], - "hidden": false, - "name": "HaloRadius" - }, - { - "value": "32", - "type": "Number", - "label": "Opacity of halo when the mouse hovers on the thumb. Example: 32", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "HaloOpacityHover" - }, - { - "value": "64", - "type": "Number", - "label": "Opacity of the halo that appears when the mouse clicks on the thumb. Example: 64", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "HaloOpacityClick" - }, - { - "value": "", - "type": "Boolean", - "label": "True if the thumb is being dragged", - "description": "", - "extraInformation": [], - "hidden": true, - "name": "IsBeingDragged" - }, - { - "value": "0", - "type": "Number", - "label": "Range (0,1) based on the thumb position on the track. 0=left, 1=right", - "description": "", - "extraInformation": [], - "hidden": true, - "name": "Value" - }, - { - "value": "0", - "type": "Number", - "label": "Number of pixels the thumb is from the left side of the track.", - "description": "", - "extraInformation": [], - "hidden": true, - "name": "ThumbOffset" }, - { - "value": "true", - "type": "Boolean", - "label": "If true, round the ends of the track.", - "description": "", - "extraInformation": [], - "hidden": false, - "name": "RoundedTrack" - } - ] - } - ] - }, - { - "author": "@4ian, Tristan Rhodes (https://victrisgames.itch.io/)", - "description": "Allow an object to move in a rectangular pattern.\nBy default, movement will slow down when going around corners, but this can be changed to always use a constant speed.\n\nExample uses:\n- Moveable platforms\n- Enemy movement patterns\n\nProperties:\n- Center of movement, X position\n- Center of movement, Y position\n- Horizontal distance\n- Vertical distance\n- Horizontal speed\n- Vertical speed\n- Use constant speed (object will not slow down at corners)\n- Use counter-clockwise direction\n\nTips:\n- Set the CenterX and CenterY values to move the object\n- For horizontal movement only, set vertical distance to 0\n- For vertical movement only, set horizontal distance to 0\n- Use conditions to apply logic based on the direction the object is moving. For example, setting the animation.", - "extensionNamespace": "", - "fullName": "Rectangular Movement", - "helpPath": "https://victrisgames.itch.io/extension-rectangular-movement", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNoYXBlLXJlY3RhbmdsZS1wbHVzIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LDZIMjJWOEgxOVYxMUgxN1Y4SDE0VjZIMTdWM0gxOVY2TTE3LDE3VjE0SDE5VjE5SDNWNkgxMVY4SDVWMTdIMTdaIiAvPjwvc3ZnPg==", - "name": "RectangularMovement", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/shape-rectangle-plus.svg", - "shortDescription": "Allow an object to move in a rectangular pattern.", - "version": "0.2.0", - "tags": [ - "rectangular", - "movement", - "rectangle", - "patrol", - "platform", - "enemy" - ], - "authorIds": [], - "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "Allow an object to move in a rectangular pattern.", - "fullName": "Rectangular Movement", - "name": "RectangularMovement", - "objectType": "", - "eventsFunctions": [ { "description": "", "fullName": "", "functionType": "Action", - "name": "doStepPreEvents", + "group": "", + "name": "doStepPostEvents", "private": false, "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": false, - "folded": false, - "name": "Rectangular movement", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Step on the path.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "mod(Object.Behavior::PropertyProgress() + TimeDelta() / Object.Behavior::LoopDuration(), 1)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": false, - "folded": false, - "name": "Move slowly around corners (default)", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "RectangularMovement::RectangularMovement::PropertyConstantSpeed" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": false, - "folded": false, - "name": "Move Clockwise or CounterClockwise", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Horizontal movement is the same for both methods", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyHorizontalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreX" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyCenterPointX() + cos(ToRad(Object.Behavior::PropertyProgressX())) * abs(Object.Behavior::PropertyHorizontalDistance()) / 2" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Vertical movement is reversed based on the parameter", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyVerticalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreY" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyCenterPointY() + cos(ToRad(Object.Behavior::PropertyProgressY())) * abs(Object.Behavior::PropertyVerticalDistance()) / 2" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreY" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyCenterPointY() - cos(ToRad(Object.Behavior::PropertyProgressY())) * abs(Object.Behavior::PropertyVerticalDistance()) / 2" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": false, - "folded": false, - "name": "Calculate how to move object", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "180" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta()) / 2" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta()) / 2" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Skip if no horizontal movement is desired", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyHorizontalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "180" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record direction", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Left\"" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "180" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "360" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta()) / 2" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta()) / 2" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Skip if no vertical movement is desired", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyVerticalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "360" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record direction", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Up\"" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Down\"" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "360" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "540" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta()) / 2" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta()) / 2" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Skip if no horizontal movement is desired", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyHorizontalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "540" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record direction", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Right\"" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "540" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "720" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta()) / 2" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta()) / 2" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Skip if no vertical movement is desired", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyVerticalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "720" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record direction", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Down\"" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Up\"" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset the counter after the rectangular path is completed", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "720" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "-", - "720" - ], - "subInstructions": [] - } - ], - "events": [] - } - ], - "parameters": [] - } - ] - } - ], - "parameters": [] + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "mod(Object.Behavior::PropertyProgress() - TimeDelta() / Object.Behavior::LoopDuration(), 1)" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Teleport the object to a corner of the movement rectangle.", + "fullName": "Teleport at a corner", + "functionType": "Action", + "group": "", + "name": "TeleportToCorner", + "private": false, + "sentence": "Set the position of _PARAM0_ at the _PARAM2_ of the rectangle loop", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Corner\")", + "=", + "\"Top-left corner\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Corner\")", + "=", + "\"Top-right corner\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::TopRightDuration() / Object.Behavior::LoopDuration()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Corner\")", + "=", + "\"Bottom-right corner\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::BottomRightDuration() / Object.Behavior::LoopDuration()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Corner\")", + "=", + "\"Bottom-left corner\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::BottomLeftDuration() / Object.Behavior::LoopDuration()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Corner", + "longDescription": "", + "name": "Corner", + "optional": false, + "supplementaryInformation": "[\"Top-left corner\",\"Top-right corner\",\"Bottom-left corner\",\"Bottom-right corner\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the perimeter of the movement rectangle.", + "fullName": "Perimeter", + "functionType": "Expression", + "group": "Rectangular movement shape", + "name": "Perimeter", + "private": false, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "2 * (abs(Object.Behavior::PropertyWidth()) + abs(Object.Behavior::PropertyHeight()))" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the time the object takes to go through the whole rectangle (in seconds).", + "fullName": "Loop duration", + "functionType": "Expression", + "group": "", + "name": "LoopDuration", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "2 * (Object.Behavior::PropertyHorizontalEdgeDuration() + Object.Behavior::PropertyVerticalEdgeDuration())" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the time the object takes to go through a horizontal edge (in seconds).", + "fullName": "Horizontal edge duration", + "functionType": "Expression", + "group": "", + "name": "HorizontalEdgeDuration", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHorizontalEdgeDuration()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the time the object takes to go through a vertical edge (in seconds).", + "fullName": "Vertical edge duration", + "functionType": "Expression", + "group": "", + "name": "VerticalEdgeDuration", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyVerticalEdgeDuration()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the rectangle width.", + "fullName": "Width", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Width", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyWidth()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the rectangle height.", + "fullName": "Height", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Height", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHeight()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the left bound of the movement.", + "fullName": "Left bound", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Left", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyLeft()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the top bound of the movement.", + "fullName": "Top bound", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Top", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTop()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the right bound of the movement.", + "fullName": "Right bound", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Right", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyLeft() + Object.Behavior::PropertyWidth()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the bottom bound of the movement.", + "fullName": "Bottom bound", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Bottom", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTop() + Object.Behavior::PropertyHeight()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the left bound of the rectangular movement.", + "fullName": "Left bound", + "functionType": "Action", + "group": "Rectangular movement shape", + "name": "SetLeft", + "private": false, + "sentence": "Change the movement left bound of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyWidth" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyLeft() - GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the top bound of the rectangular movement.", + "fullName": "Top bound", + "functionType": "Action", + "group": "Rectangular movement shape", + "name": "SetTop", + "private": false, + "sentence": "Change the movement top bound of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyHeight" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyTop() - GetArgumentAsNumber(\"Value\")" + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": false, - "folded": false, - "name": "Move at a constant speed", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyConstantSpeed" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": false, - "folded": false, - "name": "Move Clockwise or CounterClockwise", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Vertical movement is the same for both methods", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyVerticalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreY" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyCenterPointY() - abs(Object.Behavior::PropertyVerticalDistance()) / 2 + Object.Behavior::PropertyProgressY()" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyHorizontalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreX" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyCenterPointX() - abs(Object.Behavior::PropertyHorizontalDistance()) / 2 + Object.Behavior::PropertyProgressX()" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "MettreX" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyCenterPointX() + abs(Object.Behavior::PropertyHorizontalDistance()) / 2 - Object.Behavior::PropertyProgressX()" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "disabled": false, - "folded": false, - "name": "Calculate how to move object", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta())" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyProgressX" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "abs(Object.Behavior::HorizontalDistance())" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "abs(Object.Behavior::PropertyHorizontalDistance())" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record direction", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Left\"" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Right\"" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "1" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta())" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyProgressY" - }, - "parameters": [ - "Object", - "Behavior", - ">=", - "abs(Object.Behavior::VerticalDistance())" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "abs(Object.Behavior::PropertyVerticalDistance())" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record direction", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Down\"" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "2" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" - }, - "parameters": [ - "Object", - "Behavior", - "-", - "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta())" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect when Progress crosses 0 (or if horizontal movement is disabled)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyProgressX" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyHorizontalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record direction", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Right\"" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Left\"" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "3" - ], - "subInstructions": [] - } - ], - "actions": [], - "events": [ - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" - }, - "parameters": [ - "Object", - "Behavior", - "-", - "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta())" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect when Progress crosses 0 (or if vertical movement is disabled)", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyProgressY" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyVerticalDistance" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - }, - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Record direction", - "comment2": "" - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Up\"" - ], - "subInstructions": [] - } - ], - "events": [] - } - ] - } - ], - "parameters": [] - } - ] - } - ], - "parameters": [] + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyTop" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the right bound of the rectangular movement.", + "fullName": "Right bound", + "functionType": "Action", + "group": "Rectangular movement shape", + "name": "SetRight", + "private": false, + "sentence": "Change the movement right bound of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyWidth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\") - Object.Behavior::PropertyLeft()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the bottom bound of the rectangular movement.", + "fullName": "Bottom bound", + "functionType": "Action", + "group": "Rectangular movement shape", + "name": "SetBottom", + "private": false, + "sentence": "Change the movement bottom bound of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyHeight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\") - Object.Behavior::PropertyTop()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the time the object takes to go through a horizontal edge (in seconds).", + "fullName": "Horizontal edge duration", + "functionType": "Action", + "group": "Rectangular movement speed", + "name": "SetHorizontalEdgeDuration", + "private": false, + "sentence": "Change the time _PARAM0_ takes to go through a horizontal edge to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyHorizontalEdgeDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] } - ], - "parameters": [] + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" }, { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Set the center of movement to the initial location of the object", - "comment2": "" + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" }, { - "disabled": false, - "folded": false, + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the time the object takes to go through a vertical edge (in seconds).", + "fullName": "Vertical edge duration", + "functionType": "Action", + "group": "Rectangular movement speed", + "name": "SetVerticalEdgeDuration", + "private": false, + "sentence": "Change the time _PARAM0_ takes to go through a vertical edge to _PARAM2_", + "events": [ + { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCenterPointX" + "value": "RectangleMovement::RectangleMovement::SetPropertyVerticalEdgeDuration" }, "parameters": [ "Object", "Behavior", "=", - "0" - ], - "subInstructions": [] - }, + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the direction to clockwise or counter-clockwise.", + "fullName": "Clockwise", + "functionType": "Action", + "group": "Rectangular movement speed", + "name": "SetClockwise", + "private": false, + "sentence": "Use clockwise direction for _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCenterPointY" + "value": "GetArgumentAsBoolean" }, "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] + "\"Value\"" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCenterPointX" + "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" }, "parameters": [ "Object", "Behavior", - "=", - "Object.X()" - ], - "subInstructions": [] - }, + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCenterPointY" + "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" }, "parameters": [ "Object", "Behavior", - "=", - "Object.Y()" - ], - "subInstructions": [] + "no" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -11028,38 +8367,47 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Clockwise", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Counter used to change the Y position of the object", - "fullName": "Progress Y", - "functionType": "Expression", - "name": "ProgressY", + "description": "Change the easing function of the movement.", + "fullName": "Easing", + "functionType": "Action", + "group": "Rectangular movement speed", + "name": "SetEasing", "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "sentence": "Change the easing of _PARAM0_ to _PARAM2_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "RectangleMovement::RectangleMovement::SetPropertyEasing" }, "parameters": [ - "Object.Behavior::PropertyProgressY()" - ], - "subInstructions": [] + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -11080,38 +8428,136 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Easing", + "longDescription": "", + "name": "Easing", + "optional": false, + "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" } ], "objectGroups": [] }, { - "description": "Counter used to change the X position of the object", - "fullName": "Progress X", - "functionType": "Expression", - "name": "ProgressX", + "description": "Toggle the direction to clockwise or counter-clockwise.", + "fullName": "Toggle direction", + "functionType": "Action", + "group": "", + "name": "ToogleClockwise", "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "sentence": "Toogle the direction of _PARAM0_", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyToogleClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyToogleClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "=" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyToogleClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyToogleClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" }, "parameters": [ - "Object.Behavior::PropertyProgressX()" - ], - "subInstructions": [] + "Object", + "Behavior", + "yes" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -11132,38 +8578,89 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Horizontal speed", - "fullName": "Horizontal speed ", - "functionType": "Expression", - "name": "HorizontalSpeed", + "description": "Check if the object is moving to the left.", + "fullName": "Is moving left", + "functionType": "Condition", + "group": "", + "name": "IsMovingLeft", "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "sentence": "_PARAM0_ is moving to the left", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnTop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "SetReturnBoolean" }, "parameters": [ - "Object.Behavior::PropertyHorizontalSpeed()" - ], - "subInstructions": [] + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnBottom" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -11184,38 +8681,89 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Vertical speed", - "fullName": "Vertical speed", - "functionType": "Expression", - "name": "VerticalSpeed", + "description": "Check if the object is moving up.", + "fullName": "Is moving up", + "functionType": "Condition", + "group": "", + "name": "IsMovingUp", "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "sentence": "_PARAM0_ is moving up", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnLeft" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "SetReturnBoolean" }, "parameters": [ - "Object.Behavior::PropertyVerticalSpeed()" - ], - "subInstructions": [] + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnRight" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -11236,38 +8784,89 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Horizontal distance", - "fullName": "Horizontal distance", - "functionType": "Expression", - "name": "HorizontalDistance", + "description": "Object is moving to the right.", + "fullName": "Is moving right", + "functionType": "Condition", + "group": "", + "name": "IsMovingRight", "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "sentence": "_PARAM0_ is moving to the right", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnTop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "SetReturnBoolean" }, "parameters": [ - "Object.Behavior::PropertyHorizontalDistance()" - ], - "subInstructions": [] + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnBottom" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -11288,38 +8887,89 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Vertical distance", - "fullName": "Vertical distance", - "functionType": "Expression", - "name": "VerticalDistance", + "description": "Check if the object is moving down.", + "fullName": "Is moving down", + "functionType": "Condition", + "group": "", + "name": "IsMovingDown", "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "sentence": "_PARAM0_ is moving down", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnRight" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "SetReturnBoolean" }, "parameters": [ - "Object.Behavior::PropertyVerticalDistance()" - ], - "subInstructions": [] + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnLeft" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -11340,38 +8990,45 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Center of movement, X position", - "fullName": "Center of movement, X position", - "functionType": "Expression", - "name": "CenterX", + "description": "Object is on the left side of the rectangle.", + "fullName": "Is on left", + "functionType": "Condition", + "group": "", + "name": "IsOnLeft", "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "sentence": "_PARAM0_ is on the left side", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object.Behavior::PropertyCenterPointX()" - ], - "subInstructions": [] + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::BottomLeftDuration()" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -11392,38 +9049,45 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Center of movement, Y position", - "fullName": "Center of movement, Y position", - "functionType": "Expression", - "name": "CenterY", + "description": "Object is on the top side of the rectangle.", + "fullName": "Is on top", + "functionType": "Condition", + "group": "", + "name": "IsOnTop", "private": false, - "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "sentence": "_PARAM0_ is on the top side", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "SetReturnNumber" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object.Behavior::PropertyCenterPointY()" - ], - "subInstructions": [] + "Object.Behavior::CurrentTime()", + "<=", + "Object.Behavior::TopRightDuration()" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -11444,41 +9108,55 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Set center Y position", - "fullName": "Set center Y position", - "functionType": "Action", - "name": "SetCenterY", + "description": "Object is on the right side of the rectangle.", + "fullName": "Is on right", + "functionType": "Condition", + "group": "", + "name": "IsOnRight", "private": false, - "sentence": "Set center Y position of _PARAM0_ to _PARAM2_", + "sentence": "_PARAM0_ is on the right side", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCenterPointY" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::TopRightDuration()" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + "<=", + "Object.Behavior::BottomRightDuration()" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -11499,51 +9177,55 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Value", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Set center X position", - "fullName": "Set center X position", - "functionType": "Action", - "name": "SetCenterX", + "description": "Object is on the bottom side of the rectangle.", + "fullName": "Is on bottom", + "functionType": "Condition", + "group": "", + "name": "IsOnBottom", "private": false, - "sentence": "Set center X position of _PARAM0_ to _PARAM2_", + "sentence": "_PARAM0_ is on the bottom side", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCenterPointX" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::BottomRightDuration()" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + "<=", + "Object.Behavior::BottomLeftDuration()" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ @@ -11564,51 +9246,34 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Value", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Set horizontal distance", - "fullName": "Set horizontal distance", - "functionType": "Action", - "name": "SetHorizontalDistance", - "private": false, - "sentence": "Set horizontal distance of _PARAM0_ to _PARAM2_", + "description": "Return the duration between the top-left vertex and the top-right one.", + "fullName": "Duration to top right", + "functionType": "Expression", + "group": "", + "name": "TopRightDuration", + "private": true, + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyHorizontalDistance" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "Object.Behavior::PropertyHorizontalEdgeDuration()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -11629,51 +9294,34 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Value", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Set vertical distance", - "fullName": "Set vertical distance", - "functionType": "Action", - "name": "SetVerticalDistance", - "private": false, - "sentence": "Set vertical distance of _PARAM0_ to _PARAM2_", + "description": "Return the duration between the top-left vertex and the bottom-right one.", + "fullName": "Duration to bottom right", + "functionType": "Expression", + "group": "", + "name": "BottomRightDuration", + "private": true, + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyVerticalDistance" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "Object.Behavior::PropertyHorizontalEdgeDuration() + Object.Behavior::PropertyVerticalEdgeDuration()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -11694,51 +9342,34 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Value", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Set horizontal speed", - "fullName": "Set horizontal speed", - "functionType": "Action", - "name": "SetHorizontalSpeed", - "private": false, - "sentence": "Set horizontal speed of _PARAM0_ to _PARAM2_", + "description": "Return the duration between the top-left vertex and the bottom-left one.", + "fullName": "Duration to bottom left", + "functionType": "Expression", + "group": "", + "name": "BottomLeftDuration", + "private": true, + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyHorizontalSpeed" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "2 * Object.Behavior::PropertyHorizontalEdgeDuration() + Object.Behavior::PropertyVerticalEdgeDuration()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -11759,51 +9390,59 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Value", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Set vertical speed", - "fullName": "Set vertical speed", - "functionType": "Action", - "name": "SetVerticalSpeed", - "private": false, - "sentence": "Set vertical speed of _PARAM0_ to _PARAM2_", + "description": "Return the ratio between the covered distance from the last vertex and the edge length (between 0 and 1).", + "fullName": "Progress on edge", + "functionType": "Expression", + "group": "", + "name": "EdgeProgress", + "private": true, + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyVerticalSpeed" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ], - "subInstructions": [] + "Object.Behavior::HalfCurrentTime() / Object.Behavior::PropertyHorizontalEdgeDuration()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::HalfCurrentTime()", + ">=", + "abs(Object.Behavior::PropertyHorizontalEdgeDuration())" + ] } ], - "events": [] + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "(Object.Behavior::HalfCurrentTime() - Object.Behavior::PropertyHorizontalEdgeDuration()) / Object.Behavior::PropertyVerticalEdgeDuration()" + ] + } + ] } ], "parameters": [ @@ -11824,93 +9463,55 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "Value", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Use counter-clockwise direction", - "fullName": "Use counter-clockwise direction", - "functionType": "Action", - "name": "SetCounterClockwise", - "private": false, - "sentence": "Use counter-clockwise direction for _PARAM0_: _PARAM2_", + "description": "Return the X position of the current edge origin.", + "fullName": "Edge origin X", + "functionType": "Expression", + "group": "", + "name": "EdgeOriginX", + "private": true, + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCounterClockwise" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::TopRightDuration()" + ] + }, { "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "\"Value\"" - ], - "subInstructions": [] + "Object.Behavior::CurrentTime()", + "<", + "Object.Behavior::BottomLeftDuration()" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyCounterClockwise" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] + "Object.Behavior::PropertyWidth()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -11931,93 +9532,55 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Use constant speed", - "fullName": "Use constant speed", - "functionType": "Action", - "name": "SetConstantSpeed", - "private": false, - "sentence": "Use constant speed for _PARAM0_: _PARAM2_", + "description": "Return the Y position of the current edge origin.", + "fullName": "Edge origin Y", + "functionType": "Expression", + "group": "", + "name": "EdgeOriginY", + "private": true, + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ], - "subInstructions": [] - } - ], - "actions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyConstantSpeed" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object", - "Behavior", - "yes" - ], - "subInstructions": [] - } - ], - "events": [] - }, - { - "disabled": false, - "folded": false, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::BottomRightDuration()" + ] + }, { "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "\"Value\"" - ], - "subInstructions": [] + "Object.Behavior::CurrentTime()", + "<", + "Object.Behavior::Perimeter()" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyConstantSpeed" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "no" - ], - "subInstructions": [] + "Object.Behavior::PropertyHeight()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -12038,77 +9601,55 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" - }, - { - "codeOnly": false, - "defaultValue": "", - "description": "", - "longDescription": "", - "name": "Value", - "optional": false, - "supplementaryInformation": "", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Reset progress counters. The object will return to the initial state.", - "fullName": "Reset progress counters", - "functionType": "Action", - "name": "ResetProgressCounters", - "private": false, - "sentence": "Reset progress counters on _PARAM0_", + "description": "Return the X position of the current edge target.", + "fullName": "Edge target X", + "functionType": "Expression", + "group": "", + "name": "EdgeTargetY", + "private": true, + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::TopRightDuration()" + ] }, { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] - }, + "Object.Behavior::CurrentTime()", + "<", + "Object.Behavior::BottomLeftDuration()" + ] + } + ], + "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "0" - ], - "subInstructions": [] + "Object.Behavior::PropertyHeight()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -12129,52 +9670,45 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Object is moving downwards", - "fullName": "Object is moving downwards", - "functionType": "Condition", - "name": "IsMovingDown", - "private": false, - "sentence": "_PARAM0_ is moving downwards", + "description": "Return the Y position of the current edge target.", + "fullName": "Edge target Y", + "functionType": "Expression", + "group": "", + "name": "EdgeTargetX", + "private": true, + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCurrentDirection" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"Down\"" - ], - "subInstructions": [] + "Object.Behavior::CurrentTime()", + "<", + "Object.Behavior::BottomRightDuration()" + ] } ], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Object.Behavior::PropertyWidth()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -12195,52 +9729,34 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Object is moving upwards", - "fullName": "Object is moving upwards", - "functionType": "Condition", - "name": "IsMovingUp", - "private": false, - "sentence": "_PARAM0_ is moving upwards", + "description": "Return the time from the top-left vertex.", + "fullName": "Current time", + "functionType": "Expression", + "group": "", + "name": "CurrentTime", + "private": true, + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Up\"" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Object.Behavior::PropertyProgress() * Object.Behavior::LoopDuration()" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -12261,52 +9777,34 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Object is moving to the left", - "fullName": "Object is moving to the left", - "functionType": "Condition", - "name": "IsMovingLeft", - "private": false, - "sentence": "_PARAM0_ is moving to the left", + "description": "Return the covered length from the top-left vertex or the bottom-right one.", + "fullName": "Half Current length", + "functionType": "Expression", + "group": "", + "name": "HalfCurrentTime", + "private": true, + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCurrentDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Left\"" - ], - "subInstructions": [] - } - ], + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Object. Behavior::LoopDuration() * mod(Object.Behavior::PropertyProgress(), 0.5)" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -12327,52 +9825,82 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Object is moving to the right", - "fullName": "Object is moving to the right", - "functionType": "Condition", - "name": "IsMovingRight", - "private": false, - "sentence": "_PARAM0_ is moving to the right", + "description": "Return the displacement on the X axis from the top-left vertex.", + "fullName": "Delta X", + "functionType": "Expression", + "group": "", + "name": "DeltaX", + "private": true, + "sentence": "", "events": [ { - "disabled": false, - "folded": false, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": false, - "value": "RectangularMovement::RectangularMovement::PropertyCurrentDirection" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"Right\"" - ], - "subInstructions": [] + "Tween::Ease(Object.Behavior::PropertyEasing(), Object.Behavior::EdgeOriginX(), Object.Behavior::EdgeTargetX(), Object.Behavior::EdgeProgress())" + ] } - ], + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the displacement on the Y axis from the top-left vertex.", + "fullName": "Delta Y", + "functionType": "Expression", + "group": "", + "name": "DeltaY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "inverted": false, - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" - ], - "subInstructions": [] + "Tween::Ease(Object.Behavior::PropertyEasing(), Object.Behavior::EdgeOriginY(), Object.Behavior::EdgeTargetY(), Object.Behavior::EdgeProgress())" + ] } - ], - "events": [] + ] } ], "parameters": [ @@ -12393,7 +9921,7 @@ "longDescription": "", "name": "Behavior", "optional": false, - "supplementaryInformation": "RectangularMovement::RectangularMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", "type": "behavior" } ], @@ -12402,121 +9930,178 @@ ], "propertyDescriptors": [ { - "value": "60", + "value": "100", "type": "Number", - "label": "Horizontal speed", + "label": "Width", "description": "", + "group": "Dimension", "extraInformation": [], "hidden": false, - "name": "HorizontalSpeed" + "name": "Width" }, { - "value": "60", + "value": "100", "type": "Number", - "label": "Vertical speed", + "label": "Height", "description": "", + "group": "Dimension", "extraInformation": [], "hidden": false, - "name": "VerticalSpeed" + "name": "Height" }, { - "value": "100", - "type": "Number", - "label": "Horizontal Distance: Amplitude of the movement on X axis (0 to deactivate)", + "value": "true", + "type": "Boolean", + "label": "Clockwise", "description": "", + "group": "Speed", "extraInformation": [], "hidden": false, - "name": "HorizontalDistance" + "name": "Clockwise" }, { - "value": "0", + "value": "4", "type": "Number", - "label": "Vertical Distance: Amplitude of the movement on Y axis (0 to deactivate)", + "label": "Horizontal edge duration (in seconds)", "description": "", + "group": "Speed", "extraInformation": [], "hidden": false, - "name": "VerticalDistance" + "name": "HorizontalEdgeDuration" }, { - "value": "0", + "value": "1", "type": "Number", - "label": "Center of movement, X position", + "label": "Vertical edge duration (in seconds)", "description": "", + "group": "Speed", "extraInformation": [], "hidden": false, - "name": "CenterPointX" + "name": "VerticalEdgeDuration" }, { - "value": "0", + "value": "", "type": "Number", - "label": "Center of movement, Y position", + "label": "", "description": "", + "group": "", "extraInformation": [], - "hidden": false, - "name": "CenterPointY" + "hidden": true, + "name": "Left" }, { - "value": "0", + "value": "", "type": "Number", - "label": "Counter used to change X position", + "label": "", "description": "", + "group": "", "extraInformation": [], "hidden": true, - "name": "ProgressX" + "name": "Top" }, { - "value": "0", + "value": "", "type": "Number", - "label": "Counter used to change Y position", + "label": "", "description": "", + "group": "", "extraInformation": [], "hidden": true, - "name": "ProgressY" + "name": "Progress" }, { - "value": "0", + "value": "", "type": "Number", - "label": "Counter used for rectangular movement", + "label": "", "description": "", + "group": "", "extraInformation": [], "hidden": true, - "name": "RectangularCounter" + "name": "OldX" }, { "value": "", - "type": "Boolean", - "label": "Use a constant speed for movement", + "type": "Number", + "label": "", "description": "", + "group": "", "extraInformation": [], - "hidden": false, - "name": "ConstantSpeed" + "hidden": true, + "name": "OldY" }, { - "value": "", - "type": "Boolean", - "label": "Use counter-clockwise direction", + "value": "easeInOutSine", + "type": "Choice", + "label": "Easing", "description": "", - "extraInformation": [], + "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, - "name": "CounterClockwise" + "name": "Easing" }, { - "value": "", + "value": "Top-left corner", "type": "Choice", - "label": "Current direction the object is moving", + "label": "Initial position", "description": "", + "group": "", "extraInformation": [ - "Left", - "Right", - "Up", - "Down" + "Top-left corner", + "Top-right corner", + "Bottom-right corner", + "Bottom-left corner" ], + "hidden": false, + "name": "InitialPosition" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], "hidden": true, - "name": "CurrentDirection" + "name": "ToogleClockwise" } ] } - ] + ], + "eventsBasedObjects": [] } ], "externalLayouts": [],