diff --git "a/examples/360\302\260-platformer/360\302\260-platformer.json" "b/examples/360\302\260-platformer/360\302\260-platformer.json" index 60e94a561..bd4553850 100644 --- "a/examples/360\302\260-platformer/360\302\260-platformer.json" +++ "b/examples/360\302\260-platformer/360\302\260-platformer.json" @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 226, + "build": 245, "major": 5, "minor": 5, "revision": 0 @@ -59,7 +59,9 @@ "platformer" ], "playableDevices": [ - "keyboard" + "keyboard", + "mobile", + "mobile" ], "extensionProperties": [], "platforms": [ @@ -331,12 +333,11 @@ "smoothed": true, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/assets/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", + "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", "name": "rotate-screen-icon.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -360,13 +361,16 @@ "gridType": "rectangular", "gridWidth": 24, "gridHeight": 24, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.25, "snap": true, "zoomFactor": 0.43357743047026254, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -3326,6 +3330,7 @@ "assetStoreId": "e71bd69f896d6c7531b48c65ceb5da25071d4fbdeb518aeceecba8d21f34ed8d", "name": "WalkJoystick", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -3407,6 +3412,7 @@ "assetStoreId": "e5919fb86a559b00001678c710efe55f4e9f2e032a9ff9610087370f998d57de", "name": "ScreenOrientationChecker", "type": "ScreenOrientationChecker::ScreenOrientationChecker", + "variant": "Black screen orientation checker", "variables": [], "effects": [], "behaviors": [ @@ -3426,116 +3432,6 @@ "BackgroundColor": "24;24;24", "CornerRadius": 8, "Padding": 5 - }, - "childrenContent": { - "BackgroundPainter": { - "fillOpacity": 255, - "outlineSize": 0, - "outlineOpacity": 255, - "absoluteCoordinates": true, - "clearBetweenFrames": true, - "antialiasing": "none", - "fillColor": { - "r": 0, - "g": 0, - "b": 0 - }, - "outlineColor": { - "r": 0, - "g": 0, - "b": 0 - } - }, - "Icon": { - "adaptCollisionMaskAutomatically": true, - "updateIfNotVisible": false, - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "rotate-screen-icon.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 52.5, - "y": 56.5 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 1 - }, - { - "x": 105, - "y": 1 - }, - { - "x": 105, - "y": 113 - }, - { - "x": 0, - "y": 113 - } - ] - ] - } - ] - } - ] - } - ] - }, - "Text": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" - } - } } } ], @@ -4998,6 +4894,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5031,6 +4928,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5064,6 +4962,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5108,6 +5007,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5141,6 +5041,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5252,13 +5153,13 @@ "name": "SpriteMultitouchJoystick", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", "shortDescription": "Joysticks or buttons for touchscreens.", - "version": "1.7.0", + "version": "1.9.0", "description": [ - "Multitouch joysticks can be used the same way as physical gamepads:", + "Multitouch joysticks are objects showing a joystick on the screen, useful for mobile. They work like a physical gamepad:", "- 4 or 8 directions", "- Analogus pads", "- Player selection", - "- Controls mapping for top-down movement and platformer characters", + "- Automatic \"mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the virtual joystick (it works by reading the multitouch joystick state and simulating controls). No need for additional events to make it work once the behaviors are set up.", "", "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." ], @@ -5322,6 +5223,28 @@ } ], "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, { "fullName": "Accelerated speed", "functionType": "Expression", @@ -5740,11 +5663,11 @@ "objectGroups": [] }, { - "description": "Check if a button is pressed on a gamepad.", - "fullName": "Multitouch controller button pressed", + "description": "Check if a button was just pressed on a multitouch controller.", + "fullName": "Multitouch controller button just pressed", "functionType": "Condition", - "name": "IsButtonPressed", - "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ was just pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5756,7 +5679,73 @@ "parameters": [ "Controllers[ControllerIdentifier].Buttons[Button].State", "=", - "\"Pressed\"" + "\"JustPressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is pressed on a multitouch controller.", + "fullName": "Multitouch controller button pressed", + "functionType": "Condition", + "name": "IsButtonPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"JustPressed\"" + ] + } ] } ], @@ -5788,7 +5777,7 @@ "objectGroups": [] }, { - "description": "Check if a button is released on a gamepad.", + "description": "Check if a button is released on a multitouch controller.", "fullName": "Multitouch controller button released", "functionType": "Condition", "name": "IsButtonReleased", @@ -5874,7 +5863,7 @@ { "description": "Button state", "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "supplementaryInformation": "[\"Idle\",\"Pressed\",\"JustPressed\",\"Released\"]", "type": "stringWithSelector" } ], @@ -7247,41 +7236,23 @@ "conditions": [ { "type": { - "value": "HasGameJustResumed" + "inverted": true, + "value": "SpriteMultitouchJoystick::IsInGameEdition" }, "parameters": [ + "", "" ] } ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Manage touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "HasAnyTouchOrMouseStarted" + "value": "HasGameJustResumed" }, "parameters": [ "" @@ -7291,171 +7262,207 @@ "actions": [ { "type": { - "value": "SetNumberVariable" + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" }, "parameters": [ - "TouchIndex", - "=", - "0" + "Object", + "Behavior", + "" ] } - ], + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Manage touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "TouchId", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "TouchId", - "=", - "StartedTouchOrMouseId(TouchIndex)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "TouchIndex", - "+", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "+", + "1" + ] + } ] } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "HasTouchEnded" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "", - "TouchId" - ] - } - ], - "actions": [ + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" + }, { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" - }, - "parameters": [ - "Object", - "Behavior", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update joystick position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ], + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update joystick position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "TouchId", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "Object", + "Behavior", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", + "" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" - ] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", - "" - ] - } - ] + "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -8283,18 +8290,12 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "String", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": [], "name": "JoystickIdentifier" }, { @@ -8302,17 +8303,12 @@ "type": "Number", "label": "Dead zone radius (range: 0 to 1)", "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "group": "", - "extraInformation": [], "name": "DeadZoneRadius" }, { "value": "0", "type": "Number", "label": "Joystick angle (range: -180 to 180)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JoystickAngle" }, @@ -8320,9 +8316,6 @@ "value": "0", "type": "Number", "label": "Joystick force (range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JoystickForce" }, @@ -8330,9 +8323,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -8340,9 +8330,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" } @@ -8350,7 +8337,7 @@ "sharedPropertyDescriptors": [] }, { - "description": "Detect button presses made on a touchscreen.", + "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", "name": "MultitouchButton", "objectType": "", @@ -8366,11 +8353,11 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::IsReleased" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "IsReleased", + "True", "" ] } @@ -8399,6 +8386,44 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Pressed\"", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -8462,11 +8487,10 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyRadius" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Radius", ">", "DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer()), TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer()))" ] @@ -8492,7 +8516,17 @@ "parameters": [ "Object", "Behavior", - "\"Pressed\"", + "\"JustPressed\"", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", "" ] } @@ -8563,6 +8597,16 @@ "" ] }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" + ] + }, { "type": { "value": "SetNumberVariable" @@ -8592,11 +8636,11 @@ "objectGroups": [] }, { - "description": "Check if button is released.", - "fullName": "Button released", + "description": "Check if the button was just pressed.", + "fullName": "Button just pressed", "functionType": "Condition", - "name": "IsReleased", - "sentence": "Button _PARAM0_ is released", + "name": "IsJustPressed", + "sentence": "Button _PARAM0_ was just pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -8606,7 +8650,7 @@ "value": "BooleanVariable" }, "parameters": [ - "IsReleased", + "IsJustPressed", "True", "" ] @@ -8640,7 +8684,7 @@ "objectGroups": [] }, { - "description": "Check if button is pressed.", + "description": "Check if the button is pressed.", "fullName": "Button pressed", "functionType": "Condition", "name": "IsPressed", @@ -8687,6 +8731,54 @@ ], "objectGroups": [] }, + { + "description": "Check if the button is released.", + "fullName": "Button released", + "functionType": "Condition", + "name": "IsReleased", + "sentence": "Button _PARAM0_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "fullName": "Button state", "functionType": "Action", @@ -8728,7 +8820,7 @@ { "description": "Button state", "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "supplementaryInformation": "[\"Idle\",\"JustPressed\",\"Pressed\",\"Released\"]", "type": "stringWithSelector" } ], @@ -8740,27 +8832,18 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "A", "type": "String", "label": "Button identifier", - "description": "", - "group": "", - "extraInformation": [], "name": "ButtonIdentifier" }, { "value": "0", "type": "Number", "label": "TouchID", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -8768,9 +8851,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" }, @@ -8778,20 +8858,22 @@ "value": "", "type": "Boolean", "label": "Button released", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsReleased" }, + { + "value": "", + "type": "Boolean", + "label": "Button just pressed", + "hidden": true, + "name": "IsJustPressed" + }, { "value": "0", "type": "Number", "unit": "Pixel", "label": "Triggering circle radius", "description": "This circle adds up to the object collision mask.", - "group": "", - "extraInformation": [], "name": "Radius" } ], @@ -8802,6 +8884,7 @@ "fullName": "Platformer multitouch controller mapper", "name": "PlatformerMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -8979,184 +9062,40 @@ "value": "", "type": "Behavior", "label": "Platform character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], + "choices": [], "name": "Property" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" - ], - "name": "JoystickIdentifier" - }, - { - "value": "A", - "type": "String", - "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], - "name": "JumpButton" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D platformer multitouch controller mapper", - "name": "Platformer3DMultitouchMapper", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ + "choices": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" - }, - "parameters": [ - "", - ">", - "0", - "ControllerIdentifier", - "JoystickIdentifier", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "=", - "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" - ] - }, - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateStick" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "-90", - "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" - ] - } - ] + "label": "Primary", + "value": "Primary" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::IsButtonPressed" - }, - "parameters": [ - "", - "ControllerIdentifier", - "JumpButton", - "\"Down\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] + "label": "Secondary", + "value": "Secondary" } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D physics character", - "description": "", - "group": "", - "extraInformation": [ - "Physics3D::PhysicsCharacter3D" - ], - "name": "PhysicsCharacter3D" - }, - { - "value": "1", - "type": "Number", - "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "Choice", - "label": "Walk joystick", - "description": "", - "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" - ], "name": "JoystickIdentifier" }, { "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -9164,9 +9103,153 @@ }, { "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D shooter multitouch controller mapper", - "name": "Shooter3DMultitouchMapper", + "fullName": "3D platformer multitouch controller mapper", + "name": "Platformer3DMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "=", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "-90", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D shooter multitouch controller mapper", + "name": "Shooter3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -9254,31 +9337,32 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Walk joystick", - "description": "", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -9286,9 +9370,7 @@ "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -9299,6 +9381,7 @@ "fullName": "First person camera multitouch controller mapper", "name": "FirstPersonMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -10219,31 +10302,32 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Secondary", "type": "Choice", "label": "Camera joystick", - "description": "", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "CameraStick" }, @@ -10252,27 +10336,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationSpeedMax" }, { "value": "360", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationAcceleration" }, { "value": "720", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationDeceleration" }, { @@ -10280,27 +10358,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationSpeedMax" }, { "value": "240", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationAcceleration" }, { "value": "480", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationDeceleration" }, { @@ -10308,9 +10380,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Minimum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMin" }, { @@ -10318,9 +10388,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Maximum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMax" }, { @@ -10328,9 +10396,7 @@ "type": "Number", "unit": "Pixel", "label": "Z position offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -10338,9 +10404,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Z", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedZ" }, @@ -10349,20 +10412,196 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Y", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedY" } ], "sharedPropertyDescriptors": [] }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "SteerJoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateSteeringStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, \"Primary\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "SpeedJoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateAcceleratorStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "-SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, \"Secondary\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "HandBrakeButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateHandBrakeKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::PhysicsCar3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics car", + "extraInformation": [ + "Physics3D::PhysicsCar3D" + ], + "choices": [], + "name": "PhysicsCar3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Steer joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SteerJoystickIdentifier" + }, + { + "value": "Secondary", + "type": "Choice", + "label": "Speed joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SpeedJoystickIdentifier" + }, + { + "value": "B", + "type": "String", + "label": "Hand brake button name", + "group": "Controls", + "name": "HandBrakeButton" + } + ], + "sharedPropertyDescriptors": [] + }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", "name": "TopDownMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -10873,31 +11112,31 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], + "choices": [], "name": "TopDownMovement" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -10905,12 +11144,20 @@ "value": "Analog", "type": "Choice", "label": "Stick mode", - "description": "", "group": "Controls", - "extraInformation": [ - "Analog", - "360°", - "8 Directions" + "choices": [ + { + "label": "Analog", + "value": "Analog" + }, + { + "label": "360°", + "value": "360°" + }, + { + "label": "8 Directions", + "value": "8 Directions" + } ], "name": "StickMode" } @@ -10931,6 +11178,112 @@ "fullName": "Multitouch Joystick", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Thumb", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Border", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "MultitouchJoystick", + "type": "SpriteMultitouchJoystick::MultitouchJoystick", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Primary", + "FloatingEnabled": false, + "DeadZoneRadius": 0.4, + "JoystickAngle": 0, + "JoystickForce": 0, + "TouchId": 0, + "TouchIndex": 0 + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Thumb" + }, + { + "objectName": "Border" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -11047,64 +11400,92 @@ "name": "doStepPostEvents", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreAutour" - }, - "parameters": [ - "Thumb", - "Border", - "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", - "Border.MultitouchJoystick::JoystickAngle()" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "ShouldBeHiddenWhenReleased", - "True", - "" - ] - }, { "type": { "inverted": true, - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" + "value": "SpriteMultitouchJoystick::IsInGameEdition" }, "parameters": [ - "Object", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Cache" - }, - "parameters": [ - "Object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "Thumb", + "Border", + "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", + "Border.MultitouchJoystick::JoystickAngle()" + ] + } ] }, { - "type": { - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" - }, - "parameters": [ - "Object", - "no", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "True", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" + }, + "parameters": [ + "Object", + "no", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "False", + "" + ] + } ] } ] @@ -11270,7 +11651,7 @@ }, "parameters": [ "ShouldBeHiddenWhenReleased", - "False", + "True", "" ] }, @@ -12039,20 +12420,21 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -12061,8 +12443,6 @@ "type": "Number", "label": "Dead zone radius (range: 0 to 1)", "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "group": "", - "extraInformation": [], "name": "DeadZoneRadius" }, { @@ -12070,10 +12450,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -12082,8 +12462,6 @@ "type": "Number", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -12092,10 +12470,10 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbIsScaledProportionally" }, @@ -12104,8 +12482,6 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ParentOrigin" }, @@ -12113,117 +12489,11 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldBeHiddenWhenReleased" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "Thumb", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] - }, - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "Border", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "MultitouchJoystick", - "type": "SpriteMultitouchJoystick::MultitouchJoystick", - "ControllerIdentifier": 1, - "JoystickIdentifier": "Primary", - "FloatingEnabled": false, - "DeadZoneRadius": 0.4, - "JoystickAngle": 0, - "JoystickForce": 0, - "TouchId": 0, - "TouchIndex": 0 - } - ], - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Thumb" - }, - { - "objectName": "Border" - } - ] - }, - "objectsGroups": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ - { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 - } - ], - "effects": [] - } - ], - "instances": [] + "variants": [] } ] }, @@ -12238,17 +12508,17 @@ "name": "Gamepads", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg", "shortDescription": "Add support for gamepads (or other controllers) to your game, giving access to information such as button presses, axis positions, trigger pressure, etc...", - "version": "0.7.0", + "version": "0.9.0", "description": [ - "Add support for gamepads (or other controllers).", + "Add support for gamepads (or other physical controllers).", "", "It gives access to:", - "- button presses", - "- axis positions and force", - "- trigger pressure", - "- configurable deadzone", - "- vibration", - "- automatic mappers for platformer characters and top-down movement", + "- button presses,", + "- axis positions and force,", + "- trigger pressure,", + "- configurable deadzone,", + "- vibration,", + "- automatic \"gamepad mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the gamepad (it works by reading the gamepad state and simulating controls). No need for additional events to make it work once the behaviors are set up.", "", "The Bomberman-like example handles 4 players with gamepads ([open the project online](https://editor.gdevelop.io/?project=example://goose-bomberman))." ], @@ -12270,11 +12540,59 @@ "authorIds": [ "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", "taRwmWxwAFYFL9yyBwB3cwBw0BO2", - "mnImQKdn8nQxwzkS5D6a1JB27V23" + "mnImQKdn8nQxwzkS5D6a1JB27V23", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], "globalVariables": [], - "sceneVariables": [], + "sceneVariables": [ + { + "name": "Buttons", + "type": "structure", + "children": [ + { + "name": "A or Cross", + "type": "string", + "value": "A" + }, + { + "name": "B or Circle", + "type": "string", + "value": "B" + }, + { + "name": "LB or L1", + "type": "string", + "value": "LB" + }, + { + "name": "LT or L2", + "type": "string", + "value": "LT" + }, + { + "name": "RB or R1", + "type": "string", + "value": "RB" + }, + { + "name": "RT or R2", + "type": "string", + "value": "RT" + }, + { + "name": "X or Square", + "type": "string", + "value": "X" + }, + { + "name": "Y or Triangle", + "type": "string", + "value": "Y" + } + ] + } + ], "eventsFunctions": [ { "fullName": "", @@ -12282,83 +12600,323 @@ "name": "onFirstSceneLoaded", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Define an new private object javascript for the gamepad extension\r", - "gdjs._extensionController = {\r", - " players: {\r", - " 0: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 1: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 2: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", - " 3: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + "if (gdjs._extensionController) {\r", + " return;\r", + "}\r", + "\r", + "/**\r", + " * Associate controller button ids to button names\r", + " */\r", + "const controllerButtonNames = {\r", + " \"XBOX\": {\r", + " 0: \"A\",\r", + " 1: \"B\",\r", + " 2: \"X\",\r", + " 3: \"Y\",\r", + " 4: \"LB\",\r", + " 5: \"RB\",\r", + " 6: \"LT\",\r", + " 7: \"RT\",\r", + " 8: \"BACK\",\r", + " 9: \"START\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"NONE\",\r", + " 17: \"NONE\"\r", " },\r", - " lastActiveController: -1, // Last active controller\r", - " controllerButtonNames: { //Map associating controller button ids to button names\r", - " \"XBOX\": {\r", - " 0: \"A\",\r", - " 1: \"B\",\r", - " 2: \"X\",\r", - " 3: \"Y\",\r", - " 4: \"LB\",\r", - " 5: \"RB\",\r", - " 6: \"LT\",\r", - " 7: \"RT\",\r", - " 8: \"BACK\",\r", - " 9: \"START\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"NONE\",\r", - " 17: \"NONE\"\r", - " },\r", - " \"PS4\": {\r", - " 0: \"CROSS\",\r", - " 1: \"CIRCLE\",\r", - " 2: \"SQUARE\",\r", - " 3: \"TRIANGLE\",\r", - " 4: \"L1\",\r", - " 5: \"R1\",\r", - " 6: \"L2\",\r", - " 7: \"R2\",\r", - " 8: \"SHARE\",\r", - " 9: \"OPTIONS\",\r", - " 10: \"CLICK_STICK_LEFT\",\r", - " 11: \"CLICK_STICK_RIGHT\",\r", - " 12: \"UP\",\r", - " 13: \"DOWN\",\r", - " 14: \"LEFT\",\r", - " 15: \"RIGHT\",\r", - " 16: \"PS_BUTTON\",\r", - " 17: \"CLICK_TOUCHPAD\"\r", - " }\r", + " \"PS4\": {\r", + " 0: \"CROSS\",\r", + " 1: \"CIRCLE\",\r", + " 2: \"SQUARE\",\r", + " 3: \"TRIANGLE\",\r", + " 4: \"L1\",\r", + " 5: \"R1\",\r", + " 6: \"L2\",\r", + " 7: \"R2\",\r", + " 8: \"SHARE\",\r", + " 9: \"OPTIONS\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"PS_BUTTON\",\r", + " 17: \"CLICK_TOUCHPAD\"\r", " }\r", "};\r", "\r", - "gdjs._extensionController.getInputString = function (type, buttonId) {\r", - " const controllerButtonNames = gdjs._extensionController.controllerButtonNames;\r", - " if (controllerButtonNames[type] !== undefined) {\r", - " return controllerButtonNames[type][buttonId];\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getGamepad(playerId) {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " return gamepads[playerId];\r", + "}\r", + "\r", + "/** @type {{[playerId: number]: Player}} */\r", + "const players = {};\r", + "\r", + "/**\r", + " * @param {number} playerId\r", + " */\r", + "function getPlayer(playerId) {\r", + " let player = players[playerId];\r", + " if (!player) {\r", + " player = new Player(playerId);\r", + " players[playerId] = player;\r", + " }\r", + " return player;\r", + "}\r", + "\r", + "class Player {\r", + " /** @type {number} */\r", + " playerId;\r", + " mapping = 'DEFAULT';\r", + " lastButtonUsed = -1;\r", + " deadzone = 0.2;\r", + " /** @type {{[buttonId: number]: ButtonState}} */\r", + " buttonStates = {};\r", + " rumble = { elapsedTime: 0, duration: 0, weakMagnitude: 0, strongMagnitude: 0 };\r", + "\r", + " /**\r", + " * @param {number} playerId\r", + " */\r", + " constructor(playerId) {\r", + " this.playerId = playerId;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " getButtonState(buttonId) {\r", + " let buttonState = this.buttonStates[buttonId];\r", + " if (!buttonState) {\r", + " buttonState = new ButtonState();\r", + " this.buttonStates[buttonId] = buttonState;\r", + " }\r", + " return buttonState;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isPressed;\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonJustPressed(buttonId) {\r", + " return this.getButtonState(buttonId).isJustPressed();\r", + " }\r", + "\r", + " /**\r", + " * @param {number} buttonId\r", + " */\r", + " isButtonReleased(buttonId) {\r", + " return this.getButtonState(buttonId).isReleased();\r", " }\r", "\r", - " return \"UNKNOWN_BUTTON\";\r", + " isAnyButtonReleased() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isReleased()) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "\r", + " isAnyButtonPressed() {\r", + " for (const buttonId in this.buttonStates) {\r", + " const buttonState = this.buttonStates[buttonId];\r", + " if (buttonState.isPressed) {\r", + " return true;\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}\r", + "\r", + "class ButtonState {\r", + " wasPressed = false;\r", + " isPressed = false;\r", + "\r", + " isReleased() {\r", + " return this.wasPressed && !this.isPressed;\r", + " }\r", + "\r", + " isJustPressed() {\r", + " return !this.wasPressed && this.isPressed;\r", + " }\r", + "}\r", + "\r", + "// Async tasks are run before everything.\r", + "// This is a hack to make sure that button states are updated\r", + "// before mapping behavior events.\r", + "const frameBeginningTask = new class extends gdjs.AsyncTask {\r", + " update() {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " const gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + "\r", + " for (let buttonId = 0; buttonId < Object.keys(gamepad.buttons).length; buttonId++) {\r", + " const buttonState = player.getButtonState(buttonId);\r", + " buttonState.wasPressed = buttonState.isPressed;\r", + " buttonState.isPressed = gamepad.buttons[buttonId].pressed;\r", + " if (buttonState.isJustPressed()) {\r", + " player.lastButtonUsed = buttonId;\r", + " }\r", + " }\r", + " }\r", + " return false;\r", + " }\r", + "}();\r", + "\r", + "function onScenePostEvents() {\r", + " /** @type {Gamepad[]} */\r", + " const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + " for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " let gamepad = gamepads[playerId];\r", + " if (gamepad == null) {\r", + " // The gamepad is not connected.\r", + " continue;\r", + " }\r", + " const player = getPlayer(playerId);\r", + " const rumble = player.rumble;\r", + " rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;\r", + " if (rumble.duration - rumble.elapsedTime <= 0 &&\r", + " (rumble.weakMagnitude || rumble.strongMagnitude)\r", + " ) {\r", + " rumble.weakMagnitude = 0;\r", + " rumble.strongMagnitude = 0;\r", + " }\r", + " }\r", "}\r", "\r", - "gdjs._extensionController.axisToAngle = function (deltaX, deltaY) {\r", + "/**\r", + " * @param {string} type\r", + " * @param {number} buttonId\r", + " */\r", + "function getInputString(type, buttonId) {\r", + " if (!controllerButtonNames[type]) {\r", + " return \"UNKNOWN_BUTTON\";\r", + " }\r", + " return controllerButtonNames[type][buttonId];\r", + "}\r", + "\r", + "function getButtonId(buttonName) {\r", + " switch (buttonName) {\r", + " case 'A':\r", + " case 'CROSS':\r", + " return 0;\r", + " case 'B':\r", + " case 'CIRCLE':\r", + " return 1;\r", + " case 'X':\r", + " case 'SQUARE':\r", + " return 2;\r", + " case 'Y':\r", + " case 'TRIANGLE':\r", + " return 3;\r", + " case 'LB':\r", + " case 'L1':\r", + " return 4;\r", + " case 'RB':\r", + " case 'R1':\r", + " return 5;\r", + " case 'LT':\r", + " case 'L2':\r", + " return 6;\r", + " case 'RT':\r", + " case 'R2':\r", + " return 7;\r", + " case 'UP':\r", + " return 12;\r", + " case 'DOWN':\r", + " return 13;\r", + " case 'LEFT':\r", + " return 14;\r", + " case 'RIGHT':\r", + " return 15;\r", + " case 'BACK':\r", + " case 'SHARE':\r", + " return 8;\r", + " case 'START':\r", + " case 'OPTIONS':\r", + " return 9;\r", + " case 'CLICK_STICK_LEFT':\r", + " return 10;\r", + " case 'CLICK_STICK_RIGHT':\r", + " return 11;\r", + " //PS4\r", + " case 'PS_BUTTON':\r", + " return 16;\r", + " case 'CLICK_TOUCHPAD':\r", + " return 17;\r", + " default:\r", + " console.error('The gamepad button: ' + buttonName + ' is not valid.');\r", + " return null;\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {number} playerId\r", + " * @param {string} directionName\r", + " * @param {number} axisValueX\r", + " * @param {number} axisValueY\r", + " */\r", + "function isAxisPushed(playerId, directionName, axisValueX, axisValueY) {\r", + " switch (directionName) {\r", + " case 'LEFT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0;\r", + " case 'RIGHT':\r", + " return getNormalizedAxisValue(axisValueX, playerId) > 0;\r", + " case 'UP':\r", + " return getNormalizedAxisValue(axisValueY, playerId) < 0;\r", + " case 'DOWN':\r", + " return getNormalizedAxisValue(axisValueY, playerId) > 0;\r", + " case 'ANY':\r", + " return getNormalizedAxisValue(axisValueX, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueX, playerId) > 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) < 0\r", + " || getNormalizedAxisValue(axisValueY, playerId) > 0\r", + " default:\r", + " console.error('The value stick direction is not valid.');\r", + " return false;\r", + " }\r", + "}\r", + "\r", + "/**\r", + " * @param {number} deltaX\r", + " * @param {number} deltaY\r", + " */\r", + "function axisToAngle(deltaX, deltaY) {\r", " const rad = Math.atan2(deltaY, deltaX);\r", " const deg = rad * (180 / Math.PI);\r", " return deg;\r", "}\r", "\r", - "gdjs._extensionController.isXbox = function (gamepad) {\r", + "/**\r", + " * @param {{id: string}} gamepad\r", + " */\r", + "function isXbox(gamepad) {\r", " return (gamepad ? (\r", " gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r", " // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r", @@ -12367,44 +12925,52 @@ " ) : false);\r", "}\r", "\r", - "//Returns the new value taking into account the dead zone for the player_ID given\r", - "gdjs._extensionController.getNormalizedAxisValue = function (v, player_ID) {\r", + "/**\r", + " * Returns the new value taking into account the dead zone for the player_ID given\r", + " * @param {number} value\r", + " * @param {number} playerID\r", + " */\r", + "function getNormalizedAxisValue(value, playerID) {\r", " // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r", "\r", " // Anything smaller than this is assumed to be 0,0\r", - " const DEADZONE = gdjs._extensionController.players[player_ID].deadzone;\r", - "\r", - " if (Math.abs(v) < DEADZONE) {\r", - " // In the dead zone, set to 0\r", - " v = 0;\r", - "\r", - " if (v == null) {\r", - " return 0;\r", - " } else {\r", - " return v;\r", - " }\r", + " const deadzone = getPlayer(playerID).deadzone;\r", "\r", + " if (Math.abs(value) < deadzone) {\r", + " return 0;\r", " } else {\r", " // We're outside the dead zone, but we'd like to smooth\r", " // this value out so it still runs nicely between 0..1.\r", " // That is, we don't want it to jump suddenly from 0 to\r", - " // DEADZONE.\r", + " // deadzone.\r", "\r", - " // Remap v from\r", - " // DEADZONE..1 to 0..(1-DEADZONE)\r", + " // Remap value from\r", + " // deadzone..1 to 0..(1-deadzone)\r", " // or from\r", - " // -1..-DEADZONE to -(1-DEADZONE)..0\r", + " // -1..-deadzone to -(1-deadzone)..0\r", + " value = value - Math.sign(value) * deadzone;\r", "\r", - " v = v - Math.sign(v) * DEADZONE;\r", - "\r", - " // Remap v from\r", - " // 0..(1-DEADZONE) to 0..1\r", + " // Remap value from\r", + " // 0..(1-deadzone) to 0..1\r", " // or from\r", - " // -(1-DEADZONE)..0 to -1..0\r", - "\r", - " return v / (1 - DEADZONE);\r", + " // -(1-deadzone)..0 to -1..0\r", + " return value / (1 - deadzone);\r", " }\r", - "};" + "}\r", + "\r", + "gdjs._extensionController = {\r", + " getPlayer,\r", + " controllerButtonNames,\r", + " getInputString,\r", + " getButtonId,\r", + " axisToAngle,\r", + " isXbox,\r", + " getNormalizedAxisValue,\r", + " isAxisPushed,\r", + " getGamepad,\r", + " onScenePostEvents,\r", + " frameBeginningTask,\r", + "}" ], "parameterObjects": "", "useStrict": true, @@ -12417,59 +12983,35 @@ { "fullName": "", "functionType": "Action", - "name": "onScenePostEvents", + "name": "onSceneLoaded", "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// Async tasks are run before everything.\r", + "// This is a hack to make sure that button states are updated\r", + "// before mapping behavior events.\r", + "runtimeScene.getAsyncTasksManager().addTask(gdjs._extensionController.frameBeginningTask);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Each time a player press a button i save the last button pressed for the next frame", - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "let countPlayers = Object.keys(gdjs._extensionController.players).length;", - "", - "//Repeat for each players", - "for (let i = 0; i < countPlayers; i++) {", - " let gamepad = gamepads[i]; // Get the gamepad of the player", - "", - " //We have to keep this condition because if the user hasn't plugged in his controller yet, we can't get the controller in the gamepad variable.", - " if (gamepad == null) {", - " continue;", - " }", - "", - " for (let b = 0; b < Object.keys(gamepad.buttons).length; b++) { //For each buttons", - " if (gamepad.buttons[b].pressed) { //One of them is pressed", - " gdjs._extensionController.players[i].lastButtonUsed = b; //Save the button pressed", - "", - " //Save the state of the button for the next frame.", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: true };", - "", - " // Update Last Active Controller", - " gdjs._extensionController.lastActiveController = i;", - " } else {", - " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: false };", - " }", - " }", - "", - "", - " gdjs._extensionController.players[i].rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;", - " if (", - " gdjs._extensionController.players[i].rumble.duration - gdjs._extensionController.players[i].rumble.elapsedTime <= 0 &&", - " (gdjs._extensionController.players[i].rumble.weakMagnitude || gdjs._extensionController.players[i].rumble.strongMagnitude)", - " ) {", - " gdjs._extensionController.players[i].rumble.weakMagnitude = 0;", - " gdjs._extensionController.players[i].rumble.strongMagnitude = 0;", - " }", - "", - "", - "}", + "gdjs._extensionController.onScenePostEvents();", "" ], "parameterObjects": "", @@ -12907,27 +13449,20 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const trigger = eventsFunctionContext.getArgument(\"trigger\").toUpperCase();\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const trigger = eventsFunctionContext.getArgument(\"Trigger\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Pressure on a gamepad trigger\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r", " console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "switch (trigger) {\r", " case 'LT':\r", " case 'L2':\r", @@ -12955,12 +13490,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Trigger button", - "name": "trigger", + "name": "Trigger", "supplementaryInformation": "[\"LT\",\"RT\",\"L2\",\"R2\"]", "type": "stringWithSelector" } @@ -12977,43 +13512,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick force\"');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r", " return;\r", "}\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId)), 0, 1);\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId)), 0, 1);\r", - " break;\r", - "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(\r", + " Math.abs(getNormalizedAxisValue(axisValueX, playerId)) +\r", + " Math.abs(getNormalizedAxisValue(axisValueY, playerId)), 0, 1);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -13026,12 +13546,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -13055,7 +13575,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Gamepads::StickAngle(player_ID, stick)" + "Gamepads::StickAngle(PlayerId, Stick)" ] } ] @@ -13067,12 +13587,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -13089,40 +13609,27 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const { getNormalizedAxisValue } = gdjs._extensionController;\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick rotation\"');\r", - " return;\r", - "}\r", "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId));\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId));\r", - " break;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", "\r", - " default:\r", - " eventsFunctionContext.returnValue = -1;\r", - " break;\r", - "}" + "eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(\r", + " getNormalizedAxisValue(axisValueX, playerId),\r", + " getNormalizedAxisValue(axisValueY, playerId));" ], "parameterObjects": "", "useStrict": true, @@ -13135,12 +13642,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Stick: \"Left\" or \"Right\"", - "name": "stick", + "name": "Stick", "supplementaryInformation": "[\"Left\",\"Right\"]", "type": "stringWithSelector" } @@ -13158,18 +13665,11 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", @@ -13178,11 +13678,12 @@ " console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "let parameterError = false;\r", "switch (stick) {\r", " case 'LEFT':\r", @@ -13279,7 +13780,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -13307,26 +13808,20 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", "const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", - " return;\r", - "}\r", "if (stick != \"left\" && stick != \"right\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "const axisIndex = stick === 'right' ? 2 : 0;\r", "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", "" @@ -13364,26 +13859,20 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", "const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", - " return;\r", - "}\r", "if (stick != \"left\" && stick != \"right\") {\r", " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", " return;\r", "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", + " return;\r", + "}\r", "const axisIndex = stick === 'right' ? 3 : 1;\r", "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", "" @@ -13421,136 +13910,57 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button released\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button released\"');\r", + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonReleased(buttonId);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "PlayerId", + "type": "expression" + }, + { + "description": "Name of the button", + "name": "Button", + "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button was just pressed on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".", + "fullName": "Gamepad button just pressed", + "functionType": "Condition", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ was just pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", - "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", - "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button released\" is not valid.');\r", - " break;\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r", "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button released\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "let buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "//Define default value on pressed button or use previous value\r", - "gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "//Get state of button at previous frame\r", - "const previousStateButton = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "//When previousStateButton is true and actual button state is not pressed\r", - "//Player have release the button\r", - "if (previousStateButton === true && gamepad.buttons[buttonId].pressed === false) {\r", - " // Save the last button used for the player \r", - " gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - " eventsFunctionContext.returnValue = true;\r", - "\r", - "} else {\r", - " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - " eventsFunctionContext.returnValue = false;\r", - "}\r", - "" + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonJustPressed(buttonId);" ], "parameterObjects": "", "useStrict": true, @@ -13560,12 +13970,12 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { "description": "Name of the button", - "name": "button", + "name": "Button", "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", "type": "stringWithSelector" } @@ -13582,17 +13992,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "//Player id is not valid\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Last pressed button (id)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "\r", - "//Return the last button used by the player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].lastButtonUsed;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;" ], "parameterObjects": "", "useStrict": true, @@ -13605,7 +14007,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -13621,46 +14023,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Any gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "for (let i = 0; i < gamepad.buttons.length; i++) { //For each buttons\r", - " if (gamepad.buttons[i].pressed) { //One of them is pressed\r", - " buttonId = i; //Save the button pressed\r", - " break;\r", - " }\r", - "}\r", - "\r", - "if (buttonId === undefined) {\r", - " // No buttons are pressed.\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Any gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", "\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonPressed();\r", "" ], "parameterObjects": "", @@ -13671,7 +14037,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -13687,35 +14053,18 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in string expression: \"Last pressed button (LastButtonString)\", is not valid number, must be between 0 and 4.');\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "if (controllerType === \"\") {\r", - " console.error('Parameter controller type is not valid in string expression: \"Last pressed button (LastButtonString)\"');\r", - " return;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "if (gamepad !== null) { //Gamepad exist\r", - " //Get last btn id\r", - " const lastButtonUsedID = gdjs._extensionController.players[playerId].lastButtonUsed;\r", - "\r", - " //Return last button as string \r", - " eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", - "\r", - "} else { //Gamepad dosen't exist\r", - " console.error('Your controller is not supported or the gamepad wasn\\'t detected in string expression: \"Last pressed button (LastButtonString)\"');\r", - " eventsFunctionContext.returnValue = \"Gamepad not connected\";\r", - "}" + "const lastButtonUsedID = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", + "" ], "parameterObjects": "", "useStrict": true, @@ -13728,7 +14077,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -13750,20 +14099,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get the last activated controller\r", - "const controllerId = gdjs._extensionController.lastActiveController;\r", - "\r", - "// Check if controller is active\r", - "const gamepad = gamepads[controllerId];\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = 0;\r", - "} else {\r", - " // Return active controller id\r", - " eventsFunctionContext.returnValue = controllerId + 1;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let lastGamepadIndex = -1;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " lastGamepadIndex = playerId\r", + " }\r", "}\r", - "" + "eventsFunctionContext.returnValue = lastGamepadIndex + 1;" ], "parameterObjects": "", "useStrict": true, @@ -13786,127 +14131,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "if (button === \"\") {\r", - " console.error('Parameter button is not valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "let buttonId;\r", - "\r", - "switch (button) {\r", - " case 'A':\r", - " case 'CROSS':\r", - " buttonId = 0;\r", - " break;\r", - " case 'B':\r", - " case 'CIRCLE':\r", - " buttonId = 1;\r", - " break;\r", - " case 'X':\r", - " case 'SQUARE':\r", - " buttonId = 2;\r", - " break;\r", - " case 'Y':\r", - " case 'TRIANGLE':\r", - " buttonId = 3;\r", - " break;\r", - " case 'LB':\r", - " case 'L1':\r", - " buttonId = 4;\r", - " break;\r", - " case 'RB':\r", - " case 'R1':\r", - " buttonId = 5;\r", - " break;\r", - " case 'LT':\r", - " case 'L2':\r", - " buttonId = 6;\r", - " break;\r", - " case 'RT':\r", - " case 'R2':\r", - " buttonId = 7;\r", - " break;\r", - "\r", - " case 'UP':\r", - " buttonId = 12;\r", - " break;\r", - " case 'DOWN':\r", - " buttonId = 13;\r", - " break;\r", - " case 'LEFT':\r", - " buttonId = 14;\r", - " break;\r", - " case 'RIGHT':\r", - " buttonId = 15;\r", - " break;\r", - "\r", - " case 'BACK':\r", - " case 'SHARE':\r", - " buttonId = 8;\r", - " break;\r", - " case 'START':\r", - " case 'OPTIONS':\r", - " buttonId = 9;\r", - " break;\r", - "\r", - " case 'CLICK_STICK_LEFT':\r", - " buttonId = 10;\r", - " break;\r", - " case 'CLICK_STICK_RIGHT':\r", - " buttonId = 11;\r", - " break;\r", - "\r", - " //PS4\r", - " case 'PS_BUTTON':\r", - " buttonId = 16;\r", - " break;\r", - " case 'CLICK_TOUCHPAD':\r", - " buttonId = 17;\r", - " break;\r", - "\r", - " default:\r", - " console.error('The button: ' + button + ' in condition: \"Gamepad button pressed\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - "}\r", - "\r", - "\r", - "\r", - "if (buttonId === undefined) {\r", - " console.error('There is no buttons valid in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", + "const buttonId = gdjs._extensionController.getButtonId(button);\r", + "if (buttonId === null) {\r", " return;\r", "}\r", - "\r", - "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", - " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button pressed\"');\r", - " eventsFunctionContext.returnValue = false;\r", - " return;\r", - "}\r", - "\r", - "//When a button is pressed, save the button in lastButtonUsed for each players\r", - "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", - "\r", - "\r", - "\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isButtonPressed(buttonId);\r", "" ], "parameterObjects": "", @@ -13917,7 +14151,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -13944,15 +14178,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in expression: \"Gamepad deadzone for sticks\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", - "///Return the deadzone value for a given player\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].deadzone;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).deadzone;" ], "parameterObjects": "", "useStrict": true, @@ -13965,7 +14193,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -13981,18 +14209,12 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "//Get function parameter\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in action: \"Set gamepad deadzone for sticks\", is not valid, must be between 0 and 4.');\r", - " return;\r", - "}\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", "\r", - "// clamp the newDeadzone in range [0, 1].\r", "// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r", - "gdjs._extensionController.players[playerId].deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", + "gdjs._extensionController.getPlayer(playerId).deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", "" ], "parameterObjects": "", @@ -14003,7 +14225,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14024,141 +14246,28 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", "\r", - "if (playerId < 0 || playerId > 4) {\r", - " console.error('Parameter gamepad identifier in condition: \"Gamepad stick pushed (axis)\", is not valid number, must be between 0 and 4.');\r", - " return;\r", - "}\r", "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", " console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r", " return;\r", "}\r", "if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r", - " console.error('Parameter deadzone in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", + " console.error('Parameter direction in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", " return;\r", "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) {\r", - " eventsFunctionContext.returnValue = false;\r", + "/** @type {Gamepad} */\r", + "const gamepad = gdjs._extensionController.getGamepad(playerId);\r", + "if (!gamepad) {\r", + " // The gamepad is not connected.\r", " return;\r", "}\r", - "\r", - "\r", - "//Define in onFirstSceneLoaded function\r", - "const getNormalizedAxisValue = gdjs._extensionController.getNormalizedAxisValue;\r", - "\r", - "switch (stick) {\r", - " case 'LEFT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[0], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[0], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Left on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " switch (direction) {\r", - " case 'LEFT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'RIGHT':\r", - " if (getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'UP':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'DOWN':\r", - " if (getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " case 'ANY':\r", - " if ( getNormalizedAxisValue(gamepad.axes[2], playerId) < 0\r", - " || getNormalizedAxisValue(gamepad.axes[2], playerId) > 0\r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) < 0 \r", - " || getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", - " eventsFunctionContext.returnValue = true;\r", - " return;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Direction on stick Right on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - " }\r", - " break;\r", - "\r", - " default:\r", - " console.error('The value Stick on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", - " eventsFunctionContext.returnValue = false;\r", - " break;\r", - "}\r", - "\r", - "eventsFunctionContext.returnValue = false;\r", + "const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r", + "const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.isAxisPushed(playerId, direction, axisValueX, axisValueY);\r", "" ], "parameterObjects": "", @@ -14169,7 +14278,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14189,24 +14298,24 @@ }, { "description": "Return the number of connected gamepads.", - "fullName": "Connected gamepads number", + "fullName": "Connected gamepads count", "functionType": "Expression", "name": "ConnectedGamepadsCount", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", "\r", - "// Gamepads can be disconnected and become null, so we have to filter them.\r", - "eventsFunctionContext.returnValue = Object.keys(gamepads).filter(key => !!gamepads[key]).length;\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r", + "let connectedGamepadCount = 0;\r", + "for (let playerId = 0; playerId < gamepads.length; playerId++) {\r", + " // Gamepads can be disconnected and become null\r", + " if (gamepads[playerId]) {\r", + " connectedGamepadCount++;\r", + " }\r", + "}\r", + "eventsFunctionContext.returnValue = connectedGamepadCount;\r", "" ], "parameterObjects": "", @@ -14230,22 +14339,13 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in string expression: \"Gamepad type\", is not valid number, must be between 0 and 4');", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)", "" ], @@ -14260,7 +14360,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -14276,28 +14376,14 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad type\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (controllerType === \"\") {", - " console.error('Parameter type in condition: \"Gamepad type\", is not a string.');", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "", "if (controllerType == \"XBOX\") {", " eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);", "} else {", @@ -14312,7 +14398,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14333,17 +14419,9 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "/** @type {Gamepad[]} */", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameter", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in condition: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];", "// If gamepad was disconnected it will be null (so this will return false)", "// If gamepad was never connected it will be undefined (so this will return false)", "eventsFunctionContext.returnValue = !!gamepads[playerId];" @@ -14356,7 +14434,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -14372,25 +14450,16 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", - " return;", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -14407,7 +14476,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14428,35 +14497,19 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: duration * 1000,", @@ -14464,11 +14517,11 @@ " strongMagnitude: strongRumbleMagnitude", " });", "}", - "", - "gdjs._extensionController.players[playerId].rumble.duration = duration;", - "gdjs._extensionController.players[playerId].rumble.elapsedTime = 0;", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "const player = gdjs._extensionController.getPlayer(playerId)", + "player.rumble.duration = duration;", + "player.rumble.elapsedTime = 0;", + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -14478,7 +14531,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14509,39 +14562,22 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */", - "//Vibration work only on game in browser.", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", - "", - "//Get function parameters", - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", - "const elapsedTime = gdjs._extensionController.players[playerId].rumble.elapsedTime || 0;", - "const originalDuration = gdjs._extensionController.players[playerId].rumble.duration || 1;", - "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", - "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", - "", - "", - "if (playerId < 0 || playerId > 4) {", - " console.error('Parameter gamepad identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 4.');", - " return;", - "}", - "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", - " console.error('Parameter weakRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", - "}", - "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", - " console.error('Parameter strongRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", - " return;", + "const { clamp } = gdjs.evtTools.common;", + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;", + "const player = gdjs._extensionController.getPlayer(playerId);", + "const elapsedTime = player.rumble.elapsedTime || 0;", + "const originalDuration = player.rumble.duration || 1;", + "const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);", + "const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);", + "/** @type {Gamepad} */", + "const gamepad = gdjs._extensionController.getGamepad(playerId);", + "if (!gamepad) {", + " // The gamepad is not connected.", + " return;", "}", - "", - "const gamepad = gamepads[playerId];", - "", - "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", - "if (gamepad == null) return;", - "", "if (originalDuration - elapsedTime <= 0) return;", - "", - "if (gamepad && gamepad.vibrationActuator) {", + "//Vibration work only on game in browser.", + "if (gamepad.vibrationActuator) {", " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", " startDelay: 0,", " duration: 1000 * (originalDuration - elapsedTime),", @@ -14550,8 +14586,8 @@ " });", "}", "", - "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", - "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + "player.rumble.weakMagnitude = weakRumbleMagnitude;", + "player.rumble.strongMagnitude = strongRumbleMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -14561,7 +14597,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" }, { @@ -14592,54 +14628,10 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "/** @type {Gamepad[]} */\r", - "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", - "\r", - "//Get function parameters\r", - "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", - "\r", - "if (playerId < 0 || playerId > 4) {\r", - "\tconsole.error('Parameter gamepad identifier in condition: \"Any gamepad button released\", is not valid number, must be between 0 and 4.');\r", - "\treturn;\r", - "}\r", - "\r", - "const gamepad = gamepads[playerId];\r", - "\r", - "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", - "if (gamepad == null) return;\r", - "\r", - "for (let buttonId = 0; buttonId < gamepad.buttons.length; buttonId++) { //For each buttons on current frame.\r", - "\r", - "\tif (buttonId === undefined) {\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t\treturn;\r", - "\t}\r", "\r", - "\t//Get previous value or define value by default for the current button\r", - "\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", - "\r", - "\t//Get state of the button at previous frame\r", - "\tconst previousStateButtonIsPressed = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", - "\r", - "\t//Get the state of the button on the current frame.\r", - "\tconst currentFrameStateButtonIsPressed = gamepad.buttons[buttonId].pressed;\r", - "\r", - "\t//When previousStateButtonIsPressed is true and actual button state is not pressed\r", - "\t//Player have release the button\r", - "\tif (previousStateButtonIsPressed === true && currentFrameStateButtonIsPressed === false) {\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", - "\t\teventsFunctionContext.returnValue = true;\r", - "\t\t//break;\r", - "\t\treturn;\r", - "\t} else {\r", - "\t\t//The player didn't released the button yet, the previous frame state is still true\r", - "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", - "\t\teventsFunctionContext.returnValue = false;\r", - "\t}\r", - "\r", - "\tif (currentFrameStateButtonIsPressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", - "}\r", - "" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "const player = gdjs._extensionController.getPlayer(playerId)\r", + "eventsFunctionContext.returnValue = player.isAnyButtonReleased();" ], "parameterObjects": "", "useStrict": true, @@ -14649,7 +14641,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -14665,8 +14657,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.weakMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.weakMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -14679,7 +14671,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -14695,8 +14687,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", - "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.strongMagnitude;" + "const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.strongMagnitude;" ], "parameterObjects": "", "useStrict": true, @@ -14709,7 +14701,7 @@ "parameters": [ { "description": "The gamepad identifier: 1, 2, 3 or 4", - "name": "Player_ID", + "name": "PlayerId", "type": "expression" } ], @@ -14722,6 +14714,7 @@ "fullName": "Platformer gamepad mapper", "name": "PlatformerGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -15161,275 +15154,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"A or Cross\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"A\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"B or Circle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"B\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"X or Square\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"X\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"Y or Triangle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"Y\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"LB or L1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"LB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"RB or R1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"RB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"LT or L2\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"LT\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"RT or R2\"" - ] - }, { "type": { "value": "Gamepads::C_Button_pressed" @@ -15437,7 +15161,7 @@ "parameters": [ "", "GamepadIdentifier", - "\"RT\"", + "Buttons[JumpButton]", "\"Left\"" ] } @@ -15478,64 +15202,77 @@ "value": "", "type": "Behavior", "label": "Platformer character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], + "choices": [], "name": "PlatformerCharacter" }, { "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "true", "type": "Boolean", "label": "Use directional pad", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseArrows" }, { "value": "true", "type": "Boolean", "label": "Use left stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseLeftStick" }, { "value": "", "type": "Boolean", "label": "Use right stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseRightStick" }, { "value": "A or Cross", "type": "Choice", "label": "Jump button", - "description": "", "group": "Controls", - "extraInformation": [ - "A or Cross", - "B or Circle", - "X or Square", - "Y or Triangle", - "LB or L1", - "RB or R1", - "LT or L2", - "RT or R2" + "choices": [ + { + "label": "A or Cross", + "value": "A or Cross" + }, + { + "label": "B or Circle", + "value": "B or Circle" + }, + { + "label": "X or Square", + "value": "X or Square" + }, + { + "label": "Y or Triangle", + "value": "Y or Triangle" + }, + { + "label": "LB or L1", + "value": "LB or L1" + }, + { + "label": "RB or R1", + "value": "RB or R1" + }, + { + "label": "LT or L2", + "value": "LT or L2" + }, + { + "label": "RT or R2", + "value": "RT or R2" + } ], "name": "JumpButton" } @@ -15547,6 +15284,7 @@ "fullName": "3D platformer gamepad mapper", "name": "Platformer3DGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -15615,275 +15353,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"A or Cross\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"A\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"B or Circle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"B\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"X or Square\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"X\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"Y or Triangle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"Y\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"LB or L1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"LB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"RB or R1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"RB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"LT or L2\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"LT\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"RT or R2\"" - ] - }, { "type": { "value": "Gamepads::C_Button_pressed" @@ -15891,7 +15360,7 @@ "parameters": [ "", "GamepadIdentifier", - "\"RT\"", + "Buttons[JumpButton]", "\"Left\"" ] } @@ -15932,31 +15401,32 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "Left", "type": "Choice", "label": "Walk joystick", - "description": "", "group": "Controls", - "extraInformation": [ - "Left", - "Right" + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } ], "name": "JoystickIdentifier" }, @@ -15964,17 +15434,40 @@ "value": "A or Cross", "type": "Choice", "label": "Jump button", - "description": "", "group": "Controls", - "extraInformation": [ - "A or Cross", - "B or Circle", - "X or Square", - "Y or Triangle", - "LB or L1", - "RB or R1", - "LT or L2", - "RT or R2" + "choices": [ + { + "label": "A or Cross", + "value": "A or Cross" + }, + { + "label": "B or Circle", + "value": "B or Circle" + }, + { + "label": "X or Square", + "value": "X or Square" + }, + { + "label": "Y or Triangle", + "value": "Y or Triangle" + }, + { + "label": "LB or L1", + "value": "LB or L1" + }, + { + "label": "RB or R1", + "value": "RB or R1" + }, + { + "label": "LT or L2", + "value": "LT or L2" + }, + { + "label": "RT or R2", + "value": "RT or R2" + } ], "name": "JumpButton" } @@ -15986,6 +15479,7 @@ "fullName": "3D shooter gamepad mapper", "name": "Shooter3DGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -16043,16 +15537,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"A or Cross\"" - ] - }, { "type": { "value": "Gamepads::C_Button_pressed" @@ -16060,7 +15544,7 @@ "parameters": [ "", "GamepadIdentifier", - "\"A\"", + "Buttons[JumpButton]", "\"Left\"" ] } @@ -16076,407 +15560,178 @@ ] } ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Gamepads::Shooter3DGamepadMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Gamepad identifier (1, 2, 3 or 4)", + "name": "GamepadIdentifier" + }, + { + "value": "Left", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } + ], + "name": "WalkStick" + }, + { + "value": "Right", + "type": "Choice", + "label": "Camera joystick", + "group": "Controls", + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } + ], + "name": "CameraStick" + }, + { + "value": "A or Cross", + "type": "Choice", + "label": "Jump button", + "group": "Controls", + "choices": [ + { + "label": "A or Cross", + "value": "A or Cross" + }, + { + "label": "B or Circle", + "value": "B or Circle" + }, + { + "label": "X or Square", + "value": "X or Square" + }, + { + "label": "Y or Triangle", + "value": "Y or Triangle" + }, + { + "label": "LB or L1", + "value": "LB or L1" + }, + { + "label": "RB or R1", + "value": "RB or R1" + }, + { + "label": "LT or L2", + "value": "LT or L2" + }, + { + "label": "RT or R2", + "value": "RT or R2" + } + ], + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control camera rotations with a gamepad.", + "fullName": "First person camera gamepad mapper", + "name": "FirstPersonGamepadMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO It's probably a bad idea to rotate the object around Y." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentRotationSpeedZ", + "=", + "Gamepads::AcceleratedSpeed(CurrentRotationSpeedZ, Gamepads::StickForceX(GamepadIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"B or Circle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"B\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "+", + "CurrentRotationSpeedZ * TimeDelta()" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"X or Square\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"X\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"Y or Triangle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"Y\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"LB or L1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"LB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"RB or R1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"RB\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"LT or L2\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"LT\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "JumpButton", - "=", - "\"RT or R2\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "GamepadIdentifier", - "\"RT\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Gamepads::Shooter3DGamepadMapper", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D physics character", - "description": "", - "group": "", - "extraInformation": [ - "Physics3D::PhysicsCharacter3D" - ], - "name": "PhysicsCharacter3D" - }, - { - "value": "1", - "type": "Number", - "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], - "name": "GamepadIdentifier" - }, - { - "value": "Left", - "type": "Choice", - "label": "Walk joystick", - "description": "", - "group": "Controls", - "extraInformation": [ - "Left", - "Right" - ], - "name": "WalkStick" - }, - { - "value": "Right", - "type": "Choice", - "label": "Camera joystick", - "description": "", - "group": "Controls", - "extraInformation": [ - "Left", - "Right" - ], - "name": "CameraStick" - }, - { - "value": "A or Cross", - "type": "Choice", - "label": "Jump button", - "description": "", - "group": "Controls", - "extraInformation": [ - "A or Cross", - "B or Circle", - "X or Square", - "Y or Triangle", - "LB or L1", - "RB or R1", - "LT or L2", - "RT or R2" - ], - "name": "JumpButton" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control camera rotations with a gamepad.", - "fullName": "First person camera gamepad mapper", - "name": "FirstPersonGamepadMapper", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO It's probably a bad idea to rotate the object around Y." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "CurrentRotationSpeedZ", - "=", - "Gamepads::AcceleratedSpeed(CurrentRotationSpeedZ, Gamepads::StickForceX(GamepadIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)" - ] - }, - { - "type": { - "value": "SetAngle" - }, - "parameters": [ - "Object", - "+", - "CurrentRotationSpeedZ * TimeDelta()" - ] - }, - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "CurrentRotationSpeedY", - "=", - "Gamepads::AcceleratedSpeed(CurrentRotationSpeedY, Gamepads::StickForceY(GamepadIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)" + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentRotationSpeedY", + "=", + "Gamepads::AcceleratedSpeed(CurrentRotationSpeedY, Gamepads::StickForceY(GamepadIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)" ] }, { @@ -17346,31 +16601,31 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "Right", "type": "Choice", "label": "Camera joystick", - "description": "", - "group": "", - "extraInformation": [ - "Left", - "Right" + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } ], "name": "CameraStick" }, @@ -17379,27 +16634,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationSpeedMax" }, { "value": "360", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationAcceleration" }, { "value": "720", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationDeceleration" }, { @@ -17407,27 +16656,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationSpeedMax" }, { "value": "240", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationAcceleration" }, { "value": "480", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationDeceleration" }, { @@ -17435,9 +16678,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Minimum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMin" }, { @@ -17445,9 +16686,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Maximum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMax" }, { @@ -17455,9 +16694,7 @@ "type": "Number", "unit": "Pixel", "label": "Z position offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -17465,9 +16702,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Z", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedZ" }, @@ -17476,20 +16710,388 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Y", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedY" } ], "sharedPropertyDescriptors": [] }, + { + "description": "Control a 3D physics car with a gamepad.", + "fullName": "3D car gamepad mapper", + "name": "PhysicsCar3DGamepadMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Controller_X_is_connected" + }, + "parameters": [ + "", + "GamepadIdentifier", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "UseArrows", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "GamepadIdentifier", + "\"Left\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "GamepadIdentifier", + "\"Right\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateRightKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "UseLeftStick", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Left\"", + "\"Any\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateSteeringStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "Gamepads::StickForceX(GamepadIdentifier, \"Left\")" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "UseRightStick", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "1", + "\"Right\"", + "\"Any\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateSteeringStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "Gamepads::StickForceX(GamepadIdentifier, \"Right\")" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"LT\"", + "\"Up\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"RT\"", + "\"Up\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateAcceleratorStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "Gamepads::TriggerPressure(GamepadIdentifier, \"RT\") - Gamepads::TriggerPressure(GamepadIdentifier, \"LT\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "GamepadIdentifier", + "Buttons[HandBrakeButton]", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateHandBrakeKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Gamepads::PhysicsCar3DGamepadMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics car", + "extraInformation": [ + "Physics3D::PhysicsCar3D" + ], + "choices": [], + "name": "PhysicsCar3D" + }, + { + "value": "1", + "type": "Number", + "label": "Gamepad identifier (1, 2, 3 or 4)", + "name": "GamepadIdentifier" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use directional pad", + "group": "Controls", + "name": "UseArrows" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use left stick", + "group": "Controls", + "name": "UseLeftStick" + }, + { + "value": "", + "type": "Boolean", + "label": "Use right stick", + "group": "Controls", + "name": "UseRightStick" + }, + { + "value": "B or Circle", + "type": "Choice", + "label": "Hand brake button", + "group": "Controls", + "choices": [ + { + "label": "A or Cross", + "value": "A or Cross" + }, + { + "label": "B or Circle", + "value": "B or Circle" + }, + { + "label": "X or Square", + "value": "X or Square" + }, + { + "label": "Y or Triangle", + "value": "Y or Triangle" + }, + { + "label": "LB or L1", + "value": "LB or L1" + }, + { + "label": "RB or R1", + "value": "RB or R1" + }, + { + "label": "LT or L2", + "value": "LT or L2" + }, + { + "label": "RT or R2", + "value": "RT or R2" + } + ], + "name": "HandBrakeButton" + } + ], + "sharedPropertyDescriptors": [] + }, { "description": "Control a top-down character with a gamepad.", "fullName": "Top-down gamepad mapper", "name": "TopDownGamepadMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -18071,59 +17673,57 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], + "choices": [], "name": "TopDownMovement" }, { "value": "1", "type": "Number", "label": "Gamepad identifier (1, 2, 3 or 4)", - "description": "", - "group": "", - "extraInformation": [], "name": "GamepadIdentifier" }, { "value": "true", "type": "Boolean", "label": "Use directional pad", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseArrows" }, { "value": "true", "type": "Boolean", "label": "Use left stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseLeftStick" }, { "value": "", "type": "Boolean", "label": "Use right stick", - "description": "", "group": "Controls", - "extraInformation": [], "name": "UseRightStick" }, { "value": "Analog", "type": "Choice", "label": "Stick mode", - "description": "", "group": "Controls", - "extraInformation": [ - "Analog", - "360°", - "8 Directions" + "choices": [ + { + "label": "Analog", + "value": "Analog" + }, + { + "label": "360°", + "value": "360°" + }, + { + "label": "8 Directions", + "value": "8 Directions" + } ], "name": "StickMode" } @@ -19666,9 +19266,7 @@ "type": "Number", "unit": "Pixel", "label": "Radius of the movement on X axis", - "description": "", "group": "Ellipse", - "extraInformation": [], "name": "RadiusX" }, { @@ -19676,9 +19274,7 @@ "type": "Number", "unit": "Pixel", "label": "Radius of the movement on Y axis", - "description": "", "group": "Ellipse", - "extraInformation": [], "name": "RadiusY" }, { @@ -19686,18 +19282,14 @@ "type": "Number", "unit": "Second", "label": "Loop duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "LoopDuration" }, { "value": "", "type": "Boolean", "label": "Turn left", - "description": "", "group": "Speed", - "extraInformation": [], "name": "InitialTurningLeft" }, { @@ -19705,18 +19297,14 @@ "type": "Number", "unit": "DegreeAngle", "label": "Initial direction", - "description": "", "group": "Speed", - "extraInformation": [], "name": "InitialDirectionAngle" }, { "value": "", "type": "Boolean", "label": "Rotate", - "description": "", "group": "Rotation", - "extraInformation": [], "name": "ShouldRotate" }, { @@ -19724,18 +19312,13 @@ "type": "Number", "unit": "DegreeAngle", "label": "Rotation offset", - "description": "", "group": "Rotation", - "extraInformation": [], "name": "RotationOffset" }, { "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CenterX" }, @@ -19743,9 +19326,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CenterY" }, @@ -19753,9 +19333,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MovementAngle" }, @@ -19763,9 +19340,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -19773,9 +19347,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" } @@ -19796,7 +19367,7 @@ "name": "SmoothCamera", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", "shortDescription": "Smoothly scroll to follow an object.", - "version": "0.4.1", + "version": "0.4.4", "description": [ "The camera follows an object according to:", "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", @@ -19833,6 +19404,7 @@ "fullName": "Smooth Camera", "name": "SmoothCamera", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -20777,44 +20349,40 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaLeft", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaRight", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaTop", "!=", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FollowFreeAreaBottom", "!=", "0" ] @@ -21127,7 +20695,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "FollowFreeAreaTop", + "FollowFreeAreaRight", "=", "max(0, Value)" ] @@ -21172,7 +20740,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "FollowFreeAreaTop", + "FollowFreeAreaLeft", "=", "max(0, Value)" ] @@ -21328,7 +20896,7 @@ "type": "behavior" }, { - "description": "Leftward maximum speed (in ratio per second)", + "description": "Leftward maximum speed (in pixels per second)", "name": "Value", "type": "expression" } @@ -21352,7 +20920,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "LeftwardSpeedMax", + "RightwardSpeedMax", "=", "max(0, Value)" ] @@ -21878,18 +21446,6 @@ "name": "SetOffsetYOp", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Deprecated use SetOffsetYOp instead." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -21931,6 +21487,18 @@ "private": true, "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -23031,22 +22599,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -23260,22 +22826,20 @@ "subInstructions": [ { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastHistoryDuration", ">", "0" ] }, { "type": { - "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ForecastTime", ">", "0" ] @@ -24241,54 +23805,40 @@ "value": "0.9", "type": "Number", "label": "Leftward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "LeftwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Rightward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "RightwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Upward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "UpwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Downward catch-up speed (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "DownwardSpeed" }, { "value": "true", "type": "Boolean", "label": "Follow on X axis", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowOnX" }, { "value": "true", "type": "Boolean", "label": "Follow on Y axis", - "description": "", - "group": "", - "extraInformation": [], "name": "FollowOnY" }, { @@ -24296,9 +23846,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area left border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaLeft" }, @@ -24307,9 +23855,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area right border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaRight" }, @@ -24318,9 +23864,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaTop" }, @@ -24329,9 +23873,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom border", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "FollowFreeAreaBottom" }, @@ -24340,9 +23882,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset X", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetX" }, @@ -24351,9 +23891,7 @@ "type": "Number", "unit": "Pixel", "label": "Camera offset Y", - "description": "", "group": "Position", - "extraInformation": [], "advanced": true, "name": "CameraOffsetY" }, @@ -24362,9 +23900,7 @@ "type": "Number", "unit": "Second", "label": "Camera delay", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "CameraDelay" }, @@ -24373,9 +23909,7 @@ "type": "Number", "unit": "Second", "label": "Forecast time", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastTime" }, @@ -24384,9 +23918,7 @@ "type": "Number", "unit": "Second", "label": "Forecast history duration", - "description": "", "group": "Timing", - "extraInformation": [], "deprecated": true, "name": "ForecastHistoryDuration" }, @@ -24394,9 +23926,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogLeftwardSpeed" }, @@ -24404,9 +23933,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogRightwardSpeed" }, @@ -24414,9 +23940,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogDownwardSpeed" }, @@ -24424,9 +23947,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "LogUpwardSpeed" }, @@ -24434,9 +23954,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterX" }, @@ -24444,9 +23961,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DelayedCenterY" }, @@ -24454,9 +23968,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanX" }, @@ -24464,9 +23975,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryMeanY" }, @@ -24474,9 +23982,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceX" }, @@ -24484,9 +23989,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryCovariance" }, @@ -24494,9 +23996,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearA" }, @@ -24504,9 +24003,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryLinearB" }, @@ -24514,9 +24010,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedX" }, @@ -24524,9 +24017,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastedY" }, @@ -24534,9 +24024,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestX" }, @@ -24544,9 +24031,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedNewestY" }, @@ -24554,9 +24038,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestX" }, @@ -24564,9 +24045,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ProjectedOldestY" }, @@ -24574,9 +24052,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ForecastHistoryVarianceY" }, @@ -24584,9 +24059,6 @@ "value": "", "type": "Number", "label": "Index (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" }, @@ -24594,9 +24066,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpSpeed" }, @@ -24604,9 +24073,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraExtraDelay" }, @@ -24614,9 +24080,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedXMax" }, @@ -24624,9 +24087,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingSpeedYMax" }, @@ -24634,9 +24094,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WaitingEnd" }, @@ -24644,9 +24101,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CameraDelayCatchUpDuration" }, @@ -24655,9 +24109,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Leftward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "LeftwardSpeedMax" }, @@ -24666,9 +24118,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Rightward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "RightwardSpeedMax" }, @@ -24677,9 +24127,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "UpwardSpeedMax" }, @@ -24688,9 +24136,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed", - "description": "", "group": "Maximum speed", - "extraInformation": [], "advanced": true, "name": "DownwardSpeedMax" }, @@ -24698,9 +24144,6 @@ "value": "", "type": "Number", "label": "OldX (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -24708,9 +24151,6 @@ "value": "", "type": "Number", "label": "OldY (local variable)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -24718,9 +24158,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCalledManually" } @@ -24732,6 +24169,7 @@ "fullName": "Smooth platformer camera", "name": "SmoothPlatformerCamera", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -24953,31 +24391,26 @@ "value": "", "type": "Behavior", "label": "Platformer character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], + "choices": [], "name": "PlatformerCharacter" }, { "value": "", "type": "Behavior", "label": "Smooth camera behavior", - "description": "", - "group": "", "extraInformation": [ "SmoothCamera::SmoothCamera" ], + "choices": [], "name": "SmoothCamera" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JumpOriginY" }, @@ -24986,9 +24419,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaTop" }, { @@ -24996,9 +24427,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom in the air", - "description": "", "group": "Position", - "extraInformation": [], "name": "AirFollowFreeAreaBottom" }, { @@ -25006,9 +24435,7 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area top on the floor", - "description": "", "group": "Position", - "extraInformation": [], "name": "FloorFollowFreeAreaTop" }, { @@ -25016,45 +24443,35 @@ "type": "Number", "unit": "Pixel", "label": "Follow free area bottom on the floor", - "description": "", "group": "Position", - "extraInformation": [], "name": "FloorFollowFreeAreaBottom" }, { "value": "0.95", "type": "Number", "label": "Upward speed in the air (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "AirUpwardSpeed" }, { "value": "0.95", "type": "Number", "label": "Downward speed in the air (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "AirDownwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Upward speed on the floor (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "FloorUpwardSpeed" }, { "value": "0.9", "type": "Number", "label": "Downward speed on the floor (in ratio per second)", - "description": "", "group": "Catch-up speed", - "extraInformation": [], "name": "FloorDownwardSpeed" }, { @@ -25062,9 +24479,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirUpwardSpeedMax" }, { @@ -25072,9 +24487,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed in the air", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "AirDownwardSpeedMax" }, { @@ -25082,9 +24495,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Upward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorUpwardSpeedMax" }, { @@ -25092,9 +24503,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Downward maximum speed on the floor", - "description": "", "group": "Maximum speed", - "extraInformation": [], "name": "FloorDownwardSpeedMax" } ], @@ -25114,7 +24523,7 @@ "name": "HedgehogPlatformer", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Space/9ea467d2404c1736b87d763c884e9b9dfb13a401360f69c6a17afc8f5d583d58_Space_warp_galaxy.svg", "shortDescription": "Jump and run on platforms at 360°.", - "version": "1.1.1", + "version": "1.1.3", "description": [ "A platformer engine for Sonic-like games.", "", @@ -26880,11 +26289,10 @@ }, { "type": { - "value": "HedgehogPlatformer::HedgehogCharacter::PropertyGroundSpeed" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "GroundSpeed", "!=", "0" ] @@ -35917,7 +35325,7 @@ ], "parameterObjects": "Object", "useStrict": true, - "eventsSheetExpanded": false + "eventsSheetExpanded": true }, { "type": "BuiltinCommonInstructions::Standard", @@ -36179,9 +35587,6 @@ "value": "true", "type": "Boolean", "label": "Default controls", - "description": "", - "group": "", - "extraInformation": [], "name": "IsDefaultControlsEnabled" }, { @@ -36190,17 +35595,13 @@ "unit": "PixelSpeed", "label": "Max speed", "description": "The maximum speed obtained with input.", - "group": "", - "extraInformation": [], "name": "MaxSpeed" }, { "value": "true", "type": "Boolean", "label": "Rotate", - "description": "", "group": "Rotation", - "extraInformation": [], "advanced": true, "name": "ShouldRotate" }, @@ -36209,9 +35610,7 @@ "type": "Number", "unit": "AngularSpeed", "label": "Rotation speed when falling", - "description": "", "group": "Rotation", - "extraInformation": [], "advanced": true, "name": "FallingRotationSpeed" }, @@ -36220,9 +35619,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Jump speed", - "description": "", "group": "Jump", - "extraInformation": [], "name": "JumpSpeed" }, { @@ -36231,7 +35628,6 @@ "label": "Jump height reducer (0 to 1)", "description": "Vertical speed is multiplied by this value when the jump key is released during a jump.", "group": "Jump", - "extraInformation": [], "name": "JumpHeightReducer" }, { @@ -36239,9 +35635,7 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Gravity", - "description": "", "group": "Jump", - "extraInformation": [], "name": "Gravity" }, { @@ -36249,9 +35643,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Max falling speed", - "description": "", "group": "Jump", - "extraInformation": [], "name": "MaxFallingSpeed" }, { @@ -36260,7 +35652,6 @@ "label": "Ceil bounce factor (-1 to 1)", "description": "0: set the vertical speed to 0, 1: keep the speed, -1: bounce.", "group": "Jump", - "extraInformation": [], "name": "CeilBounceFactor" }, { @@ -36270,7 +35661,6 @@ "label": "Air drag", "description": "The air drag reduce the speed on X axis.", "group": "Air control", - "extraInformation": [], "name": "AirDrag" }, { @@ -36278,9 +35668,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Air drag min speed Y", - "description": "", "group": "Air control", - "extraInformation": [], "name": "AirDragMinSpeedY" }, { @@ -36288,9 +35676,7 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Air acceleration", - "description": "", "group": "Air control", - "extraInformation": [], "name": "AirAcceleration" }, { @@ -36298,9 +35684,7 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Ground acceleration", - "description": "", "group": "Run", - "extraInformation": [], "name": "GroundAcceleration" }, { @@ -36310,7 +35694,6 @@ "label": "Deceleration", "description": "When changing of direction on the ground.", "group": "Run", - "extraInformation": [], "name": "Deceleration" }, { @@ -36320,7 +35703,6 @@ "label": "Friction", "description": "When there is no input.", "group": "Run", - "extraInformation": [], "name": "Friction" }, { @@ -36330,7 +35712,6 @@ "label": "Downwards slope factor", "description": "Speed gain when moving downwards.", "group": "Ground", - "extraInformation": [], "name": "DownSlopeFactor" }, { @@ -36340,7 +35721,6 @@ "label": "Upwards slope factor", "description": "Speed loss when moving upwards.", "group": "Ground", - "extraInformation": [], "name": "UpSlopeFactor" }, { @@ -36350,7 +35730,6 @@ "label": "Slip duration", "description": "Time needed for the platformer to regain control after slipping down a slope.", "group": "Ground", - "extraInformation": [], "name": "SlipDuration" }, { @@ -36360,7 +35739,6 @@ "label": "Stand max angle", "description": "Allow characters to fully stop on not too steep floors.", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "StandMaxAngle" }, @@ -36369,9 +35747,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Min angle for ground slipping", - "description": "", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "SlipMinAngle" }, @@ -36380,9 +35756,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Min angle for ground unattaching", - "description": "", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "UnattachMinAngle" }, @@ -36391,9 +35765,7 @@ "type": "Number", "unit": "Pixel", "label": "Min speed for ground unattach", - "description": "", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "UnattachMinSpeed" }, @@ -36403,7 +35775,6 @@ "label": "Min floor magnet distance (in character height per seconds)", "description": "At low speeds.", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "FloorMagnetDistanceMin" }, @@ -36413,7 +35784,6 @@ "label": "Max floor magnet distance (in character height per seconds)", "description": "At high speeds.", "group": "Ground", - "extraInformation": [], "advanced": true, "name": "FloorMagnetDistanceMax" }, @@ -36422,9 +35792,7 @@ "type": "Number", "unit": "Second", "label": "Sub-step max time delta", - "description": "", "group": "Sub-step", - "extraInformation": [], "advanced": true, "name": "SubstepTimeDeltaMax" }, @@ -36433,9 +35801,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Max sub-step number", - "description": "", "group": "Sub-step", - "extraInformation": [], "advanced": true, "name": "SubstepCountMax" }, @@ -36444,9 +35810,6 @@ "type": "Number", "unit": "Pixel", "label": "Width", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Width" }, @@ -36455,9 +35818,6 @@ "type": "Number", "unit": "Pixel", "label": "Height", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Height" }, @@ -36466,9 +35826,6 @@ "type": "Number", "unit": "Pixel", "label": "Bottom width", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "BottomWidth" }, @@ -36477,8 +35834,6 @@ "type": "Number", "label": "Collision layer", "description": "Only interacts with platforms of the same layer.", - "group": "", - "extraInformation": [], "hidden": true, "name": "CollisionLayer" }, @@ -36487,9 +35842,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Ground speed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "GroundSpeed" }, @@ -36498,9 +35850,6 @@ "type": "Number", "unit": "DegreeAngle", "label": "Ground angle", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "GroundAngle" }, @@ -36509,9 +35858,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Horizontal speed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SpeedX" }, @@ -36520,9 +35866,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Vertical speed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SpeedY" }, @@ -36531,9 +35874,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldSpeedX" }, @@ -36542,9 +35882,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldSpeedY" }, @@ -36552,9 +35889,6 @@ "value": "0", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsRightKeyPressed" }, @@ -36562,9 +35896,6 @@ "value": "0", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsJumpKeyPressed" }, @@ -36572,9 +35903,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WasJumpKeyConsumed" }, @@ -36582,9 +35910,6 @@ "value": "0", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsLeftKeyPressed" }, @@ -36593,8 +35918,6 @@ "type": "Boolean", "label": "Is grounded", "description": "The current state of the object (grounded or airbone)", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsOnFloor" }, @@ -36602,9 +35925,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsPushing" }, @@ -36612,9 +35932,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsJumping" }, @@ -36622,9 +35939,6 @@ "value": "0", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CanJump" }, @@ -36632,9 +35946,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCenterOnGround" }, @@ -36642,9 +35953,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsLeftSideOnGround" }, @@ -36652,9 +35960,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsRightSideOnGround" }, @@ -36664,8 +35969,6 @@ "unit": "Second", "label": "", "description": "The control lock timer when slipping", - "group": "", - "extraInformation": [], "hidden": true, "name": "RunningLockRemainingDuration" }, @@ -36675,8 +35978,6 @@ "unit": "Pixel", "label": "", "description": "Used in the \"IsMoving\" condition", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -36686,8 +35987,6 @@ "unit": "Pixel", "label": "", "description": "Used in the \"IsMoving\" condition", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -36696,9 +35995,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldSpeed" }, @@ -36707,9 +36003,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PlatformOldX" }, @@ -36718,9 +36011,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PlatformOldY" }, @@ -36729,9 +36019,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CosGroundAngle" }, @@ -36740,9 +36027,6 @@ "type": "Number", "unit": "Pixel", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SinGroundAngle" }, @@ -36750,9 +36034,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFacingForward" } @@ -37256,14 +36537,27 @@ "value": "Platform", "type": "Choice", "label": "Type", - "description": "", - "group": "", - "extraInformation": [ - "Platform", - "Jumpthru", - "Angle lock marker", - "Left-right layer toggle marker", - "Top-bottom layer toggle marker" + "choices": [ + { + "label": "Platform", + "value": "Platform" + }, + { + "label": "Jumpthru", + "value": "Jumpthru" + }, + { + "label": "Angle lock marker", + "value": "Angle lock marker" + }, + { + "label": "Left-right layer toggle marker", + "value": "Left-right layer toggle marker" + }, + { + "label": "Top-bottom layer toggle marker", + "value": "Top-bottom layer toggle marker" + } ], "name": "PlatformType" }, @@ -37273,8 +36567,6 @@ "unit": "Dimensionless", "label": "Collision layer", "description": "Only interacts with characters of the same layer.", - "group": "", - "extraInformation": [], "name": "CollisionLayer" }, { @@ -37283,7 +36575,6 @@ "label": "Snap horizontally", "description": "Snap movement angle to 0° or 180°.", "group": "Angle lock", - "extraInformation": [], "name": "ShouldSnapAngleHorizontally" }, { @@ -37292,7 +36583,6 @@ "label": "Snap vertically", "description": "Snap movement angle to 90° or 270°.", "group": "Angle lock", - "extraInformation": [], "name": "ShouldSnapAngleVertically" }, { @@ -37302,25 +36592,19 @@ "label": "Targeted layer", "description": "The layer given to player on the right or bottom. The marker layer is used for the other side.", "group": "Layer toggle", - "extraInformation": [], "name": "TargetedCollisionLayer" }, { "value": "", "type": "Boolean", "label": "Only for grounded characters", - "description": "", "group": "Layer toggle", - "extraInformation": [], "name": "IsRequiringGrounded" }, { "value": "true", "type": "Boolean", "label": "Rotate characters", - "description": "", - "group": "", - "extraInformation": [], "name": "ShouldRotateCharacters" } ], @@ -37822,16 +37106,24 @@ }, { "type": { - "value": "HedgehogPlatformer::HedgehogCharacterAnimator::PropertyBrakeAnimationName" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "BrakeAnimationName", "=", "\"\"" ] } ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Object" + ] } ], "actions": [ @@ -37869,16 +37161,24 @@ }, { "type": { - "value": "HedgehogPlatformer::HedgehogCharacterAnimator::PropertyRunAnimationName" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "RunAnimationName", "=", "\"\"" ] } ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Object" + ] } ], "actions": [ @@ -37916,16 +37216,24 @@ }, { "type": { - "value": "HedgehogPlatformer::HedgehogCharacterAnimator::PropertyWalkAnimationName" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "WalkAnimationName", "=", "\"\"" ] } ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Object" + ] } ], "actions": [ @@ -38176,87 +37484,66 @@ "value": "", "type": "Behavior", "label": "Hedgehog platformer character", - "description": "", - "group": "", "extraInformation": [ "HedgehogPlatformer::HedgehogCharacter" ], + "choices": [], "name": "HedgehogCharacter" }, { "value": "", "type": "Behavior", "label": "Animatable capability", - "description": "", - "group": "", "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], + "choices": [], "name": "Animation" }, { "value": "", "type": "Behavior", "label": "Flippable capability", - "description": "", - "group": "", "extraInformation": [ "FlippableCapability::FlippableBehavior" ], + "choices": [], "name": "Flippable" }, { "value": "Idle", "type": "String", "label": "Idle", - "description": "", - "group": "", - "extraInformation": [], "name": "IdleAnimationName" }, { "value": "Walk", "type": "String", "label": "Walk", - "description": "", - "group": "", - "extraInformation": [], "name": "WalkAnimationName" }, { "value": "Run", "type": "String", "label": "Run", - "description": "", - "group": "", - "extraInformation": [], "name": "RunAnimationName" }, { "value": "Jump", "type": "String", "label": "Jump", - "description": "", - "group": "", - "extraInformation": [], "name": "JumpAnimationName" }, { "value": "Fall", "type": "String", "label": "Fall", - "description": "", - "group": "", - "extraInformation": [], "name": "FallAnimationName" }, { "value": "BalanceOnLedge", "type": "String", "label": "Balance on ledge", - "description": "", - "group": "", - "extraInformation": [], "name": "BalanceOnLedgeAnimationName" }, { @@ -38264,27 +37551,18 @@ "type": "Number", "unit": "AngularSpeed", "label": "Jump rotation speed", - "description": "", - "group": "", - "extraInformation": [], "name": "JumpRotationSpeed" }, { "value": "Push", "type": "String", "label": "Push", - "description": "", - "group": "", - "extraInformation": [], "name": "PushAnimationName" }, { "value": "Brake", "type": "String", "label": "Brake", - "description": "", - "group": "", - "extraInformation": [], "name": "BrakeAnimationName" }, { @@ -38292,9 +37570,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Brake animation min speed", - "description": "", - "group": "", - "extraInformation": [], "name": "BrakeMinSpeed" }, { @@ -38302,18 +37577,12 @@ "type": "Number", "unit": "PixelSpeed", "label": "Run animation min speed", - "description": "", - "group": "", - "extraInformation": [], "name": "RunMinSpeed" }, { "value": "", "type": "String", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "DirectionKey" } @@ -39639,11 +38908,10 @@ "value": "", "type": "Behavior", "label": "Hedgehog platformer character", - "description": "", - "group": "", "extraInformation": [ "HedgehogPlatformer::HedgehogCharacter" ], + "choices": [], "name": "HedgehogCharacter" }, { @@ -39653,7 +38921,6 @@ "label": "Downwards slope factor", "description": "Speed gain when moving downwards.", "group": "Ground", - "extraInformation": [], "name": "DownSlopeFactor" }, { @@ -39663,7 +38930,6 @@ "label": "Upwards slope factor", "description": "Speed loss when moving upwards.", "group": "Ground", - "extraInformation": [], "name": "UpSlopeFactor" }, { @@ -39673,7 +38939,6 @@ "label": "Friction", "description": "When there is no input.", "group": "Speed", - "extraInformation": [], "name": "Friction" }, { @@ -39683,7 +38948,6 @@ "label": "Deceleration", "description": "When changing of direction on the ground.", "group": "Speed", - "extraInformation": [], "name": "Deceleration" }, { @@ -39691,9 +38955,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Max speed", - "description": "", "group": "Speed", - "extraInformation": [], "name": "MaxSpeed" }, { @@ -39703,7 +38965,6 @@ "label": "Min speed", "description": "The minimal speed to be able to start rolling.", "group": "Speed", - "extraInformation": [], "name": "MinSpeed" }, { @@ -39711,18 +38972,13 @@ "type": "Number", "unit": "PixelSpeed", "label": "Spindash speed", - "description": "", "group": "Spindash", - "extraInformation": [], "name": "SpinDashSpeed" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsRolling" }, @@ -39730,9 +38986,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCrouching" }, @@ -39740,9 +38993,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsCharging" }, @@ -39750,9 +39000,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalDownSlopeFactor" }, @@ -39760,9 +39007,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalUpSlopeFactor" }, @@ -39770,9 +39014,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalFriction" }, @@ -39780,9 +39021,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalDeceleration" }, @@ -39790,9 +39028,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalAcceleration" }, @@ -39800,9 +39035,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OriginalStandMaxAngle" }, @@ -39810,9 +39042,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CanJump" }, @@ -39820,9 +39049,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsJumpPressed" }, @@ -39830,9 +39056,6 @@ "value": "", "type": "Boolean", "label": "Has just started a spindash", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustStartedSpinDash" } @@ -39896,7 +39119,7 @@ "Character", "HedgehogCharacter", "Object", - "", + "HedgehogPlatform", "" ] } @@ -39950,7 +39173,7 @@ "Character", "HedgehogCharacter", "Object", - "", + "HedgehogPlatform", "" ] } @@ -40253,22 +39476,20 @@ "value": "", "type": "Behavior", "label": "Hedgehog platform", - "description": "", - "group": "", "extraInformation": [ "HedgehogPlatformer::HedgehogPlatform" ], + "choices": [], "name": "HedgehogPlatform" }, { "value": "", "type": "Behavior", "label": "Flippable capability", - "description": "", - "group": "", "extraInformation": [ "FlippableCapability::FlippableBehavior" ], + "choices": [], "name": "Flip" }, { @@ -40276,9 +39497,6 @@ "type": "Number", "unit": "PixelSpeed", "label": "Push speed", - "description": "", - "group": "", - "extraInformation": [], "name": "PushSpeed" }, { @@ -40286,9 +39504,6 @@ "type": "Number", "unit": "Second", "label": "Character running lock duration", - "description": "", - "group": "", - "extraInformation": [], "name": "CharacterRunningLockDuration" } ], @@ -40308,7 +39523,7 @@ "name": "ScreenOrientationChecker", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/0126888931a4a4f82bb2824df9f096347ace1c47f510c44df42aa8dc9e49e24a_screen-rotation.svg", "shortDescription": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", - "version": "0.1.0", + "version": "0.2.1", "description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", "origin": { "identifier": "ScreenOrientationChecker", @@ -40331,6 +39546,28 @@ ], "sceneVariables": [], "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, { "fullName": "Get game target orientation", "functionType": "StringExpression", @@ -40394,7 +39631,272 @@ "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "ScreenOrientationChecker", + "objects": [ + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "BackgroundPainter", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 0, + "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 0, + "g": 0, + "b": 0 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 35, + "keepRatio": true, + "layer": "", + "name": "Text", + "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", + "width": 207, + "x": 104, + "y": 120, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "BackgroundPainter", + "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", + "width": 0, + "x": 38, + "y": 17, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0.9624060150375939, + "height": 96, + "layer": "", + "name": "Icon", + "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", + "width": 96, + "x": 158, + "y": 16, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.75, + "windowMask": false, + "selectedLayer": "" + }, "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::ClearBetweenFrames" + }, + "parameters": [ + "BackgroundPainter", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, { "fullName": "", "functionType": "Action", @@ -40402,41 +39904,66 @@ "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if the screen must be shown" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ScreenOrientationChecker::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SystemInfo::IsMobile" + "inverted": true, + "value": "ScreenOrientationChecker::IsInGameEdition" }, - "parameters": [] + "parameters": [ + "", + "" + ] } ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if the screen must be shown" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "SystemInfo::IsMobile" }, - "parameters": [ - "SceneWindowWidth()", - ">", - "SceneWindowHeight()" - ] + "parameters": [] } ], "actions": [], @@ -40446,24 +39973,69 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" + "SceneWindowWidth()", + ">", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "!=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] @@ -40473,364 +40045,366 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "!=", - "\"portrait\"" + "SceneWindowWidth()", + "<=", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"landscape\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show/hide the screen as needed" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "SceneWindowWidth()", - "<=", - "SceneWindowHeight()" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [], + "subInstructions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "TargetOrientation", - "=", - "\"landscape\"" + "IsShown", + "True", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetBooleanVariable" + "value": "BooleanVariable" }, "parameters": [ - "IsShown", - "False", + "IsForceShown", + "True", "" ] } ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" - ] - } + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show/hide the screen as needed" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsShown", + "True", + "" ] }, { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsForceShown", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" }, "parameters": [ "Object" ] } ] - } - ], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "BackgroundPainter", - "BackgroundColor" - ] }, { - "type": { - "value": "PrimitiveDrawing::RoundedRectangle" - }, - "parameters": [ - "BackgroundPainter", - "Padding", - "Padding", - "Object.Width()-Padding", - "Object.Height()-Padding", - "CornerRadius" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Icon", + "=", + "Text.Y() - 100" + ] + } ] }, { - "type": { - "value": "Montre" - }, - "parameters": [ - "Object", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "IsShown", - "True", - "" - ] + "comment": "Animate the icon" }, { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "IsForceShown", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Object" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Icon", - "=", - "Text.Y() - 100" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Animate the icon" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Tween::Exists" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + } ] }, { - "type": { - "inverted": true, - "value": "Tween::Exists" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Tween::HasFinished" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } ] }, { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"", + "-8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Draw the background.", + "fullName": "Draw the background", + "functionType": "Action", + "name": "DrawBackground", + "private": true, + "sentence": "Draw the background of _PARAM0_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Tween::HasFinished" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"", - "-8", - "\"easeInOutQuad\"", - "2", - "" - ] - }, - { - "type": { - "value": "Tween::RemoveTween" + "value": "PrimitiveDrawing::RoundedRectangle" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" + "BackgroundPainter", + "Padding", + "Padding", + "Object.Width()-Padding", + "Object.Height()-Padding", + "CornerRadius" ] } ] @@ -40850,7 +40424,6 @@ "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game.", "fullName": "Force show the screen", "functionType": "Condition", - "group": "Screen Orientation Checker configuration", "name": "IsForceShown", "sentence": "_PARAM0_ is forced to be shown", "events": [ @@ -40894,7 +40467,6 @@ "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game.", "fullName": "Force show the screen", "functionType": "Action", - "group": "Screen Orientation Checker configuration", "name": "SetIsForceShown", "sentence": "Force _PARAM0_ to be shown: _PARAM1_", "events": [ @@ -40970,6 +40542,76 @@ } ], "objectGroups": [] + }, + { + "description": "the message of the object.", + "fullName": "Message", + "functionType": "ExpressionAndCondition", + "name": "Message", + "sentence": "the message", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Text.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Message", + "name": "SetMessage", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Text", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -40977,9 +40619,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsShown" }, @@ -40988,8 +40627,6 @@ "type": "Boolean", "label": "Force show the screen", "description": "Use this to test the screen in your game", - "group": "", - "extraInformation": [], "name": "IsForceShown" }, { @@ -40997,9 +40634,7 @@ "type": "Number", "unit": "Pixel", "label": "Padding", - "description": "", "group": "Appearance", - "extraInformation": [], "name": "Padding" }, { @@ -41009,271 +40644,277 @@ "label": "Corner radius", "description": "Corner radius for the background", "group": "Appearance", - "extraInformation": [], "name": "CornerRadius" - }, - { - "value": "0;0;0", - "type": "Color", - "label": "Background color", - "description": "", - "group": "Appearance", - "extraInformation": [], - "name": "BackgroundColor" } ], - "objects": [ - { - "assetStoreId": "", - "bold": true, - "italic": false, - "name": "Text", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 0, - "topEdgeAnchor": 4, - "useLegacyBottomAndRightAnchors": false - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ], - "string": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" - } - }, - { - "assetStoreId": "", - "name": "BackgroundPainter", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [], - "fillOpacity": 255, - "outlineSize": 0, - "outlineOpacity": 255, - "absoluteCoordinates": true, - "clearBetweenFrames": true, - "antialiasing": "none", - "fillColor": { - "r": 0, - "g": 0, - "b": 0 - }, - "outlineColor": { - "r": 0, - "g": 0, - "b": 0 - } - }, - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "Icon", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 4, - "topEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ], - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "rotate-screen-icon.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 52.5, - "y": 56.5 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 1 - }, - { - "x": 105, - "y": 1 - }, - { - "x": 105, - "y": 113 + "variants": [ + { + "areaMaxX": 400, + "areaMaxY": 200, + "areaMaxZ": 0, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "2743bcd6cf431c6c00cda3a59684eb152b3a09d598b799b15383e4f77daf8b37", + "assetStoreOriginalName": "Black screen orientation checker", + "name": "Black screen orientation checker", + "objects": [ + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "BackgroundPainter", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 0, + "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 0, + "g": 0, + "b": 0 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "rotate-screen-icon.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 52.5, + "y": 56.5 }, - { + "centerPoint": { + "automatic": true, + "name": "centre", "x": 0, - "y": 113 - } - ] + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 105, + "y": 1 + }, + { + "x": 105, + "y": 113 + }, + { + "x": 0, + "y": 113 + } + ] + ] + } ] } ] } ] } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Text" - }, - { - "objectName": "BackgroundPainter" + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] }, - { - "objectName": "Icon" - } - ] - }, - "objectsGroups": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ - { - "defaultSize": true, - "defaultViewport": true, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 35, + "keepRatio": true, + "layer": "", + "name": "Text", + "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", + "width": 207, + "x": 104, + "y": 120, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 - } - ], - "effects": [] - } - ], - "instances": [ - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 35, - "keepRatio": true, - "layer": "", - "name": "Text", - "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", - "width": 207, - "x": 104, - "y": 120, - "zOrder": 15, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, - "layer": "", - "name": "BackgroundPainter", - "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", - "width": 0, - "x": 38, - "y": 17, - "zOrder": 14, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, - "layer": "", - "name": "Icon", - "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", - "width": 0, - "x": 204, - "y": 64, - "zOrder": 16, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "keepRatio": true, + "layer": "", + "name": "BackgroundPainter", + "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", + "width": 0, + "x": 38, + "y": 17, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Icon", + "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", + "width": 0, + "x": 204, + "y": 64, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {} } ] } diff --git "a/examples/360\302\260-platformer/assets/rotate-screen-icon.png" "b/examples/360\302\260-platformer/assets/rotate-screen-icon.png" index ba619fae3..a7726dee3 100644 Binary files "a/examples/360\302\260-platformer/assets/rotate-screen-icon.png" and "b/examples/360\302\260-platformer/assets/rotate-screen-icon.png" differ diff --git a/examples/admob/admob.json b/examples/admob/admob.json index 15320cc1f..1f8e3927e 100644 --- a/examples/admob/admob.json +++ b/examples/admob/admob.json @@ -1,7 +1,7 @@ { "firstLayout": "Home", "gdVersion": { - "build": 224, + "build": 245, "major": 5, "minor": 5, "revision": 0 @@ -81,7 +81,9 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [ { "extension": "AdMob", @@ -336,8 +338,7 @@ "name": "Green Button_Pressed.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -361,13 +362,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -557,6 +561,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -599,6 +604,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -606,6 +612,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "StopInitialization", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -615,81 +622,16 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Stop Auto Initialization", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Stop Auto Initialization", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Stop Auto Initialization" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Initialize", + "persistentUuid": "e63398c1-bfc1-4c2a-a35d-eceac9390d09", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -699,81 +641,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Initialize manually", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Initialize manually", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Initialize manually" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToAppOpens", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -783,75 +659,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go To App Opens", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Go To App Opens", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go To App Opens" } } ], @@ -1110,6 +919,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -1181,13 +991,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -1440,6 +1253,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -1482,6 +1296,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -1489,6 +1304,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadPortait", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1498,81 +1314,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Load Portait", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Load Portait", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load Portait" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadLandscape", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1582,81 +1332,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Load Landscape", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Load Landscape", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load Landscape" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Display", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1666,81 +1350,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Display", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Display", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Display" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadAndDisplayPortait", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1750,81 +1368,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Load And Display Portait", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Load And Display Portait", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load And Display Portait" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadAndDisplayLandscape", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1834,81 +1386,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Load And Display Landscape", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Load And Display Landscape", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load And Display Landscape" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToBanners", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1918,81 +1404,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go To Banners", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Go To Banners", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go To Banners" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToRewardedInterstitials", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2002,75 +1422,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go To Rewarded Interstitials", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Go To Rewarded Interstitials", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go To Rewarded Interstitials" } } ], @@ -2507,6 +1860,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -2532,7 +1886,36 @@ "effects": [] } ], - "behaviorsSharedData": [] + "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] }, { "b": 30, @@ -2549,13 +1932,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -2607,21 +1993,6 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "ButtonText", - "persistentUuid": "afa11973-535b-4313-8122-014a2a083083", - "width": 0, - "x": 580, - "y": 420, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, @@ -2809,6 +2180,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -2851,6 +2223,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -2858,6 +2231,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "ConfigureTop", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2867,81 +2241,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Configure top", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Configure top", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Configure top" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Show", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2951,81 +2259,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Show", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Show", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Show" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "ConfigureBottom", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3035,81 +2277,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Configure bottom", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Configure bottom", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Configure bottom" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Hide", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3119,81 +2295,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Hide", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Hide", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Hide" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToInterstitials", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3203,81 +2313,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go to Interstitials", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Go to Interstitials", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to Interstitials" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToAppOpens", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3287,75 +2331,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go to App Opens", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Go to App Opens", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to App Opens" } } ], @@ -3750,6 +2727,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -3775,7 +2753,36 @@ "effects": [] } ], - "behaviorsSharedData": [] + "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] }, { "b": 30, @@ -3792,13 +2799,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -4021,6 +3031,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -4063,6 +3074,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -4070,6 +3082,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Load", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4079,81 +3092,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Load", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Load", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Display", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4163,81 +3110,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Display", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Display", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Display" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadAndDisplay", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4247,81 +3128,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Load And Display", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Load And Display", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load And Display" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToBanners", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4331,81 +3146,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go To Banners", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Go To Banners", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go To Banners" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToRewardedVideos", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4415,75 +3164,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go To Rewarded Videos", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Go To Rewarded Videos", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go To Rewarded Videos" } } ], @@ -4847,6 +3529,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -4872,30 +3555,62 @@ "effects": [] } ], - "behaviorsSharedData": [] - }, - { - "b": 30, - "disableInputWhenNotFocused": true, - "mangledName": "RewardedVideos", - "name": "RewardedVideos", - "r": 30, - "standardSortMethod": true, - "stopSoundsOnStartup": true, - "title": "", - "v": 30, - "uiSettings": { - "grid": false, - "gridType": "rectangular", - "gridWidth": 32, - "gridHeight": 32, - "gridOffsetX": 0, - "gridOffsetY": 0, - "gridColor": 10401023, - "gridAlpha": 0.8, - "snap": true, - "zoomFactor": 1, - "windowMask": false + "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] + }, + { + "b": 30, + "disableInputWhenNotFocused": true, + "mangledName": "RewardedVideos", + "name": "RewardedVideos", + "r": 30, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 30, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": true, + "zoomFactor": 1, + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -5138,6 +3853,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -5180,6 +3896,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -5187,6 +3904,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Load", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5196,81 +3914,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Load", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Load", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Display", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5280,81 +3932,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Display", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Display", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Display" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadAndDisplay", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5364,81 +3950,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Load And Display", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Load And Display", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load And Display" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "ClaimReward", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5448,81 +3968,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Claim Reward", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Claim Reward", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Claim Reward" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToRewardedInterstitials", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5532,81 +3986,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go to Rewarded Interstitials", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Go to Rewarded Interstitials", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to Rewarded Interstitials" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToInterstitials", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5616,75 +4004,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go to Interstitials", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Go to Interstitials", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to Interstitials" } } ], @@ -6123,6 +4444,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -6148,30 +4470,62 @@ "effects": [] } ], - "behaviorsSharedData": [] - }, - { - "b": 30, - "disableInputWhenNotFocused": true, - "mangledName": "RewardedInterstitials", - "name": "RewardedInterstitials", - "r": 30, - "standardSortMethod": true, - "stopSoundsOnStartup": true, - "title": "", - "v": 30, - "uiSettings": { + "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] + }, + { + "b": 30, + "disableInputWhenNotFocused": true, + "mangledName": "RewardedInterstitials", + "name": "RewardedInterstitials", + "r": 30, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 30, + "uiSettings": { "grid": false, "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -6414,6 +4768,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 32, + "lineHeight": 0, "color": "220;220;220" } }, @@ -6456,6 +4811,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "180;180;180" } }, @@ -6463,6 +4819,7 @@ "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Load", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6472,81 +4829,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Load", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Load", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "Display", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6556,81 +4847,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Display", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Display", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Display" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "LoadAndDisplay", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6640,81 +4865,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Load And Display", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Load And Display", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load And Display" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "ClaimReward", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6724,81 +4883,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Claim Reward", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Claim Reward", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Claim Reward" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToAppOpens", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6808,81 +4901,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go to App Opens", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Go to App Opens", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to App Opens" } }, { "assetStoreId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", "name": "GoToRewardedVideos", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6892,75 +4919,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go to Rewarded Videos", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 29, - "g": 99, - "r": 62 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Go to Rewarded Videos", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "62;99;29" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go to Rewarded Videos" } } ], @@ -7399,6 +5359,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -7424,42 +5385,101 @@ "effects": [] } ], - "behaviorsSharedData": [] - } - ], - "externalEvents": [], - "eventsFunctionsExtensions": [ - { - "author": "", - "category": "User interface", - "extensionNamespace": "", - "fullName": "Panel sprite button", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", - "name": "PanelSpriteButton", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", - "shortDescription": "A button that can be customized.", - "version": "1.4.2", - "description": [ - "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", - "", - "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." - ], - "origin": { - "identifier": "PanelSpriteButton", - "name": "gdevelop-extension-store" - }, - "tags": [ + "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] + } + ], + "externalEvents": [], + "eventsFunctionsExtensions": [ + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Panel sprite button", + "gdevelopVersion": ">=5.5.230", + "helpPath": "/objects/button", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", + "name": "PanelSpriteButton", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", + "shortDescription": "A button that can be customized.", + "version": "2.1.1", + "description": [ + "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "", + "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." + ], + "origin": { + "identifier": "PanelSpriteButton", + "name": "gdevelop-extension-store" + }, + "tags": [ "button", "ui" ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -7475,61 +5495,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -7543,562 +5529,598 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" + "comment": "Make sure the cursor position is only checked once per frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ], + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" ] } ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } ] } - ] + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "HasTouchEnded" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "", + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "\"Validated\"" + "0" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "events": [ { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } ] }, { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] } ] } - ] + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -8128,22 +6150,60 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "PanelSpriteButton::ButtonFSM::ResetState" }, "parameters": [ "Object", "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -8178,11 +6238,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -8227,11 +6286,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -8276,11 +6334,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8325,11 +6382,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8351,11 +6407,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -8400,11 +6455,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -8449,11 +6503,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -8502,7 +6555,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -8533,8 +6586,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -8542,14 +6593,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -8558,9 +6622,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -8568,9 +6629,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -8578,9 +6636,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -8588,9 +6643,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -8600,7 +6652,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -8609,17 +6661,314 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, @@ -8640,7 +6989,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -8652,7 +7001,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -8660,14 +7009,24 @@ }, { "type": { - "value": "Create" + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "", "Pressed", - "0", - "0", - "" + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { @@ -8695,63 +7054,26 @@ "=", "1" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Pressed", "=", - "2" + "1" ] }, { "type": { - "value": "TextObject::SetWrapping" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", - "yes" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -8790,18 +7112,47 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ "Object", + "=", + "PressedLabelOffsetY", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -8863,12 +7214,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8903,10 +7255,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -8915,7 +7267,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -8923,7 +7275,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -8934,10 +7286,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -8961,10 +7313,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -8981,10 +7334,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -9013,12 +7367,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -9058,10 +7413,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -9090,12 +7446,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -9147,12 +7504,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -9184,126 +7542,6 @@ } ], "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -9314,22 +7552,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -9551,6 +7774,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -9559,21 +7783,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -9587,18 +7803,18 @@ "type": "object" }, { - "description": "", - "name": "LabelText", + "description": "Text", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -9607,18 +7823,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -9630,12 +7846,11 @@ "objectGroups": [] }, { - "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", - "fullName": "", - "functionType": "Expression", - "name": "CenterWithPaddingY", - "private": true, - "sentence": "", + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -9643,17 +7858,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -9666,65 +7881,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "conditions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SetCenterY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -9734,10 +7919,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -9745,12 +7932,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -9762,126 +7949,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BehaviorActivated" }, "parameters": [ - "\"ShouldActivate\"" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Labels", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -9900,227 +8084,700 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "RightPadding" + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { "value": "0", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" + } ], - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Green Button 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 29, + "g": 99, + "r": 62 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "62;99;29" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Green Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Green Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Green Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Text", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "objectsGroups": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [], - "behaviors": [ + "layers": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "instances": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 80, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "114155f3-90e9-461e-a4cd-6c7b231b4c88", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ] + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "" + } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "b44dba91245ff1ac84a7b450e078194f19321d135fd8a67cd19bc9cb3403fba5", + "assetStoreOriginalName": "Green Button", + "name": "Green Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 29, + "g": 99, + "r": 62 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "lineHeight": 0, + "color": "62;99;29" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Green Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Green Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Green Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + "objectsGroups": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [] + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 80, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "114155f3-90e9-461e-a4cd-6c7b231b4c88", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } - ], - "instances": [] + ] } ] } diff --git a/examples/advanced-projectile/advanced-projectile.json b/examples/advanced-projectile/advanced-projectile.json index 68dc6c018..51286b52b 100644 --- a/examples/advanced-projectile/advanced-projectile.json +++ b/examples/advanced-projectile/advanced-projectile.json @@ -1,13 +1,15 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "landscape", "packageName": "com.example.gamename", @@ -16,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Advanced Projectile", "description": "Control how a projectile object moves including speed, acceleration, distance, and lifetime.", @@ -77,10 +78,18 @@ "placement": "bottom-left", "showWatermark": true }, - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], - "authorUsernames": ["VictrisGames"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "authorUsernames": [ + "VictrisGames" + ], "categories": [], - "playableDevices": ["keyboard", "mobile"], + "playableDevices": [ + "keyboard", + "mobile", + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -92,7 +101,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Tank Bullet (3).png2.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -101,7 +109,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Idle.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -110,7 +117,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Idle2.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -119,7 +125,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Idle3.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -128,7 +133,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Idle4.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -137,7 +141,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Border.png", "kind": "image", "metadata": "", @@ -150,7 +153,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Fill Bar.png", "kind": "image", "metadata": "", @@ -163,7 +165,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Thumb.png", "kind": "image", "metadata": "", @@ -187,7 +188,6 @@ } }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -195,10 +195,12 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -217,13 +219,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.6040838749988867, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -480,9 +485,9 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "0d91b7b0a2a8562a0172b4d5e9bf3d80340f866a030aa7a5f3baf6157840f1c3", "name": "RedHero", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -604,9 +609,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "6c6ee5f9ebae939cbfe344fda8ffc30171127457e4dd03f0054f6ab5a38295d2", "name": "Projectile", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -681,8 +686,8 @@ { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MaxSpeed_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -694,60 +699,13 @@ "LabelMargin": 4, "MaxValue": 600, "InitialValue": 300 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MaxDistance_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -758,60 +716,13 @@ "BarBottomPadding": 4, "LabelMargin": 4, "MaxValue": 500 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "Lifetime_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -823,60 +734,13 @@ "LabelMargin": 4, "StepSize": 0.1, "MaxValue": 3 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MinSpeed_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -886,60 +750,13 @@ "BarRightPadding": 3, "BarBottomPadding": 4, "LabelMargin": 4 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "StartSpeed_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -950,60 +767,13 @@ "BarBottomPadding": 4, "LabelMargin": 4, "MaxValue": 500 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "Acceleration_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1016,53 +786,6 @@ "MinValue": -300, "MaxValue": 300, "InitialValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -1071,7 +794,6 @@ "italic": false, "name": "MaxSpeed_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1085,6 +807,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Max Speed", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1093,7 +837,6 @@ "italic": false, "name": "MinSpeed_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1107,6 +850,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Min Speed", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1115,7 +880,6 @@ "italic": false, "name": "StartSpeed_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1129,6 +893,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Start Speed", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1137,7 +923,6 @@ "italic": false, "name": "Acceleration_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1151,6 +936,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Acceleration", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1159,7 +966,6 @@ "italic": false, "name": "Lifetime_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1173,6 +979,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Lifetime", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1181,7 +1009,6 @@ "italic": false, "name": "LifetimeExpired_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1200,6 +1027,28 @@ "b": 28, "g": 231, "r": 248 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Lifetime\nExpired", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "248;231;28" } }, { @@ -1208,7 +1057,6 @@ "italic": false, "name": "MaxDistanceExceeded_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1227,6 +1075,28 @@ "b": 224, "g": 16, "r": 189 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Max Distance\nExceeded", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "189;16;224" } }, { @@ -1235,7 +1105,6 @@ "italic": false, "name": "MaxDistanceFromStart_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1249,6 +1118,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Max Distance\nFrom Start", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1257,7 +1148,6 @@ "italic": false, "name": "LifetimeValue_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1271,6 +1161,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "12345", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1279,7 +1191,6 @@ "italic": false, "name": "Instructions_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1293,6 +1204,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Click anywhere to shoot", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1301,7 +1234,6 @@ "italic": false, "name": "Title_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1315,9 +1247,93 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Extension: Advanced Projectile", + "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "255;255;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "RedHero" + }, + { + "objectName": "Projectile" + }, + { + "objectName": "MaxSpeed_Slider" + }, + { + "objectName": "MaxDistance_Slider" + }, + { + "objectName": "Lifetime_Slider" + }, + { + "objectName": "MinSpeed_Slider" + }, + { + "objectName": "StartSpeed_Slider" + }, + { + "objectName": "Acceleration_Slider" + }, + { + "objectName": "MaxSpeed_Text" + }, + { + "objectName": "MinSpeed_Text" + }, + { + "objectName": "StartSpeed_Text" + }, + { + "objectName": "Acceleration_Text" + }, + { + "objectName": "Lifetime_Text" + }, + { + "objectName": "LifetimeExpired_Text" + }, + { + "objectName": "MaxDistanceExceeded_Text" + }, + { + "objectName": "MaxDistanceFromStart_Text" + }, + { + "objectName": "LifetimeValue_Text" + }, + { + "objectName": "Instructions_Text" + }, + { + "objectName": "Title_Text" + } + ] + }, "events": [ { "colorB": 228, @@ -1335,7 +1351,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [], @@ -1434,7 +1452,13 @@ "type": { "value": "RotateTowardPosition" }, - "parameters": ["RedHero", "CursorX()", "CursorY()", "600", ""] + "parameters": [ + "RedHero", + "CursorX()", + "CursorY()", + "600", + "" + ] } ] }, @@ -1445,7 +1469,10 @@ "type": { "value": "MouseButtonPressed" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] } ], "actions": [ @@ -1576,7 +1603,11 @@ "type": { "value": "AdvancedProjectile::AdvancedProjectile::IsLifetimeExceeded" }, - "parameters": ["Projectile", "AdvancedProjectile", ""] + "parameters": [ + "Projectile", + "AdvancedProjectile", + "" + ] } ], "actions": [ @@ -1627,7 +1658,11 @@ "type": { "value": "AdvancedProjectile::AdvancedProjectile::IsMaxDistanceExceeded" }, - "parameters": ["Projectile", "AdvancedProjectile", ""] + "parameters": [ + "Projectile", + "AdvancedProjectile", + "" + ] } ], "actions": [ @@ -1680,9 +1715,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 9117784, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -1722,12 +1764,13 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Advanced projectile", - "helpPath": "", + "gdevelopVersion": ">=5.5.222", + "helpPath": "/extensions/advanced-projectile/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWRlY2lzaW9uLWF1dG8iIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsNUg5TDEzLDFMMTcsNUgxNFY5LjQzQzEzLjI1LDkuODkgMTIuNTgsMTAuNDYgMTIsMTEuMTJWNU0xMC40LDE1SDguNUw3LjgsMTNINC42TDMuOSwxNUgyTDUuMiw2SDcuMkwxMC40LDE1TTcuMzUsMTEuNjVMNi4yLDhMNS4wNSwxMS42NUg3LjM1TTIzLDExTDE5LDdWMTBDMTUuMzksOS44NSAxMi4zMSwxMi41NyAxMiwxNi4xN0MxMC40NCwxNi43MiA5LjYyLDE4LjQ0IDEwLjE3LDIwQzEwLjcyLDIxLjU2IDEyLjQ0LDIyLjM4IDE0LDIxLjgzQzE1LjU2LDIxLjI3IDE2LjM4LDE5LjU2IDE1LjgzLDE4QzE1LjUzLDE3LjE0IDE0Ljg1LDE2LjQ3IDE0LDE2LjE3QzE0LjQ3LDEyLjE3IDE4LjQ3LDExLjk3IDE4Ljk1LDExLjk3VjE0Ljk3TDIzLDExWiIgLz48L3N2Zz4=", "name": "AdvancedProjectile", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/4ab6bb9f91ea1110c0c2aabd7fe17e320c1d0ebbb44f56d01885307d7d2e723b_arrow-decision-auto.svg", "shortDescription": "Control how a projectile moves including speed, acceleration, distance, and lifetime.", - "version": "1.0.0", + "version": "1.1.0", "description": [ "Control how a projectile moves including speed, acceleration, distance, and lifetime.", "", @@ -1738,9 +1781,23 @@ "- If the object is moving, acceleration will be in the direction the object is moving", "" ], - "tags": ["projectile", "movement", "acceleration", "speed", "distance"], - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], + "origin": { + "identifier": "AdvancedProjectile", + "name": "gdevelop-extension-store" + }, + "tags": [ + "projectile", + "movement", + "acceleration", + "speed", + "distance" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -1801,8 +1858,7 @@ "textG": 0, "textR": 0 }, - "comment": "Record starting position so Max distance can be calculated", - "comment2": "" + "comment": "Record starting position so Max distance can be calculated" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1812,7 +1868,11 @@ "type": { "value": "AdvancedProjectile::AdvancedProjectile::SetStartingPositionToCurrentPosition" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] }, @@ -1826,17 +1886,20 @@ "textG": 0, "textR": 0 }, - "comment": "Apply starting speed", - "comment2": "" + "comment": "Apply starting speed" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyStartingSpeed" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "StartingSpeed", + "!=", + "0" + ] } ], "actions": [], @@ -1851,8 +1914,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save the speed and angle the object is moving (and then stop the object)", - "comment2": "" + "comment": "Save the speed and angle the object is moving (and then stop the object)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1884,7 +1946,9 @@ "type": { "value": "Arreter" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] } ] }, @@ -1898,8 +1962,7 @@ "textG": 0, "textR": 0 }, - "comment": "If stopped, move in direction the object is facing", - "comment2": "" + "comment": "If stopped, move in direction the object is facing" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1924,7 +1987,7 @@ "parameters": [ "Object", "Object.Angle()", - "Object.Behavior::PropertyStartingSpeed()", + "StartingSpeed", "1" ] } @@ -1940,8 +2003,7 @@ "textG": 0, "textR": 0 }, - "comment": "If moving, move in direction the object is facing", - "comment2": "" + "comment": "If moving, move in direction the object is facing" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1966,7 +2028,7 @@ "parameters": [ "Object", "Object.Variable(__AdvancedProjectile.InitialForceAngle)", - "Object.Behavior::PropertyStartingSpeed()", + "StartingSpeed", "1" ] } @@ -1984,8 +2046,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start Lifetime timer", - "comment2": "" + "comment": "Start Lifetime timer" }, { "type": "BuiltinCommonInstructions::Standard", @@ -2023,13 +2084,21 @@ "type": { "value": "AdvancedProjectile::AdvancedProjectile::DeleteWhenLifetimeExceeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "AdvancedProjectile::AdvancedProjectile::IsLifetimeExceeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -2037,7 +2106,10 @@ "type": { "value": "Delete" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] }, @@ -2048,13 +2120,21 @@ "type": { "value": "AdvancedProjectile::AdvancedProjectile::DeleteWhenDistanceExceeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "AdvancedProjectile::AdvancedProjectile::IsMaxDistanceExceeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -2062,7 +2142,10 @@ "type": { "value": "Delete" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -2083,9 +2166,13 @@ "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyAcceleration" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "Acceleration", + "!=", + "0" + ] } ], "actions": [], @@ -2100,8 +2187,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save the speed the object is moving", - "comment2": "" + "comment": "Save the speed the object is moving" }, { "type": "BuiltinCommonInstructions::Standard", @@ -2130,8 +2216,7 @@ "textG": 0, "textR": 0 }, - "comment": "If stopped, move in direction the object is facing", - "comment2": "" + "comment": "If stopped, move in direction the object is facing" }, { "type": "BuiltinCommonInstructions::Standard", @@ -2156,7 +2241,7 @@ "parameters": [ "Object", "Object.Angle()", - "TimeDelta() * Object.Behavior::PropertyAcceleration()", + "TimeDelta() * Acceleration", "1" ] } @@ -2172,8 +2257,7 @@ "textG": 0, "textR": 0 }, - "comment": "If moving, move in direction the object is facin", - "comment2": "" + "comment": "If moving, move in direction the object is facin" }, { "type": "BuiltinCommonInstructions::Standard", @@ -2198,7 +2282,7 @@ "parameters": [ "Object", "Object.ForceAngle()", - "TimeDelta() * Object.Behavior::PropertyAcceleration()", + "TimeDelta() * Acceleration", "1" ] } @@ -2214,8 +2298,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop the object if it is moving away from object angle. Required for min speed to work.", - "comment2": "" + "comment": "Stop the object if it is moving away from object angle. Required for min speed to work." }, { "type": "BuiltinCommonInstructions::Standard", @@ -2236,7 +2319,9 @@ "type": { "value": "Arreter" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] } ] } @@ -2259,9 +2344,13 @@ "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyMinSpeed" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "MinSpeed", + "!=", + "0" + ] }, { "type": { @@ -2270,7 +2359,7 @@ "parameters": [ "Object", "<", - "Object.Behavior::PropertyMinSpeed()" + "MinSpeed" ] } ], @@ -2290,7 +2379,9 @@ "type": { "value": "Arreter" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] }, { "type": { @@ -2299,7 +2390,7 @@ "parameters": [ "Object", "Object.Angle()", - "Object.Behavior::PropertyMinSpeed()", + "MinSpeed", "1" ] } @@ -2310,9 +2401,13 @@ "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyMaxSpeed" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "MaxSpeed", + "!=", + "0" + ] }, { "type": { @@ -2321,7 +2416,7 @@ "parameters": [ "Object", ">", - "Object.Behavior::PropertyMaxSpeed()" + "MaxSpeed" ] } ], @@ -2341,7 +2436,9 @@ "type": { "value": "Arreter" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] }, { "type": { @@ -2350,7 +2447,7 @@ "parameters": [ "Object", "Object.Variable(__AdvancedProjectile.CurrentForceAngle)", - "Object.Behavior::PropertyMaxSpeed()", + "MaxSpeed", "1" ] } @@ -2397,9 +2494,13 @@ }, { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyMaxDistanceFromStartingPosition" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "MaxDistanceFromStartingPosition", + ">", + "0" + ] }, { "type": { @@ -2408,7 +2509,7 @@ "parameters": [ "DistanceBetweenPositions(Object.Variable(__AdvancedProjectile.StartingX), Object.Variable(__AdvancedProjectile.StartingY), Object.X(), Object.Y())", ">", - "Object.Behavior::PropertyMaxDistanceFromStartingPosition()" + "MaxDistanceFromStartingPosition" ] } ], @@ -2417,7 +2518,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2459,9 +2562,13 @@ }, { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyMaxLifetime" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "MaxLifetime", + ">", + "0" + ] }, { "type": { @@ -2471,7 +2578,7 @@ "Object", "\"__AdvancedProjectile.Lifetime\"", ">", - "Object.Behavior::PropertyMaxLifetime()" + "MaxLifetime" ] } ], @@ -2480,7 +2587,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2516,7 +2625,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxLifetime()"] + "parameters": [ + "MaxLifetime" + ] } ] } @@ -2552,13 +2663,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyMaxLifetime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxLifetime", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -2635,7 +2745,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxDistanceFromStartingPosition()" + "MaxDistanceFromStartingPosition" ] } ] @@ -2672,13 +2782,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyMaxDistanceFromStartingPosition" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxDistanceFromStartingPosition", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -2767,7 +2876,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxSpeed()"] + "parameters": [ + "MaxSpeed" + ] } ] } @@ -2803,13 +2914,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyMaxSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxSpeed", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -2846,7 +2956,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMinSpeed()"] + "parameters": [ + "MinSpeed" + ] } ] } @@ -2882,13 +2994,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyMinSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinSpeed", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -2925,7 +3036,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyAcceleration()"] + "parameters": [ + "Acceleration" + ] } ] } @@ -2961,13 +3074,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyAcceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Acceleration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -3004,7 +3116,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyStartingSpeed()"] + "parameters": [ + "StartingSpeed" + ] } ] } @@ -3040,13 +3154,12 @@ "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyStartingSpeed" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StartingSpeed", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -3068,21 +3181,25 @@ "objectGroups": [] }, { - "description": "Check if delete object when lifetime is exceeded.", - "fullName": "Delete object when lifetime is exceeded", + "description": "Check if automatic deletion is enabled when lifetime is exceeded.", + "fullName": "Automatic deletion is enabled when lifetime is exceeded", "functionType": "Condition", "group": "Advanced projectile configuration", "name": "DeleteWhenLifetimeExceeded", - "sentence": "_PARAM0_ delete object when lifetime is exceeded", + "sentence": "Automatic deletion is enabled when lifetime is exceeded on _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyDeleteWhenLifetimeExceeded" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "DeleteWhenLifetimeExceeded", + "True", + "" + ] } ], "actions": [ @@ -3090,7 +3207,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3111,12 +3230,12 @@ "objectGroups": [] }, { - "description": "Change if delete object when lifetime is exceeded.", - "fullName": "Delete object when lifetime is exceeded", + "description": "Change automatic deletion of object when lifetime is exceeded.", + "fullName": "Change automatic deletion when lifetime is exceeded", "functionType": "Action", "group": "Advanced projectile configuration", "name": "SetDeleteWhenLifetimeExceeded", - "sentence": "_PARAM0_ delete object when lifetime is exceeded: _PARAM2_", + "sentence": "Enable automatic deletion of _PARAM0_ when lifetime is exceeded: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3124,17 +3243,25 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyDeleteWhenLifetimeExceeded" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "DeleteWhenLifetimeExceeded", + "False", + "" + ] } ] }, @@ -3143,17 +3270,25 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyDeleteWhenLifetimeExceeded" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "DeleteWhenLifetimeExceeded", + "True", + "" + ] } ] } @@ -3181,21 +3316,25 @@ "objectGroups": [] }, { - "description": "Check if delete object when distance (from starting position) is exceeded.", - "fullName": "Delete object when distance (from starting position) is exceeded", + "description": "Check if automatic deletion is enabled when distance from starting position is exceeded.", + "fullName": "Automatic deletion is enabled when distance from starting position is exceeded", "functionType": "Condition", "group": "Advanced projectile configuration", "name": "DeleteWhenDistanceExceeded", - "sentence": "_PARAM0_ delete object when distance (from starting position) is exceeded", + "sentence": "Automatic deletion is enabled when distance from starting position is exceeded on _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::PropertyDeleteWhenDistanceExceeded" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "DeleteWhenDistanceExceeded", + "True", + "" + ] } ], "actions": [ @@ -3203,7 +3342,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3224,12 +3365,12 @@ "objectGroups": [] }, { - "description": "Change if delete object when distance (from starting position) is exceeded.", - "fullName": "Delete object when distance (from starting position) is exceeded", + "description": "Change automatic deletion when distance from starting position is exceeded.", + "fullName": "Change automatic deletion when distance from starting position is exceeded", "functionType": "Action", "group": "Advanced projectile configuration", "name": "SetDeleteWhenDistanceExceeded", - "sentence": "_PARAM0_ delete object when distance (from starting position) is exceeded: _PARAM2_", + "sentence": "Enable automatic deletion of _PARAM0_ when distance from starting position is exceeded: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3237,17 +3378,25 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyDeleteWhenDistanceExceeded" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "DeleteWhenDistanceExceeded", + "False", + "" + ] } ] }, @@ -3256,17 +3405,25 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "AdvancedProjectile::AdvancedProjectile::SetPropertyDeleteWhenDistanceExceeded" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "DeleteWhenDistanceExceeded", + "True", + "" + ] } ] } @@ -3301,9 +3458,6 @@ "unit": "Second", "label": "Lifetime", "description": "Use \"0\" to ignore this property.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxLifetime" }, { @@ -3312,9 +3466,6 @@ "unit": "Pixel", "label": "Max distance from starting position", "description": "Use \"0\" to ignore this property.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxDistanceFromStartingPosition" }, { @@ -3323,9 +3474,6 @@ "unit": "PixelSpeed", "label": "Max speed", "description": "Speed from object forces will not exceed this value. Use \"0\" to ignore this property.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxSpeed" }, { @@ -3334,9 +3482,6 @@ "unit": "PixelSpeed", "label": "", "description": "Speed from object forces will not go below this value. Use \"0\" to ignore this property.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinSpeed" }, { @@ -3345,9 +3490,6 @@ "unit": "PixelAcceleration", "label": "Acceleration", "description": "Negative acceleration can be used to stop a projectile.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Acceleration" }, { @@ -3356,29 +3498,18 @@ "unit": "PixelSpeed", "label": "Starting speed", "description": "Object will move in the direction it is facing when it is created. Use \"0\" to ignore this property.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StartingSpeed" }, { "value": "true", "type": "Boolean", - "label": "Delete object when lifetime is exceeded", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, + "label": "Delete when lifetime is exceeded", "name": "DeleteWhenLifetimeExceeded" }, { "value": "true", "type": "Boolean", - "label": "Delete object when distance (from starting position) is exceeded", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, + "label": "Delete when distance from starting position is exceeded", "name": "DeleteWhenDistanceExceeded" } ], @@ -3392,12 +3523,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -3407,13 +3539,49 @@ "identifier": "PanelSpriteSlider", "name": "gdevelop-extension-store" }, - "tags": ["draggable", "slider", "ui", "widget"], + "tags": [ + "draggable", + "slider", + "ui", + "widget" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -3437,7 +3605,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValue()"] + "parameters": [ + "CurrentValue" + ] } ] } @@ -3472,21 +3642,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "StepSize", + "=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -3496,21 +3669,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "StepSize", + "!=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -3547,7 +3723,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMinValue()"] + "parameters": [ + "MinValue" + ] } ] } @@ -3583,13 +3761,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -3638,7 +3815,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxValue()"] + "parameters": [ + "MaxValue" + ] } ] } @@ -3674,13 +3853,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -3769,7 +3947,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyStepSize()"] + "parameters": [ + "StepSize" + ] } ] } @@ -3805,13 +3985,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -3850,40 +4029,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Value" + "name": "CurrentValue" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -3903,57 +4066,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -3967,448 +4100,430 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } + ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], - "actions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": ["Object", "Behavior", "=", "0"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -4417,13 +4532,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -4433,50 +4547,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -4506,15 +4721,23 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -4546,9 +4769,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -4556,7 +4783,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4588,9 +4817,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -4598,7 +4831,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4630,9 +4865,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -4640,7 +4879,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4672,9 +4913,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -4682,8 +4927,10 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] - } + "parameters": [ + "True" + ] + } ] }, { @@ -4691,11 +4938,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -4706,7 +4952,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4738,11 +4986,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -4753,7 +5000,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4785,11 +5034,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -4800,7 +5048,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4835,7 +5085,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -4865,8 +5117,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -4874,14 +5124,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -4890,9 +5153,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -4900,9 +5160,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -4910,9 +5167,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -4920,9 +5174,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -4932,10 +5183,267 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -4943,31 +5451,28 @@ "name": "onCreated", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload.", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "Thumb", + "Draggable", + "" ] } ] @@ -4982,8 +5487,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances.", - "comment2": "" + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4991,39 +5495,71 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": ["", "Background", "0", "0", ""] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "FillBar", "0", "0", ""] + "parameters": [ + "FillBar", + "Anchor", + "" + ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "Thumb", "0", "0", ""] + "parameters": [ + "Thumb", + "Anchor", + "" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Background", "=", "1"] + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - FillBar.Width()" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["FillBar", "=", "2"] - }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - FillBar.Height()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Thumb", "=", "3"] + "parameters": [ + "PreviousInitialValue", + "=", + "InitialValue" + ] } ] }, @@ -5037,8 +5573,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the label that is displayed over the thumb.", - "comment2": "" + "comment": "Create the label that is displayed over the thumb." }, { "type": "BuiltinCommonInstructions::Standard", @@ -5048,25 +5583,21 @@ "type": { "value": "Create" }, - "parameters": ["", "Label", "0", "0", ""] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": ["Label", "=", "4"] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": ["Label", "no"] + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -5080,8 +5611,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass the configuration to the behavior.", - "comment2": "" + "comment": "Pass the configuration to the behavior." }, { "type": "BuiltinCommonInstructions::Standard", @@ -5091,7 +5621,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -5100,7 +5633,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -5114,19 +5647,28 @@ "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Thumb", ""] + "parameters": [ + "Thumb", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["FillBar", ""] + "parameters": [ + "FillBar", + "" + ] } ] } @@ -5151,17 +5693,14 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] }, @@ -5170,24 +5709,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -5197,7 +5736,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -5221,86 +5760,323 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": ["Background", "ButtonFSM"] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" + "value": "BehaviorActivated" }, - "parameters": ["Thumb", "Draggable"] - }, + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [], + "events": [ { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "value": "DraggableBehavior::Dragged" }, - "parameters": ["Background", "ButtonFSM", ""] - }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" }, - "parameters": ["Object"] + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] } ], "actions": [ @@ -5308,301 +6084,61 @@ "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "ResetObjectTimer" }, - "parameters": ["Label", "\"HideBack\""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "CompareObjectTimer" }, - "parameters": ["Object"] + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": ["Object"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": ["Label", ""] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": ["Label"] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": ["Object", "=", "1"] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": ["Object", ""] + } + ], + "parameters": [] } ] } @@ -5638,19 +6174,30 @@ "type": { "value": "DraggableBehavior::Dragged" }, - "parameters": ["Thumb", "Draggable"] + "parameters": [ + "Thumb", + "Draggable" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressed" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] } ] } @@ -5660,7 +6207,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5690,7 +6239,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::Value()"] + "parameters": [ + "FillBar.Slider::Value()" + ] } ] } @@ -5727,7 +6278,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -5735,7 +6286,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -5772,7 +6326,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MinValue()"] + "parameters": [ + "FillBar.Slider::MinValue()" + ] } ] } @@ -5809,21 +6365,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -5860,7 +6413,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MaxValue()"] + "parameters": [ + "FillBar.Slider::MaxValue()" + ] } ] } @@ -5897,21 +6452,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -5948,7 +6500,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::StepSize()"] + "parameters": [ + "FillBar.Slider::StepSize()" + ] } ] } @@ -5985,7 +6539,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -6021,9 +6575,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] } ], "actions": [ @@ -6031,7 +6589,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -6060,23 +6620,33 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "ShowLabelAtChanges", + "False", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -6085,23 +6655,34 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] } ] } @@ -6121,53 +6702,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -6183,7 +6717,13 @@ "type": { "value": "PanelSpriteSlider::Slider::Size" }, - "parameters": ["FillBar", "Slider", ">", "0", ""] + "parameters": [ + "FillBar", + "Slider", + ">", + "0", + "" + ] } ], "actions": [], @@ -6194,10 +6734,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -6215,14 +6756,18 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { "type": { "value": "SetCenterY" }, - "parameters": ["Thumb", "=", "FillBar.CenterY()"] + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] } ] }, @@ -6232,10 +6777,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -6244,7 +6790,11 @@ "type": { "value": "SetCenterX" }, - "parameters": ["Label", "=", "Thumb.CenterX()"] + "parameters": [ + "Label", + "=", + "Thumb.CenterX()" + ] }, { "type": { @@ -6253,14 +6803,18 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, - "parameters": ["Label", "=", "-Object.Angle()"] + "parameters": [ + "Label", + "=", + "-Object.Angle()" + ] } ] } @@ -6277,74 +6831,6 @@ ], "objectGroups": [] }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.PropertyBarLeftPadding()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "fullName": "", "functionType": "Expression", @@ -6361,7 +6847,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -6398,8 +6884,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass configuration to the behavior and update children.", - "comment2": "" + "comment": "Pass configuration to the behavior and update children." }, { "type": "BuiltinCommonInstructions::Standard", @@ -6412,9 +6897,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -6424,7 +6908,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -6435,7 +6919,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -6464,9 +6948,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -6474,13 +6962,21 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "yes"] + "parameters": [ + "Thumb", + "Draggable", + "yes" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "yes"] + "parameters": [ + "Background", + "ButtonFSM", + "yes" + ] } ] }, @@ -6490,9 +6986,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -6500,19 +7000,29 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "no"] + "parameters": [ + "Thumb", + "Draggable", + "no" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "no"] + "parameters": [ + "Background", + "ButtonFSM", + "no" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] } @@ -6546,7 +7056,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Background", "ButtonFSM"] + "parameters": [ + "Background", + "ButtonFSM" + ] } ], "actions": [ @@ -6554,7 +7067,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -6575,100 +7090,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -6676,8 +7190,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -6686,8 +7198,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -6696,121 +7210,308 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["FillBar"], + "extraInformation": [ + "FillBar" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, { "value": "", - "type": "Boolean", - "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Label"], - "hidden": true, - "name": "ShowLabel" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } + "type": "Boolean", + "label": "", + "description": "Only used by the scene editor.", + "extraInformation": [ + "Label" + ], + "choices": [], + "hidden": true, + "name": "ShowLabel" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" + } + ], + "variants": [ + { + "areaMaxX": 215, + "areaMaxY": 18, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", + "assetStoreOriginalName": "Square Blue Slider", + "name": "Square Blue Slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 16, + "color": { + "b": 221, + "g": 221, + "r": 221 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "221;221;221" + } + }, + { + "assetStoreId": "", + "bottomMargin": 3, + "height": 21, + "leftMargin": 3, + "name": "Thumb", + "rightMargin": 3, + "texture": "Square Blue Slider Thumb.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 21, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 1, + "height": 11, + "leftMargin": 1, + "name": "FillBar", + "rightMargin": 1, + "texture": "Square Blue Slider Fill Bar.png", + "tiled": false, + "topMargin": 1, + "type": "PanelSpriteObject::PanelSprite", + "width": 209, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 4, + "height": 18, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square Blue Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 215, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] } - ] + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 11, + "keepRatio": true, + "layer": "", + "name": "FillBar", + "persistentUuid": "92813097-aee7-4422-8421-125e3ed61986", + "width": 209, + "x": 3, + "y": 3, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Thumb", + "persistentUuid": "ac167400-9a98-4f22-a0a2-8b28626074a6", + "width": 0, + "x": 194, + "y": -2, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -6821,39 +7522,30 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Fire bullets", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", - "shortDescription": "Fire bullets, manage ammo, reloading, and overheating.", - "version": "0.6.1", + "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", + "version": "0.9.1", "description": [ - "Fire bullets, manage ammo, reloading, and overheating.", + "This extension allows objects to fire bullets. To use it, add the behavior to the object that will shoot, then use the provided action to launch another object as the bullet.", "", - "Firing bullets:", - "- Cooldown: Time between shots (seconds)", - "- Bullet Quantity: Number of bullets created each time Fire Bullet action is used. ", - "- Firing Arc: Range of angles (in degrees) that bullets will shoot. Bullets are evenly spread within this range.", - "- Rotate bullet: Change the angle of each bullet to match the direction it is travelling (enabled by default)", - "- Angle Variance: Each bullet trajectory will be adjusted by a random value within this range (degrees)", - "- Bullet speed variance: Each bullet speed will be adjusted by a random value within this range (pixels/second)", + "The properties of the behavior can be used to customize:", + "- Cooldown between shots", + "- Firing multiple bullets at a time ([open the project online](https://editor.gdevelop.io/?project=example://fire-bullet))", + "- Ammo management", + "- Overheat", "", - " Ammo:", - "- Starting ammo", - "- Max ammo", - "- Shots per reload. Use 0 to disable reloading", - "- Reload duration", - "- Automatic reloading is enabled by default, but it can also be done manually.", + "The speed can be specified when using the actions to fire the bullets.", + "The bullets are automatically given a permanent force to make them move (no need to use a linear movement or move them with another behavior).", "", - "Overheat:", - "- Heat increase per shot. Object is Overheated when Heat reaches 1.", - "- Cooling rate per second", - "- When overheated, the object cannot fire any bullets", + "It can be used for:", + "- Twin-stick shooters ([open the project online](https://editor.gdevelop.io/?project=example://conviction-of-gun-dude-desktop))", + "- Shoot'em up ([open the project online](https://editor.gdevelop.io/?project=example://space-shooter))", "", - "Statistics:", - "- Total bullets created", - "- Total shots taken", - "- Total reloads completed" + "A simple example shows how to make firing patterns ([open the project online](https://editor.gdevelop.io/?project=example://firing-patterns))." ], "origin": { "identifier": "FireBullet", @@ -6877,10 +7569,12 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "Fire bullets, manage ammo, reloading, and overheating.", + "description": "Fire bullets, manage ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior action in your events to fire another object as a bullet. This action will also make the bullet move (using a permanent force) at the speed specified in the action.", "fullName": "Fire bullets", "name": "FireBullet", "objectType": "", @@ -6906,24 +7600,22 @@ }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "Object.Behavior::PropertyStartingAmmo()" + "StartingAmmo" ] }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -6969,154 +7661,151 @@ "textG": 0, "textR": 0 }, - "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\".", - "comment2": "" + "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\"." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "HasJustFired", + "True", + "" + ] } ], - "actions": [], - "events": [ + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Reset firing cooldown", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Object", - "\"__FireBullet.FiringCooldown\"" - ] - } - ] - } - ], - "parameters": [] + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "False", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.FiringCooldown\"" + ] }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TotalShotsFired", + "+", + "1" + ] + } + ], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Update ammo", + "name": "Ammo", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Subtract 1 from ammo (if not unlimited ammo)", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, - "value": "FireBullet::FireBullet::PropertyUnlimitedAmmo" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "UnlimitedAmmo", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "-", "1"] + "parameters": [ + "AmmoQuantity", + "=", + "max(0, AmmoQuantity - 1)" + ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update reloading counter", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsPerReload" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "ShotsPerReload", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "-", "1"] + "parameters": [ + "ShotsBeforeNextReload", + "-", + "1" + ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Automatically reload gun when needed", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "AutomaticReloading", + "True", + "" + ] }, { "type": { "value": "FireBullet::FireBullet::IsReloadNeeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsReloadInProgress" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -7124,7 +7813,11 @@ "type": { "value": "FireBullet::FireBullet::ReloadAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -7136,70 +7829,46 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Update Overheat", + "name": "Overheat", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Increase heat (if needed)", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHeatIncreasePerShot" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "HeatIncreasePerShot", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "+", - "Object.Behavior::PropertyHeatIncreasePerShot()" + "HeatIncreasePerShot" ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if this caused overheat", - "comment2": "" - }, + } + ], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyOverheatDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OverheatDuration", ">", "0" ] @@ -7208,7 +7877,11 @@ "type": { "value": "FireBullet::FireBullet::IsOverheated" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -7227,54 +7900,6 @@ } ], "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update statistics", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalShotsFired" - }, - "parameters": ["Object", "Behavior", "+", "1"] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Reset firing detection", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::SetPropertyHasJustFired" - }, - "parameters": ["Object", "Behavior", "="] - } - ] - } - ], - "parameters": [] } ] } @@ -7286,7 +7911,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Reload gun when needed", + "name": "Reload", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -7300,8 +7925,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect when reload is completed", - "comment2": "" + "comment": "Detect when reload is completed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7310,7 +7934,11 @@ "type": { "value": "FireBullet::FireBullet::IsReloadInProgress" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { @@ -7320,22 +7948,30 @@ "Object", "\"__FireBullet.ReloadingTimer\"", ">=", - "Object.Behavior::PropertyReloadDuration()" + "ReloadDuration" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalReloadsCompleted" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "+", "1"] + "parameters": [ + "TotalReloadsCompleted", + "+", + "1" + ] }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadInProgress" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "ReloadInProgress", + "False", + "" + ] } ], "events": [ @@ -7346,19 +7982,22 @@ "type": { "value": "FireBullet::FireBullet::IsUnlimitedAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -7373,8 +8012,7 @@ "textG": 0, "textR": 0 }, - "comment": "Only reload the amount of ammo available", - "comment2": "" + "comment": "Only reload the amount of ammo available" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7384,19 +8022,22 @@ "inverted": true, "value": "FireBullet::FireBullet::IsUnlimitedAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "min(Object.Behavior::PropertyShotsPerReload(), Object.Behavior::PropertyAmmoQuantity())" + "min(ShotsPerReload, AmmoQuantity)" ] } ] @@ -7411,7 +8052,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Reduce heat level (based on cooling rate)", + "name": "Cooling", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -7423,7 +8064,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object.Behavior::HeatLevel()", + "HeatLevel", ">", "0" ] @@ -7436,21 +8077,24 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyExponentialCoolingRate" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "ExponentialCoolingRate", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "=", - "max(0, Object.Behavior::PropertyHeatLevel() - TimeDelta() * Object.Behavior::PropertyExponentialCoolingRate() * Object.Behavior::PropertyHeatLevel())" + "max(0, HeatLevel - TimeDelta() * ExponentialCoolingRate * HeatLevel)" ] } ] @@ -7460,21 +8104,24 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyLinearCoolingRate" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "LinearCoolingRate", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "=", - "max(0, Object.Behavior::PropertyHeatLevel() - TimeDelta() * Object.Behavior::PropertyLinearCoolingRate())" + "max(0, HeatLevel - TimeDelta() * LinearCoolingRate)" ] } ] @@ -7501,44 +8148,101 @@ "objectGroups": [] }, { - "description": "Fire bullets toward a position.", + "description": "Fire bullets toward an object at a specified speed.", + "fullName": "Fire bullets toward an object", + "functionType": "Action", + "name": "FireTowardObject", + "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward _PARAM5_ with speed _PARAM6_ px/s", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "Object.AngleToObject(TargetObject)", + "Speed", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "X position, where to create the bullet", + "name": "XPosition", + "type": "expression" + }, + { + "description": "Y position, where to create the bullet", + "name": "YPosition", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "Target object", + "name": "TargetObject", + "type": "objectList" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Fire bullets toward a position at a specified speed.", "fullName": "Fire bullets toward a position", "functionType": "Action", "name": "FireTowardPosition", "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward position _PARAM5_;_PARAM6_ with speed _PARAM7_ px/s", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Calculate the trajectory angle and use the \"Fire bullets\" action", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::Fire" - }, - "parameters": [ - "Object", - "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "Object.AngleToPosition(GetArgumentAsNumber(\"TargetXPosition\"),GetArgumentAsNumber(\"TargetYPosition\"))", - "GetArgumentAsNumber(\"Speed\")", - "" - ] - } + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "Object.AngleToPosition(TargetXPosition, TargetYPosition)", + "Speed", + "" ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -7566,7 +8270,7 @@ { "description": "The bullet object", "name": "Bullet", - "type": "objectList" + "type": "objectListOrEmptyIfJustDeclared" }, { "description": "Target X position", @@ -7587,135 +8291,170 @@ "objectGroups": [] }, { - "description": "Fire bullets in the direction of a given angle.", + "description": "Fire bullets in the direction of a given angle at a specified speed.", "fullName": "Fire bullets toward an angle", "functionType": "Action", "name": "Fire", "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward angle _PARAM5_ and speed _PARAM6_ px/s", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check if ready to shoot", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::IsReadyToShoot" + "value": "BuiltinCommonInstructions::CompareNumbers" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "BulletQuantity", + "=", + "1" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHasJustFired" + "value": "FireBullet::FireBullet::FireSingleBullet" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "Angle", + "Speed", + "" + ] } - ], - "events": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Single bullet", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PropertyBulletQuantity()", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::FireSingleBullet" - }, - "parameters": [ - "Object", - "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "GetArgumentAsNumber(\"Angle\")", - "GetArgumentAsNumber(\"Speed\")", - "" - ] - } - ] - } - ], - "parameters": [] - }, + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "BulletQuantity", + ">", + "1" + ] + } + ], + "actions": [], + "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Multiple bullets", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "BulletQuantity", + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PropertyBulletQuantity()", - ">", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::FiringArc" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "360", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "MultiShotAngle", + "=", + "Angle + lerp(-FiringArc / 2, FiringArc / 2, BulletIndex / (BulletQuantity - 1)) " + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "ModVarObjet" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "__FireBullet.CurrentBulletAngle", - "=", - "GetArgumentAsNumber(\"Angle\") - Object.Behavior::PropertyFiringArc()/2" - ] + "comment": "When firing in a full circle, prevent first and last bullet from using the same angle" }, { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.BatchOrderID", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::FiringArc" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "360", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "MultiShotAngle", + "=", + "Angle + lerp(-FiringArc / 2, FiringArc / 2, BulletIndex / BulletQuantity) " + ] + } ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Object.Behavior::PropertyBulletQuantity()", + "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { @@ -7725,55 +8464,22 @@ "parameters": [ "Object", "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", + "XPosition", + "YPosition", "Bullet", - "Object.Variable(__FireBullet.CurrentBulletAngle) + RandomInRange(-Object.Behavior::PropertyAngleVariance(),Object.Behavior::PropertyAngleVariance())", - "GetArgumentAsNumber(\"Speed\")", + "MultiShotAngle", + "Speed", "" ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move temp variable to the next angle a bullet will be sent", - "comment2": "" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.CurrentBulletAngle", - "+", - "Object.Behavior::PropertyFiringArc() / (Object.Behavior::PropertyBulletQuantity() - 1)" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.BatchOrderID", - "+", - "1" - ] - } + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BulletIndex", + "+", + "1" ] } ] @@ -7781,12 +8487,23 @@ ] } ], - "parameters": [] + "variables": [ + { + "folded": true, + "name": "MultiShotAngle", + "type": "number", + "value": 0 + }, + { + "name": "BulletIndex", + "type": "number", + "value": 0 + } + ] } ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -7814,7 +8531,7 @@ { "description": "The bullet object", "name": "Bullet", - "type": "objectList" + "type": "objectListOrEmptyIfJustDeclared" }, { "description": "Angle of the bullet, in degrees", @@ -7857,8 +8574,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create bullet", - "comment2": "" + "comment": "Create bullet" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7871,9 +8587,9 @@ "parameters": [ "", "Bullet", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Object.Behavior::PropertyBulletLayer()" + "XPosition", + "YPosition", + "BulletLayer" ] } ], @@ -7888,8 +8604,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move bullet (apply angle and bullet speed variances)", - "comment2": "" + "comment": "Move bullet (apply angle and bullet speed variances)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7897,13 +8612,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRandomizedAngle" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RandomizedAngle", "=", - "GetArgumentAsNumber(\"Angle\") + RandomInRange(-Object.Behavior::PropertyAngleVariance(), Object.Behavior::PropertyAngleVariance())" + "Angle + RandomInRange(-AngleVariance, AngleVariance)" ] }, { @@ -7912,8 +8626,8 @@ }, "parameters": [ "Bullet", - "Object.Behavior::PropertyRandomizedAngle()", - "GetArgumentAsNumber(\"Speed\") + RandomInRange(-Object.Behavior::PropertyBulletSpeedVariance(), Object.Behavior::PropertyBulletSpeedVariance())", + "RandomizedAngle", + "Speed + RandomInRange(-BulletSpeedVariance, BulletSpeedVariance)", "1" ] } @@ -7929,70 +8643,21 @@ "textG": 0, "textR": 0 }, - "comment": "Add identifier variables (to enable advanced picking by users)", - "comment2": "" + "comment": "Rotate newly created bullet, if needed" }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Bullet", - "__FireBullet.BulletID", - "=", - "Object.Behavior::PropertyTotalBulletsCreated()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Bullet", - "__FireBullet.BatchID", - "=", - "Object.Behavior::PropertyTotalShotsFired()" - ] - }, + "conditions": [ { "type": { - "value": "ModVarObjet" + "value": "BooleanVariable" }, "parameters": [ - "Bullet", - "__FireBullet.BatchOrderID", - "=", - "0" + "RotateBullet", + "True", + "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Rotate newly created bullet, if needed", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "FireBullet::FireBullet::PropertyRotateBullet" - }, - "parameters": ["Object", "Behavior"] - } ], "actions": [ { @@ -8002,7 +8667,7 @@ "parameters": [ "Bullet", "=", - "Object.Behavior::PropertyRandomizedAngle()" + "RandomizedAngle" ] } ] @@ -8019,8 +8684,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update statistics", - "comment2": "" + "comment": "Update statistics" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8028,9 +8692,13 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalBulletsCreated" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "+", "1"] + "parameters": [ + "TotalBulletsCreated", + "+", + "1" + ] } ] } @@ -8063,7 +8731,7 @@ { "description": "The bullet object", "name": "Bullet", - "type": "objectList" + "type": "objectListOrEmptyIfJustDeclared" }, { "description": "Angle of the bullet, in degrees", @@ -8093,15 +8761,23 @@ "inverted": true, "value": "FireBullet::FireBullet::IsOutOfAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadInProgress" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "ReloadInProgress", + "True", + "" + ] }, { "type": { @@ -8138,26 +8814,18 @@ "name": "HasJustFired", "sentence": "_PARAM0_ has just fired", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["False"] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "HasJustFired", + "True", + "" + ] } ], "actions": [ @@ -8165,7 +8833,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -8198,9 +8868,13 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyRotateBullet" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "RotateBullet", + "True", + "" + ] } ], "actions": [ @@ -8208,7 +8882,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -8244,7 +8920,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyFiringArc()"] + "parameters": [ + "FiringArc" + ] } ] } @@ -8280,13 +8958,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyFiringArc" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FiringArc", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8333,7 +9010,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -8376,7 +9053,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyAngleVariance()"] + "parameters": [ + "AngleVariance" + ] } ] } @@ -8412,13 +9091,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAngleVariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AngleVariance", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8465,7 +9143,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -8509,7 +9187,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyBulletSpeedVariance()" + "BulletSpeedVariance" ] } ] @@ -8546,13 +9224,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletSpeedVariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletSpeedVariance", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8599,7 +9276,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -8643,7 +9320,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyBulletQuantity()" + "BulletQuantity" ] } ] @@ -8680,13 +9357,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletQuantity", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8733,7 +9409,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -8774,13 +9450,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletLayer" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletLayer", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8820,17 +9495,25 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"RotateBullet\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRotateBullet" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "RotateBullet", + "False", + "" + ] } ] }, @@ -8839,17 +9522,25 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"RotateBullet\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRotateBullet" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "RotateBullet", + "True", + "" + ] } ] } @@ -8869,7 +9560,7 @@ { "defaultValue": "yes", "description": "Rotate bullet to match trajetory", - "name": "RotateBullet", + "name": "Value", "optional": true, "type": "yesorno" } @@ -8890,17 +9581,25 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"UnlimitedAmmo\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyUnlimitedAmmo" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "UnlimitedAmmo", + "False", + "" + ] } ] }, @@ -8909,17 +9608,25 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"UnlimitedAmmo\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyUnlimitedAmmo" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "UnlimitedAmmo", + "True", + "" + ] } ] } @@ -8939,7 +9646,7 @@ { "defaultValue": "yes", "description": "Unlimited ammo", - "name": "UnlimitedAmmo", + "name": "Value", "optional": true, "type": "yesorno" } @@ -8962,7 +9669,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyFireCooldown()"] + "parameters": [ + "FireCooldown" + ] } ] } @@ -8998,13 +9707,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyFireCooldown" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FireCooldown", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9051,7 +9759,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"NewCooldown\")", + "Value", "" ] } @@ -9072,7 +9780,7 @@ }, { "description": "Cooldown in seconds", - "name": "NewCooldown", + "name": "Value", "type": "expression" } ], @@ -9095,7 +9803,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyReloadDuration()" + "ReloadDuration" ] } ] @@ -9132,13 +9840,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ReloadDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9185,7 +9892,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -9229,7 +9936,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyOverheatDuration()" + "OverheatDuration" ] } ] @@ -9266,13 +9973,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyOverheatDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OverheatDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9319,7 +10025,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -9362,7 +10068,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyAmmoQuantity()"] + "parameters": [ + "AmmoQuantity" + ] } ] } @@ -9398,13 +10106,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "GetArgumentAsNumber(\"Value\")" + "max(0, Value)" ] } ] @@ -9451,7 +10158,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "max(0, Value)", "" ] } @@ -9495,7 +10202,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyHeatIncreasePerShot()" + "HeatIncreasePerShot" ] } ] @@ -9532,13 +10239,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatIncreasePerShot" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatIncreasePerShot", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9585,7 +10291,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -9628,7 +10334,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxAmmo()"] + "parameters": [ + "MaxAmmo" + ] } ] } @@ -9664,13 +10372,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyMaxAmmo" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxAmmo", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9680,21 +10387,24 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyMaxAmmo" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "MaxAmmo", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "min(Object.Behavior::MaxAmmo(),Object.Behavior::AmmoQuantity())" + "min(MaxAmmo, AmmoQuantity)" ] } ] @@ -9741,7 +10451,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -9782,9 +10492,13 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalShotsFired" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TotalShotsFired", + "=", + "0" + ] } ] } @@ -9818,9 +10532,13 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalBulletsCreated" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TotalBulletsCreated", + "=", + "0" + ] } ] } @@ -9854,9 +10572,13 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalReloadsCompleted" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TotalReloadsCompleted", + "=", + "0" + ] } ] } @@ -9893,7 +10615,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -9930,13 +10652,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsPerReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsPerReload", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -9946,26 +10667,24 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsBeforeNextReload" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", ">", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -10012,7 +10731,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -10053,9 +10772,13 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAutomaticReloading" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "="] + "parameters": [ + "AutomaticReloading", + "False", + "" + ] } ] }, @@ -10064,17 +10787,25 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAutomaticReloading" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "AutomaticReloading", + "True", + "" + ] } ] } @@ -10118,7 +10849,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyLinearCoolingRate()" + "LinearCoolingRate" ] } ] @@ -10155,13 +10886,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyLinearCoolingRate" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LinearCoolingRate", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -10208,7 +10938,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -10252,7 +10982,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyExponentialCoolingRate()" + "ExponentialCoolingRate" ] } ] @@ -10289,13 +11019,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyExponentialCoolingRate" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ExponentialCoolingRate", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -10343,7 +11072,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -10384,13 +11113,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "+", - "GetArgumentAsNumber(\"AmmoGained\")" + "AmmoGained" ] } ] @@ -10405,29 +11133,31 @@ "textG": 0, "textR": 0 }, - "comment": "If Max Ammo is set, do not exceed the value", - "comment2": "" + "comment": "If Max Ammo is set, do not exceed the value" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyMaxAmmo" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "MaxAmmo", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "min(Object.Behavior::MaxAmmo(),Object.Behavior::AmmoQuantity())" + "min(MaxAmmo, AmmoQuantity)" ] } ] @@ -10439,13 +11169,21 @@ "type": { "value": "FireBullet::FireBullet::IsReloadNeeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "AutomaticReloading", + "True", + "" + ] } ], "actions": [ @@ -10453,7 +11191,11 @@ "type": { "value": "FireBullet::FireBullet::ReloadAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -10494,7 +11236,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyBulletLayer()"] + "parameters": [ + "BulletLayer" + ] } ] } @@ -10534,7 +11278,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "min(1,Object.Behavior::PropertyHeatLevel())" + "min(1, HeatLevel)" ] } ] @@ -10575,7 +11319,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalShotsFired()" + "TotalShotsFired" ] } ] @@ -10616,7 +11360,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalBulletsCreated()" + "TotalBulletsCreated" ] } ] @@ -10657,7 +11401,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalReloadsCompleted()" + "TotalReloadsCompleted" ] } ] @@ -10698,7 +11442,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyShotsBeforeNextReload()" + "ShotsBeforeNextReload" ] } ] @@ -10739,7 +11483,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "max(0,Object.Behavior::Cooldown() - Object.ObjectTimerElapsedTime(\"__FireBullet.FiringCooldown\"))" + "max(0, FireCooldown - Object.ObjectTimerElapsedTime(\"__FireBullet.FiringCooldown\"))" ] } ] @@ -10792,7 +11536,60 @@ "value": "SetReturnNumber" }, "parameters": [ - "max(0, Object.Behavior::PropertyOverheatDuration() - Object.ObjectTimerElapsedTime(\"__FireBullet.OverheatDuration\"))" + "max(0, OverheatDuration - Object.ObjectTimerElapsedTime(\"__FireBullet.OverheatDuration\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the remaining duration before the reload finishes, in seconds.", + "fullName": "Duration before the reload finishes", + "functionType": "ExpressionAndCondition", + "group": "Reload", + "name": "ReloadTimeLeft", + "sentence": "the remaining duration before the reload finishes", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.ReloadingTimer\"", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0, ReloadDuration - Object.ObjectTimerElapsedTime(\"__FireBullet.ReloadingTimer\"))" ] } ] @@ -10832,7 +11629,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -10841,9 +11640,13 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyReloadInProgress" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "ReloadInProgress", + "True", + "" + ] } ], "actions": [ @@ -10851,7 +11654,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -10887,7 +11692,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -10902,9 +11709,13 @@ "subInstructions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "HasJustFired", + "True", + "" + ] }, { "type": { @@ -10916,42 +11727,65 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsOutOfAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsReloadNeeded" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsReloadInProgress" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsFiringCooldownActive" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "inverted": true, "value": "FireBullet::FireBullet::IsOverheated" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -10963,7 +11797,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -10999,7 +11835,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11008,9 +11846,13 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "AutomaticReloading", + "True", + "" + ] } ], "actions": [ @@ -11018,7 +11860,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11054,7 +11898,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11063,9 +11909,13 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyUnlimitedAmmo" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "UnlimitedAmmo", + "True", + "" + ] } ], "actions": [ @@ -11073,7 +11923,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11109,7 +11961,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11121,13 +11975,21 @@ "inverted": true, "value": "FireBullet::FireBullet::IsUnlimitedAmmo" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { - "value": "FireBullet::FireBullet::PropertyAmmoQuantity" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "AmmoQuantity", + "<=", + "0" + ] } ], "actions": [ @@ -11135,7 +11997,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11171,7 +12035,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11185,23 +12051,30 @@ "textG": 0, "textR": 0 }, - "comment": "Shots per reload must not be \"0\"", - "comment2": "" + "comment": "Shots per reload must not be \"0\"" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsPerReload" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "ShotsPerReload", + ">", + "0" + ] }, { "type": { - "value": "FireBullet::FireBullet::PropertyShotsBeforeNextReload" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "ShotsBeforeNextReload", + "=", + "0" + ] } ], "actions": [ @@ -11209,7 +12082,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11245,7 +12120,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11260,9 +12137,13 @@ "subInstructions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHeatLevel" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">=", "1"] + "parameters": [ + "HeatLevel", + ">=", + "1" + ] }, { "type": { @@ -11282,7 +12163,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11318,7 +12201,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11341,7 +12226,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11368,22 +12255,22 @@ "type": "Number", "unit": "Second", "label": "Firing cooldown", - "description": "Objects cannot shoot while firing cooldown is active", - "group": "", - "extraInformation": [], - "hidden": false, + "description": "Objects cannot shoot while firing cooldown is active.", "name": "FireCooldown" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustFired" }, + { + "value": "true", + "type": "Boolean", + "label": "Rotate bullets to match their trajectory", + "name": "RotateBullet" + }, { "value": "45", "type": "Number", @@ -11391,18 +12278,14 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], - "hidden": false, "name": "FiringArc" }, { "value": "1", "type": "Number", - "label": "Number of bullets created at once (Multi-Fire)", + "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], - "hidden": false, "name": "BulletQuantity" }, { @@ -11410,29 +12293,25 @@ "type": "Number", "unit": "DegreeAngle", "label": "Angle variance", - "description": "Make imperfect aim (Range: 0 to 180 degrees)", + "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "AngleVariance" }, { - "value": "true", - "type": "Boolean", - "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "RotateBullet" + "value": "0", + "type": "Number", + "unit": "PixelSpeed", + "label": "Bullet speed variance", + "description": "Bullet speed will be adjusted by a random value within this range.", + "group": "Firing variance", + "advanced": true, + "name": "BulletSpeedVariance" }, { "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -11440,10 +12319,9 @@ "value": "0", "type": "Number", "label": "Shots per reload ", - "description": "Use 0 to disable reloading", + "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "ShotsPerReload" }, { @@ -11451,29 +12329,23 @@ "type": "Number", "unit": "Second", "label": "Reloading duration", - "description": "Objects cannot shoot while reloading is in progress", + "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "ReloadDuration" }, { "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "MaxAmmo" }, { "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -11482,8 +12354,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -11491,9 +12361,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -11501,19 +12368,14 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "StartingAmmo" }, { "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, @@ -11521,39 +12383,30 @@ "value": "true", "type": "Boolean", "label": "Unlimited ammo", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "UnlimitedAmmo" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ReloadInProgress" }, { "value": "0", "type": "Number", - "label": "Heat increase per shot (Range: 0 to 1)", - "description": " Object is overheated when Heat reaches 1", + "label": "Heat increase per shot (between 0 and 1)", + "description": " Object is overheated when Heat reaches 1.", "group": "Overheat", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "HeatIncreasePerShot" }, { "value": "0", "type": "Number", "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeatLevel" }, @@ -11561,10 +12414,8 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "AutomaticReloading" }, { @@ -11572,39 +12423,39 @@ "type": "Number", "unit": "Second", "label": "Overheat duration", - "description": "Object cannot shoot while overheat duration is active", + "description": "Object cannot shoot while overheat duration is active.", "group": "Overheat", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "OverheatDuration" }, { "value": "0.1", "type": "Number", "label": "Linear cooling rate (per second)", - "description": "", "group": "Overheat", - "extraInformation": [], - "hidden": false, + "advanced": true, "name": "LinearCoolingRate" }, { "value": "0.3", "type": "Number", "label": "Exponential cooling rate (per second)", - "description": "Happens faster when heat is high and slower when heat is low", + "description": "Happens faster when heat is high and slower when heat is low.", "group": "Overheat", - "extraInformation": ["Linear", "Exponential"], - "hidden": false, + "extraInformation": [ + "Linear", + "Exponential" + ], + "choices": [], + "advanced": true, "name": "ExponentialCoolingRate" }, { "value": "", "type": "String", "label": "Layer the bullets are created on", - "description": "Base layer by default", + "description": "Base layer by default.", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -11612,22 +12463,8 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" - }, - { - "value": "0", - "type": "Number", - "unit": "PixelSpeed", - "label": "Bullet speed variance", - "description": "Bullet speed will be adjusted by a random value within this range", - "group": "Firing variance", - "extraInformation": [], - "hidden": false, - "name": "BulletSpeedVariance" } ], "sharedPropertyDescriptors": [] @@ -11636,6 +12473,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] -} + "externalLayouts": [] +} \ No newline at end of file diff --git a/examples/boids-flocking-simulation/boids-flocking-simulation.json b/examples/boids-flocking-simulation/boids-flocking-simulation.json index 4945026cf..be88b6fbc 100644 --- a/examples/boids-flocking-simulation/boids-flocking-simulation.json +++ b/examples/boids-flocking-simulation/boids-flocking-simulation.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Boids Flocking Simulation", "description": "Learn how the settings of the boid behavior can enable a wide variety of movement styles.", @@ -79,10 +78,20 @@ "placement": "bottom-left", "showWatermark": true }, - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], - "authorUsernames": ["VictrisGames"], - "categories": ["simulation"], - "playableDevices": ["keyboard", "mobile"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "authorUsernames": [ + "VictrisGames" + ], + "categories": [ + "simulation" + ], + "playableDevices": [ + "keyboard", + "mobile", + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -94,7 +103,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Border.png", "kind": "image", "metadata": "", @@ -107,7 +115,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Fill Bar.png", "kind": "image", "metadata": "", @@ -120,7 +127,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Thumb.png", "kind": "image", "metadata": "", @@ -133,7 +139,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Toggle_Off.png", "kind": "image", "metadata": "", @@ -146,7 +151,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Toggle_On.png", "kind": "image", "metadata": "", @@ -159,7 +163,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/TargetSprite3.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -168,7 +171,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/BoidBird5.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -177,7 +179,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/background_gradient.jpg", "kind": "image", "metadata": "", @@ -186,7 +187,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/9patch_Bordered Hud Grey_all_32.png", "kind": "image", "metadata": "", @@ -199,7 +199,6 @@ } }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -207,8 +206,7 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -232,13 +230,16 @@ "gridType": "rectangular", "gridWidth": 16, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 0.3553434558816995, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -944,6 +945,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "CohesionSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -955,79 +957,13 @@ "LabelMargin": 4, "InitialValue": 25, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "SeparationSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1039,79 +975,13 @@ "LabelMargin": 4, "InitialValue": 75, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "AccelerationSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1124,79 +994,13 @@ "InitialValue": 100, "MinValue": 0, "MaxValue": 200 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MaxSpeedSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1209,73 +1013,6 @@ "InitialValue": 150, "MinValue": 0, "MaxValue": 300 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -1328,7 +1065,9 @@ "text": "Cohesion", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1382,7 +1121,9 @@ "text": "Separation", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1436,7 +1177,9 @@ "text": "Max Speed", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1490,7 +1233,9 @@ "text": "Acceleration ", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1498,6 +1243,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "AlignmentSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1509,73 +1255,6 @@ "LabelMargin": 4, "InitialValue": 50, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -1628,7 +1307,9 @@ "text": "Alignment", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1636,6 +1317,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "FollowTargetSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -1647,73 +1329,6 @@ "LabelMargin": 4, "InitialValue": 50, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -1766,7 +1381,9 @@ "text": "Follow target", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1774,76 +1391,11 @@ "assetStoreId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", "name": "ShowTarget", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square Blue Toggle", "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} }, { "assetStoreId": "", @@ -1895,7 +1447,9 @@ "text": "Show target", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1949,7 +1503,9 @@ "text": "Sight Distance", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2003,7 +1559,9 @@ "text": "Weight", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2011,6 +1569,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "CohesionSightSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -2022,79 +1581,13 @@ "LabelMargin": 4, "InitialValue": 50, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "SeparationSightSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -2106,79 +1599,13 @@ "LabelMargin": 4, "InitialValue": 25, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "AlignmentSightSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -2190,73 +1617,6 @@ "LabelMargin": 4, "InitialValue": 50, "MinValue": 0 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 48, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 24 - } } }, { @@ -2309,7 +1669,9 @@ "text": "Show UI", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2317,76 +1679,11 @@ "assetStoreId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", "name": "ShowUI", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square Blue Toggle", "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} }, { "assetStoreId": "", @@ -2445,7 +1742,9 @@ "text": "FPS: ??", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 50, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2453,6 +1752,7 @@ "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "ObjectQty_Slider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -2465,73 +1765,6 @@ "InitialValue": 250, "StepSize": 1, "MaxValue": 1000 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 24, - "color": "255;255;255" - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 64, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 32 - } } }, { @@ -2584,7 +1817,9 @@ "text": "Object Quantity", "font": "", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2711,7 +1946,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -2719,13 +1956,21 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["ShowTarget", "no", ""] + "parameters": [ + "ShowTarget", + "no", + "" + ] }, { "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["ShowUI", "no", ""] + "parameters": [ + "ShowUI", + "no", + "" + ] } ] } @@ -2898,7 +2143,10 @@ "type": { "value": "Delete" }, - "parameters": ["BoidBird", ""] + "parameters": [ + "BoidBird", + "" + ] } ] } @@ -2951,7 +2199,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["CohesionSlider", ""] + "parameters": [ + "CohesionSlider", + "" + ] } ], "actions": [ @@ -2975,7 +2226,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["SeparationSlider", ""] + "parameters": [ + "SeparationSlider", + "" + ] } ], "actions": [ @@ -2999,7 +2253,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["AlignmentSlider", ""] + "parameters": [ + "AlignmentSlider", + "" + ] } ], "actions": [ @@ -3023,7 +2280,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["CohesionSightSlider", ""] + "parameters": [ + "CohesionSightSlider", + "" + ] } ], "actions": [ @@ -3047,7 +2307,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["SeparationSightSlider", ""] + "parameters": [ + "SeparationSightSlider", + "" + ] } ], "actions": [ @@ -3071,7 +2334,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["AlignmentSightSlider", ""] + "parameters": [ + "AlignmentSightSlider", + "" + ] } ], "actions": [ @@ -3095,7 +2361,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["AccelerationSlider", ""] + "parameters": [ + "AccelerationSlider", + "" + ] } ], "actions": [ @@ -3119,7 +2388,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" }, - "parameters": ["MaxSpeedSlider", ""] + "parameters": [ + "MaxSpeedSlider", + "" + ] } ], "actions": [ @@ -3143,7 +2415,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["ShowTarget", ""] + "parameters": [ + "ShowTarget", + "" + ] }, { "type": { @@ -3157,7 +2432,10 @@ "type": { "value": "Montre" }, - "parameters": ["TargetObject", ""] + "parameters": [ + "TargetObject", + "" + ] } ] }, @@ -3169,7 +2447,10 @@ "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["ShowTarget", ""] + "parameters": [ + "ShowTarget", + "" + ] }, { "type": { @@ -3183,7 +2464,9 @@ "type": { "value": "Cache" }, - "parameters": ["TargetObject"] + "parameters": [ + "TargetObject" + ] } ] }, @@ -3194,7 +2477,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["ShowUI", ""] + "parameters": [ + "ShowUI", + "" + ] }, { "type": { @@ -3208,7 +2494,10 @@ "type": { "value": "ShowLayer" }, - "parameters": ["", "\"UI\""] + "parameters": [ + "", + "\"UI\"" + ] } ] }, @@ -3220,7 +2509,10 @@ "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["ShowUI", ""] + "parameters": [ + "ShowUI", + "" + ] }, { "type": { @@ -3234,7 +2526,10 @@ "type": { "value": "HideLayer" }, - "parameters": ["", "\"UI\""] + "parameters": [ + "", + "\"UI\"" + ] } ] } @@ -3247,6 +2542,7 @@ "ambientLightColorB": 0, "ambientLightColorG": 8042920, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -3275,6 +2571,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -3356,12 +2653,13 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Frames per second (FPS)", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMzAsM2gtMkg0SDJDMS40LDMsMSwzLjQsMSw0czAuNCwxLDEsMWgxdjE2YzAsMC42LDAuNCwxLDEsMWg5LjhsLTUuNSw2LjNjLTAuNCwwLjQtMC4zLDEsMC4xLDEuNEM4LjUsMjkuOSw4LjgsMzAsOSwzMA0KCWMwLjMsMCwwLjYtMC4xLDAuOC0wLjNsNS4yLTZWMjhjMCwwLjYsMC40LDEsMSwxczEtMC40LDEtMXYtNC4zbDUuMiw2YzAuMiwwLjIsMC41LDAuMywwLjgsMC4zYzAuMiwwLDAuNS0wLjEsMC43LTAuMg0KCWMwLjQtMC40LDAuNS0xLDAuMS0xLjRMMTguMiwyMkgyOGMwLjYsMCwxLTAuNCwxLTFWNWgxYzAuNiwwLDEtMC40LDEtMVMzMC42LDMsMzAsM3ogTTI0LjgsOC42bC00LDZjLTAuMywwLjQtMC44LDAuNi0xLjMsMC4zDQoJTDE1LjgsMTNoLTMuNGwtMy43LDMuN0M4LjUsMTYuOSw4LjMsMTcsOCwxN3MtMC41LTAuMS0wLjctMC4zYy0wLjQtMC40LTAuNC0xLDAtMS40bDQtNGMwLjItMC4yLDAuNC0wLjMsMC43LTAuM2g0DQoJYzAuMiwwLDAuMywwLDAuNCwwLjFsMy4yLDEuNmwzLjUtNS4zYzAuMy0wLjUsMC45LTAuNiwxLjQtMC4zQzI1LDcuNSwyNS4xLDguMSwyNC44LDguNnoiLz4NCjwvc3ZnPg0K", "name": "FPS", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/SEO/SEO_board_performance_profit.svg", "shortDescription": "Calculate and display the frames per second (FPS) of the game.", - "version": "1.1.0", + "version": "1.2.1", "description": [ "Provides an expression to get the current FPS and a text object behavior to display the current FPS.", "", @@ -3374,12 +2672,34 @@ "identifier": "FPS", "name": "gdevelop-extension-store" }, - "tags": ["fps", "frames", "per", "second", "performance", "speed"], + "tags": [ + "fps", + "frames", + "per", + "second", + "performance", + "speed" + ], "authorIds": [ "onPsboRtDkUHNOsx7OPr8R8G1oj2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [ + { + "folded": true, + "name": "FrameTimestamps", + "type": "array", + "children": [] + }, + { + "folded": true, + "name": "TimeElapsed", + "type": "number", + "value": 0 + } + ], "eventsFunctions": [ { "fullName": "", @@ -3393,9 +2713,12 @@ "actions": [ { "type": { - "value": "SceneVariablePushNumber" + "value": "PushNumber" }, - "parameters": ["__FPS.FrameTimestamps", "Time(\"timestamp\")"] + "parameters": [ + "FrameTimestamps", + "Time(\"timestamp\")" + ] } ] } @@ -3436,12 +2759,12 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "__FPS.TimeElapsed", + "TimeElapsed", "=", - "Time(\"timestamp\") - Variable(__FPS.FrameTimestamps[0])" + "Time(\"timestamp\") - FrameTimestamps[0]" ] } ] @@ -3464,16 +2787,20 @@ "whileConditions": [ { "type": { - "value": "SceneVariableChildCount" + "value": "VariableChildCount" }, - "parameters": ["__FPS.FrameTimestamps", ">", "0"] + "parameters": [ + "FrameTimestamps", + ">", + "0" + ] }, { "type": { - "value": "VarScene" + "value": "NumberVariable" }, "parameters": [ - "__FPS.FrameTimestamps[0]", + "FrameTimestamps[0]", "<", "Time(\"timestamp\") - 1000" ] @@ -3483,9 +2810,12 @@ "actions": [ { "type": { - "value": "SceneVariableRemoveAt" + "value": "RemoveVariableAt" }, - "parameters": ["__FPS.FrameTimestamps", "0"] + "parameters": [ + "FrameTimestamps", + "0" + ] } ] }, @@ -3507,10 +2837,10 @@ "actions": [ { "type": { - "value": "SceneVariablePushNumber" + "value": "PushNumber" }, "parameters": [ - "__FPS.FrameTimestamps", + "FrameTimestamps", "Time(\"timestamp\")" ] } @@ -3539,7 +2869,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "VariableChildCount(__FPS.FrameTimestamps) / (Variable(__FPS.TimeElapsed) / 1000)" + "VariableChildCount(FrameTimestamps) / (TimeElapsed / 1000)" ] } ] @@ -3567,7 +2897,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FPS::FPS()"] + "parameters": [ + "FPS::FPS()" + ] } ] } @@ -3591,7 +2923,7 @@ "description": "Makes a text object display the current FPS.", "fullName": "FPS Displayer", "name": "FPSDisplayer", - "objectType": "TextObject::Text", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -3617,106 +2949,125 @@ "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "SetStringVariable" }, "parameters": [ - "__FPS.UnformattedFPS", + "UnformattedFPS", "=", - "ToString(roundTo(FPS::FPS(), Object.Behavior::PropertyDecimalDigits()))" + "ToString(roundTo(FPS::FPS(), DecimalDigits))" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Add trailing zeroes, if needed" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PropertyDecimalDigits()", - ">", - "0" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "StrFind(VariableString(__FPS.UnformattedFPS),\".\")", - "=", - "-1" - ] - } - ], - "actions": [], - "events": [ + "comment": "Add trailing zeroes, if needed" + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "DecimalDigits", + ">", + "0" + ] + }, { "type": { - "value": "ModVarSceneTxt" + "value": "BuiltinCommonInstructions::CompareNumbers" }, - "parameters": ["__FPS.UnformattedFPS", "+", "\".\""] + "parameters": [ + "StrFind(UnformattedFPS, \".\")", + "=", + "-1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "UnformattedFPS", + "+", + "\".\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "DecimalDigits", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "UnformattedFPS", + "+", + "\"0\"" + ] + } + ] } ] }, { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Object.Behavior::PropertyDecimalDigits()", + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show the formatted FPS text including the prefix" + }, + { + "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "ModVarSceneTxt" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, - "parameters": ["__FPS.UnformattedFPS", "+", "\"0\""] + "parameters": [ + "Object", + "Text", + "=", + "prefix + UnformattedFPS" + ] } ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show the formatted FPS text including the prefix" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + ], + "variables": [ { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::Propertyprefix() + VariableString(__FPS.UnformattedFPS)" - ] + "folded": true, + "name": "UnformattedFPS", + "type": "string", + "value": "" } ] } @@ -3725,7 +3076,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "TextObject::Text", "type": "object" }, { @@ -3739,23 +3089,27 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Text capability", + "extraInformation": [ + "TextContainerCapability::TextContainerBehavior" + ], + "choices": [], + "name": "Text" + }, { "value": "FPS: ", "type": "String", - "label": "The prefix before the FPS count", - "description": "", - "group": "", - "extraInformation": [], + "label": "FPS counter prefix", "name": "prefix" }, { "value": "0", "type": "Number", "unit": "Dimensionless", - "label": "Number of decimal digits to display", - "description": "", - "group": "", - "extraInformation": [], + "label": "Number of decimal digits", "name": "DecimalDigits" } ], @@ -3769,12 +3123,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/toggle-switch", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", "name": "SpriteToggleSwitch", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.3.0", + "version": "2.0.2", "description": [ "Toggle switch that users can click or touch. The switch can be customized with sprites.", "", @@ -3784,13 +3139,50 @@ "identifier": "SpriteToggleSwitch", "name": "gdevelop-extension-store" }, - "tags": ["ui", "widget", "toggle", "switch", "check box"], + "tags": [ + "ui", + "widget", + "toggle", + "switch", + "check box" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Toggle switches now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing toggle switches in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the switch object.", @@ -3811,9 +3203,13 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "WasChecked", + "False", + "" + ] } ] }, @@ -3824,15 +3220,23 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "WasChecked", + "True", + "" + ] } ] }, @@ -3843,15 +3247,23 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::TogglePropertyIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "IsChecked", + "Toggle", + "" + ] } ] } @@ -3883,9 +3295,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "IsChecked", + "True", + "" + ] } ], "actions": [ @@ -3893,7 +3309,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3925,16 +3343,24 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "IsChecked", + "True", + "" + ] }, { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "WasChecked", + "True", + "" + ] } ], "actions": [ @@ -3942,7 +3368,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3975,15 +3403,23 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "IsChecked", + "True", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "WasChecked", + "True", + "" + ] } ], "actions": [ @@ -3991,7 +3427,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4012,104 +3450,34 @@ "objectGroups": [] }, { - "description": "Check (or uncheck) the toggle switch.", - "fullName": "Check (or uncheck)", - "functionType": "Action", - "name": "SetChecked", - "sentence": "Check _PARAM0_: _PARAM2_", + "description": "Check if the toggle switch was toggled in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Avoid a started touch to interfere with a state change from events." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenChecked" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - }, - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ] - } + "parameters": [ + "Object", + "Behavior", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::ResetState" - }, - "parameters": ["Object", "ButtonFSM", ""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetReturnBoolean" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "True" + ] } ] }, @@ -4118,17 +3486,23 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenUnchecked" }, - "parameters": ["\"Value\""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetReturnBoolean" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "True" + ] } ] } @@ -4144,71 +3518,43 @@ "name": "Behavior", "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", "type": "behavior" - }, - { - "defaultValue": "yes", - "description": "IsChecked", - "name": "Value", - "optional": true, - "type": "yesorno" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "Button finite state machine", - "description": "", - "group": "", - "extraInformation": ["SpriteToggleSwitch::ButtonFSM"], - "name": "ButtonFSM" - }, - { - "value": "false", - "type": "Boolean", - "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "name": "IsChecked" }, { - "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "WasChecked" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", - "private": true, - "eventsFunctions": [ - { - "fullName": "", + "description": "Check (or uncheck) the toggle switch.", + "fullName": "Check (or uncheck)", "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", + "name": "SetChecked", + "sentence": "Check _PARAM0_: _PARAM2_", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "False", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Comment", @@ -4220,335 +3566,346 @@ "textG": 0, "textR": 0 }, - "comment": "The \"Validated\" state only last one frame." + "comment": "Avoid a started touch to interfere with a state change from events." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, "parameters": [ "Object", "Behavior", - "=", - "\"Validated\"" + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] } ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } + "parameters": [ + "Object", + "Behavior", + "" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } + "parameters": [ + "Object", + "ButtonFSM", + "" ] } - ], - "parameters": [] - }, + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsChecked", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "Object", + "Behavior", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "Object", + "Behavior", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button finite state machine", + "extraInformation": [ + "SpriteToggleSwitch::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "false", + "type": "Boolean", + "label": "Is checked", + "name": "IsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "PreviousIsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "WasChecked" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "name": "ButtonFSM", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Apply position changes", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -4556,232 +3913,577 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "HasAnyTouchOrMouseStarted" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", - "\"Validated\"" + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } ] } ] - }, + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "MouseIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] } ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", @@ -4804,7 +4506,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::ResetState" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -4837,15 +4543,23 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -4877,9 +4591,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -4887,7 +4605,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4919,9 +4639,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -4929,7 +4653,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4961,9 +4687,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -4971,7 +4701,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5003,9 +4735,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -5013,7 +4749,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -5022,11 +4760,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5037,7 +4774,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5069,11 +4808,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5084,7 +4822,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5116,11 +4856,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5131,7 +4870,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5166,7 +4907,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -5196,8 +4939,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -5205,14 +4946,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -5221,9 +4975,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -5231,9 +4982,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -5241,9 +4989,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -5251,9 +4996,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -5263,41 +5005,137 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "ToggleSwitch", "description": "A toggle switch that users can click or touch.", "fullName": "Toggle switch", + "isUsingLegacyInstancesRenderer": false, "name": "SpriteToggleSwitch", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state." + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ { - "type": { - "value": "Create" - }, - "parameters": ["", "State", "0", "0", ""] + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] } ] }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -5315,9 +5153,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "True", + "" + ] } ], "actions": [ @@ -5325,13 +5167,22 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "", ""] + "parameters": [ + "State", + "SwitchFSM", + "", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ] }, @@ -5340,10 +5191,13 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "False", + "" + ] } ], "actions": [ @@ -5351,13 +5205,22 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "no", ""] + "parameters": [ + "State", + "SwitchFSM", + "no", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", ""] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ] }, @@ -5369,7 +5232,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -5420,16 +5286,23 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "True", + "" + ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "SwitchFSM", ""] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ], "actions": [ @@ -5437,13 +5310,21 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["Object", "yes", "no"] + "parameters": [ + "Object", + "yes", + "no" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ] }, @@ -5452,16 +5333,23 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "False", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "SwitchFSM", ""] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ], "actions": [ @@ -5469,13 +5357,21 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["Object", "SwitchFSM", "no"] + "parameters": [ + "Object", + "SwitchFSM", + "no" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ] } @@ -5504,7 +5400,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -5533,7 +5432,11 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "parameters": ["State", "SwitchFSM", ""] + "parameters": [ + "State", + "SwitchFSM", + "" + ] } ], "actions": [ @@ -5541,7 +5444,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5570,7 +5475,11 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenChecked" }, - "parameters": ["State", "SwitchFSM", ""] + "parameters": [ + "State", + "SwitchFSM", + "" + ] } ], "actions": [ @@ -5578,7 +5487,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5607,7 +5518,54 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenUnchecked" }, - "parameters": ["State", "SwitchFSM", ""] + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was checked or unchecked in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenToggled" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] } ], "actions": [ @@ -5615,7 +5573,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5643,9 +5603,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ @@ -5653,7 +5617,12 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "no", ""] + "parameters": [ + "State", + "SwitchFSM", + "no", + "" + ] } ] }, @@ -5662,9 +5631,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ @@ -5672,7 +5645,12 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "yes", ""] + "parameters": [ + "State", + "SwitchFSM", + "yes", + "" + ] } ] } @@ -5694,6 +5672,40 @@ ], "objectGroups": [] }, + { + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::ToggleChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Check if the button is not used.", "fullName": "Is idle", @@ -5709,7 +5721,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsIdle" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -5717,7 +5733,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5747,7 +5765,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -5755,7 +5777,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5784,7 +5808,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsHovered" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -5792,7 +5820,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5822,7 +5852,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsFocused" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -5830,7 +5864,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5850,7 +5886,6 @@ "fullName": "Is pressed", "functionType": "Condition", "name": "IsPressed", - "private": true, "sentence": "_PARAM0_ is pressed", "events": [ { @@ -5860,7 +5895,54 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsPressed" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -5868,7 +5950,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5898,13 +5982,20 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { "value": "AnimationName" }, - "parameters": ["State", "\"Unchecked\""] + "parameters": [ + "State", + "\"Unchecked\"" + ] } ], "actions": [ @@ -5912,13 +6003,18 @@ "type": { "value": "SetAnimationName" }, - "parameters": ["State", "\"Checked\""] + "parameters": [ + "State", + "\"Checked\"" + ] }, { "type": { "value": "PlayAnimation" }, - "parameters": ["State"] + "parameters": [ + "State" + ] } ] }, @@ -5930,13 +6026,20 @@ "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { "value": "AnimationName" }, - "parameters": ["State", "\"Checked\""] + "parameters": [ + "State", + "\"Checked\"" + ] } ], "actions": [ @@ -5944,13 +6047,18 @@ "type": { "value": "SetAnimationName" }, - "parameters": ["State", "\"Unchecked\""] + "parameters": [ + "State", + "\"Unchecked\"" + ] }, { "type": { "value": "PlayAnimation" }, - "parameters": ["State"] + "parameters": [ + "State" + ] } ] } @@ -5977,9 +6085,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -5987,7 +6099,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["State", "ButtonFSM", "yes"] + "parameters": [ + "State", + "ButtonFSM", + "yes" + ] } ] }, @@ -5997,9 +6113,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -6007,7 +6127,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["State", "ButtonFSM", "no"] + "parameters": [ + "State", + "ButtonFSM", + "no" + ] } ] } @@ -6041,7 +6165,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["State", "ButtonFSM"] + "parameters": [ + "State", + "ButtonFSM" + ] } ], "actions": [ @@ -6049,7 +6176,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -6070,9 +6199,6 @@ "value": "true", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], "name": "IsChecked" }, { @@ -6080,74 +6206,172 @@ "type": "Boolean", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousIsChecked" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "State", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false - } - ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "variants": [ + { + "areaMaxX": 25, + "areaMaxY": 26, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", + "assetStoreOriginalName": "Square Blue Toggle", + "name": "Square Blue Toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ + ], + "animations": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square Blue Toggle_Off.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square Blue Toggle_On.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } ] } - ] + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "State" - } - ] - } + ] } ] }, @@ -6156,12 +6380,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -6171,13 +6396,49 @@ "identifier": "PanelSpriteSlider", "name": "gdevelop-extension-store" }, - "tags": ["draggable", "slider", "ui", "widget"], + "tags": [ + "draggable", + "slider", + "ui", + "widget" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -6201,7 +6462,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValue()"] + "parameters": [ + "CurrentValue" + ] } ] } @@ -6236,21 +6499,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "StepSize", + "=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -6260,21 +6526,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "StepSize", + "!=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -6311,7 +6580,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMinValue()"] + "parameters": [ + "MinValue" + ] } ] } @@ -6347,13 +6618,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -6402,7 +6672,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxValue()"] + "parameters": [ + "MaxValue" + ] } ] } @@ -6438,13 +6710,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -6533,7 +6804,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyStepSize()"] + "parameters": [ + "StepSize" + ] } ] } @@ -6569,13 +6842,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -6590,426 +6862,124 @@ "" ] } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteSlider::Slider", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "name": "Value" - }, - { - "value": "0", - "type": "Number", - "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "name": "MinValue" - }, - { - "value": "1", - "type": "Number", - "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "name": "MaxValue" - }, - { - "value": "0", - "type": "Number", - "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "name": "StepSize" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", - "private": true, - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "Value", + "name": "CurrentValue" + }, + { + "value": "0", + "type": "Number", + "label": "Minimum value", + "name": "MinValue" + }, + { + "value": "1", + "type": "Number", + "label": "Maximum value", + "name": "MaxValue" + }, + { + "value": "0", + "type": "Number", + "label": "Step size", + "name": "StepSize" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "name": "ButtonFSM", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Apply position changes", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -7017,170 +6987,376 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } - ] + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ] @@ -7191,49 +7367,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] }, { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -7263,15 +7578,23 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -7303,9 +7626,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -7313,7 +7640,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7345,9 +7674,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -7355,7 +7688,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7387,9 +7722,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -7397,7 +7736,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7429,9 +7770,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -7439,7 +7784,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -7448,11 +7795,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -7463,7 +7809,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7495,11 +7843,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -7510,7 +7857,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7542,11 +7891,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -7557,7 +7905,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7592,7 +7942,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -7622,8 +7974,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -7631,14 +7981,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -7647,9 +8010,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -7657,9 +8017,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -7667,9 +8024,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -7677,9 +8031,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -7689,10 +8040,267 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -7700,30 +8308,28 @@ "name": "onCreated", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "Thumb", + "Draggable", + "" ] } ] @@ -7738,7 +8344,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances." + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7746,39 +8352,71 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": ["", "Background", "0", "0", ""] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "FillBar", "0", "0", ""] + "parameters": [ + "FillBar", + "Anchor", + "" + ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "Thumb", "0", "0", ""] + "parameters": [ + "Thumb", + "Anchor", + "" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Background", "=", "1"] + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - FillBar.Width()" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["FillBar", "=", "2"] - }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - FillBar.Height()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Thumb", "=", "3"] + "parameters": [ + "PreviousInitialValue", + "=", + "InitialValue" + ] } ] }, @@ -7802,25 +8440,21 @@ "type": { "value": "Create" }, - "parameters": ["", "Label", "0", "0", ""] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": ["Label", "=", "4"] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": ["Label", "no"] + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -7844,7 +8478,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -7853,7 +8490,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -7867,19 +8504,28 @@ "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Thumb", ""] + "parameters": [ + "Thumb", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["FillBar", ""] + "parameters": [ + "FillBar", + "" + ] } ] } @@ -7904,17 +8550,14 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] }, @@ -7923,24 +8566,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -7950,7 +8593,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -7974,86 +8617,323 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": ["Background", "ButtonFSM"] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" + "value": "BehaviorActivated" }, - "parameters": ["Thumb", "Draggable"] + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] }, { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ] }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "value": "DraggableBehavior::Dropped" }, - "parameters": ["Background", "ButtonFSM", ""] - }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "value": "ResetObjectTimer" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" }, - "parameters": ["Object"] + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] } ], "actions": [ @@ -8061,299 +8941,61 @@ "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "ResetObjectTimer" }, - "parameters": ["Label", "\"HideBack\""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "CompareObjectTimer" }, - "parameters": ["Object"] + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": ["Object"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": ["Label", ""] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": ["Label"] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": ["Object", "=", "1"] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": ["Object", ""] + } + ], + "parameters": [] } ] } @@ -8389,19 +9031,30 @@ "type": { "value": "DraggableBehavior::Dragged" }, - "parameters": ["Thumb", "Draggable"] + "parameters": [ + "Thumb", + "Draggable" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressed" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] } ] } @@ -8411,7 +9064,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -8441,7 +9096,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::Value()"] + "parameters": [ + "FillBar.Slider::Value()" + ] } ] } @@ -8478,7 +9135,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -8486,7 +9143,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -8523,7 +9183,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MinValue()"] + "parameters": [ + "FillBar.Slider::MinValue()" + ] } ] } @@ -8560,21 +9222,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -8611,7 +9270,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MaxValue()"] + "parameters": [ + "FillBar.Slider::MaxValue()" + ] } ] } @@ -8648,21 +9309,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -8699,7 +9357,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::StepSize()"] + "parameters": [ + "FillBar.Slider::StepSize()" + ] } ] } @@ -8736,7 +9396,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -8772,9 +9432,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] } ], "actions": [ @@ -8782,7 +9446,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -8811,23 +9477,33 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "ShowLabelAtChanges", + "False", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -8836,23 +9512,34 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] } ] } @@ -8872,53 +9559,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -8934,7 +9574,13 @@ "type": { "value": "PanelSpriteSlider::Slider::Size" }, - "parameters": ["FillBar", "Slider", ">", "0", ""] + "parameters": [ + "FillBar", + "Slider", + ">", + "0", + "" + ] } ], "actions": [], @@ -8945,10 +9591,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -8966,14 +9613,18 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { "type": { "value": "SetCenterY" }, - "parameters": ["Thumb", "=", "FillBar.CenterY()"] + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] } ] }, @@ -8983,10 +9634,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -8995,7 +9647,11 @@ "type": { "value": "SetCenterX" }, - "parameters": ["Label", "=", "Thumb.CenterX()"] + "parameters": [ + "Label", + "=", + "Thumb.CenterX()" + ] }, { "type": { @@ -9004,14 +9660,18 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, - "parameters": ["Label", "=", "-Object.Angle()"] + "parameters": [ + "Label", + "=", + "-Object.Angle()" + ] } ] } @@ -9028,74 +9688,6 @@ ], "objectGroups": [] }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.PropertyBarLeftPadding()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "fullName": "", "functionType": "Expression", @@ -9112,7 +9704,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -9162,9 +9754,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -9174,7 +9765,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -9185,7 +9776,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -9214,9 +9805,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -9224,13 +9819,21 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "yes"] + "parameters": [ + "Thumb", + "Draggable", + "yes" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "yes"] + "parameters": [ + "Background", + "ButtonFSM", + "yes" + ] } ] }, @@ -9240,9 +9843,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -9250,19 +9857,29 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "no"] + "parameters": [ + "Thumb", + "Draggable", + "no" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "no"] + "parameters": [ + "Background", + "ButtonFSM", + "no" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] } @@ -9296,7 +9913,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Background", "ButtonFSM"] + "parameters": [ + "Background", + "ButtonFSM" + ] } ], "actions": [ @@ -9304,7 +9924,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -9325,90 +9947,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], "name": "InitialValue" }, { @@ -9416,8 +10047,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -9426,166 +10055,322 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, { - "value": "Center-right", - "type": "String", + "value": "Center-right", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "extraInformation": [ + "FillBar" + ], + "choices": [], + "hidden": true, + "name": "ThumbAnchorTarget" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "Only used by the scene editor.", + "extraInformation": [ + "Label" + ], + "choices": [], + "hidden": true, + "name": "ShowLabel" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" + }, + { + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["FillBar"], "hidden": true, - "name": "ThumbAnchorTarget" + "name": "BarTopPlusBottomMargin" }, { - "value": "", - "type": "Boolean", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Label"], "hidden": true, - "name": "ShowLabel" + "name": "OldParentWidth" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "variants": [ + { + "areaMaxX": 215, + "areaMaxY": 18, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", + "assetStoreOriginalName": "Square Blue Slider", + "name": "Square Blue Slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 16, + "color": { + "b": 221, + "g": 221, + "r": 221 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "221;221;221" + } + }, + { + "assetStoreId": "", + "bottomMargin": 3, + "height": 21, + "leftMargin": 3, + "name": "Thumb", + "rightMargin": 3, + "texture": "Square Blue Slider Thumb.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 21, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 1, + "height": 11, + "leftMargin": 1, + "name": "FillBar", + "rightMargin": 1, + "texture": "Square Blue Slider Fill Bar.png", + "tiled": false, + "topMargin": 1, + "type": "PanelSpriteObject::PanelSprite", + "width": 209, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false + "assetStoreId": "", + "bottomMargin": 4, + "height": 18, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square Blue Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 215, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "instances": [ { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - } - ] + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 11, + "keepRatio": true, + "layer": "", + "name": "FillBar", + "persistentUuid": "92813097-aee7-4422-8421-125e3ed61986", + "width": 209, + "x": 3, + "y": 3, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Thumb", + "persistentUuid": "ac167400-9a98-4f22-a0a2-8b28626074a6", + "width": 0, + "x": 194, + "y": -2, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Thumb" - }, - { - "objectName": "FillBar" - }, - { - "objectName": "Background" - } - ] - } + ] } ] }, @@ -9594,12 +10379,13 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Boids movement", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/boids-movement/details/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBkPSJNMjkuMywxMC4xYy0wLjQtMC4xLTAuOCwwLTEuMSwwLjNsLTMuMiw0Yy0xLjctMi01LjktNi40LTExLTYuNGMtMC4yLDAtMC4zLDAtMC41LDBjMS40LDIuNCwyLjEsNS4xLDIuMSw4DQoJCWMwLDIuOC0wLjcsNS42LTIuMSw4YzAuMiwwLDAuMywwLDAuNSwwYzUuMSwwLDkuMy00LjMsMTEtNi40bDMuMiw0YzAuMiwwLjIsMC41LDAuNCwwLjgsMC40YzAuMSwwLDAuMiwwLDAuMy0wLjENCgkJYzAuNC0wLjEsMC43LTAuNSwwLjctMC45VjExQzMwLDEwLjYsMjkuNywxMC4yLDI5LjMsMTAuMXoiLz4NCgk8cGF0aCBkPSJNMTEuNCw4LjRjLTUuMiwxLjUtOSw2LjgtOS4yLDdjLTAuMiwwLjMtMC4yLDAuOCwwLDEuMmMwLjIsMC4zLDQsNS42LDkuMiw3YzEuNS0yLjMsMi4yLTQuOSwyLjItNy42DQoJCUMxMy42LDEzLjMsMTIuOCwxMC42LDExLjQsOC40eiBNMTAsMTZjMCwwLjYtMC40LDEtMSwxcy0xLTAuNC0xLTF2LTJjMC0wLjYsMC40LTEsMS0xczEsMC40LDEsMVYxNnoiLz4NCjwvZz4NCjwvc3ZnPg0K", "name": "BoidsMovement", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/Restaurant/Restaurant_restaurant_seafood_animal_fish.svg", "shortDescription": "Simulates flocks movement.", - "version": "0.2.1", + "version": "0.4.1", "description": [ "Simulates swarms or flocks movement following the separation, alignment, cohesion principles. The flock can be attracted to a location or avoid some obstacles.", "", @@ -9609,12 +10395,27 @@ "identifier": "BoidsMovement", "name": "gdevelop-extension-store" }, - "tags": ["flock", "swarm", "boids", "crowd", "horde"], + "tags": [ + "flock", + "swarm", + "boids", + "crowd", + "horde" + ], "authorIds": [ "rotBq28wITdtfsrE7McHQri4k2w2", "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [ + { + "folded": true, + "name": "HasAlreadyRunThisFrame", + "type": "boolean", + "value": false + } + ], "eventsFunctions": [ { "description": "Define helper classes JavaScript code.", @@ -9985,9 +10786,9 @@ " */", " constructor() {", " /**", - " * @type {Map}", + " * @type {Set}", " */", - " this.boids = new Map();", + " this.boids = new Set();", " this.boidsRBush = new rbush();", " }", "", @@ -9997,8 +10798,13 @@ " * @returns {Boid} the created Boid", " */", " add(behavior) {", - " const boid = new Boid(behavior);", - " this.boids.set(behavior.owner.id, boid);", + " if (!behavior.__boidsExtension) {", + " behavior.__boidsExtension = {", + " boid: new Boid(behavior)", + " };", + " }", + " const boid = behavior.__boidsExtension.boid;", + " this.boids.add(boid);", " this.addToRBush(boid);", " return boid;", " }", @@ -10024,9 +10830,10 @@ " * @param {gdjs.RuntimeBehavior} behavior", " */", " remove(behavior) {", - " this.boids.delete(behavior.owner.id);", + " const boid = behavior.__boidsExtension.boid;", + " this.boids.delete(boid);", "", - " this.removeFromRBush(behavior.__boidsExtension.boid);", + " this.removeFromRBush(boid);", " }", "", " /**", @@ -10041,12 +10848,14 @@ " * Move all instances.", " */", " moveAll() {", - " this.boids.forEach(boid => boid.flock());", - " this.boids.forEach(boid => {", + " for (const boid of this.boids) {", + " boid.flock();", + " }", + " for (const boid of this.boids) {", " boid.move();", " this.removeFromRBush(boid);", " this.addToRBush(boid);", - " });", + " }", " }", "", " /**", @@ -10066,6 +10875,7 @@ " searchArea.maxX = x + radius;", " searchArea.maxY = y + radius;", " // TODO The R-Tree should not allocate an array.", + " /** @type {Array} */", " const nearbys = this.boidsRBush.search(searchArea);", "", " const radiusSq = radius * radius;", @@ -10079,6 +10889,9 @@ " if (object === otherObject) {", " continue;", " }", + " if (behavior._getCollisionLayer() !== behavior._getCollisionLayer()) {", + " continue;", + " }", " const distanceSq = object.getSqDistanceToObject(otherObject);", " if (distanceSq < radiusSq) {", " foundBoids.push(behavior.__boidsExtension.boid);", @@ -10135,7 +10948,10 @@ "type": { "value": "BoidsMovement::DefineHelperClasses" }, - "parameters": ["", ""] + "parameters": [ + "", + "" + ] } ] }, @@ -10150,9 +10966,7 @@ "const object = objects[0];\r", "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\r", "const behavior = object.getBehavior(behaviorName);\r", - "behavior.__boidsExtension = behavior.__boidsExtension || {\r", - " boid: runtimeScene.__boidsExtension.boidsManager.add(behavior),\r", - "};" + "runtimeScene.__boidsExtension.boidsManager.add(behavior);" ], "parameterObjects": "Object", "useStrict": true, @@ -10197,10 +11011,11 @@ "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "__BoidsBehaviour_hasAlreadyRunThisFrame", + "HasAlreadyRunThisFrame", + "=", "" ] } @@ -10208,21 +11023,25 @@ "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__BoidsBehaviour_hasAlreadyRunThisFrame", - "True" + "HasAlreadyRunThisFrame", + "True", + "" ] } ], "events": [ { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "runtimeScene.__boidsExtension.boidsManager.moveAll();", + "inlineCode": [ + "runtimeScene.__boidsExtension.boidsManager.moveAll();\r", + "" + ], "parameterObjects": "Object", "useStrict": true, - "eventsSheetExpanded": true + "eventsSheetExpanded": false } ] } @@ -10254,11 +11073,12 @@ "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "__BoidsBehaviour_hasAlreadyRunThisFrame", - "False" + "HasAlreadyRunThisFrame", + "False", + "" ] } ] @@ -10514,8 +11334,7 @@ "Behavior", "TargetedObject.CenterX()", "TargetedObject.CenterY()", - "DecisionWeight", - "GetArgumentAsNumber(\"DecisionWeight\")" + "DecisionWeight" ] } ] @@ -10571,46 +11390,15 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyTrajectoryDistance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TrajectoryDistance", "=", "(Object.Behavior::VelocityX() * (Object.CenterY() - CenterY) + Object.Behavior::VelocityY() * (CenterX - Object.CenterX())) / Object.Behavior::Speed()" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If this distance is smaller than the specified radius, the Boid must try turn in the right direction to avoid the area." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BoidsMovement::BoidsMovement::PropertyTrajectoryDistance" - }, - "parameters": ["Object", "Behavior", ">", "- Radius"] - }, - { - "type": { - "value": "BoidsMovement::BoidsMovement::PropertyTrajectoryDistance" - }, - "parameters": ["Object", "Behavior", "<", "Radius"] - } ], - "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Comment", @@ -10622,72 +11410,128 @@ "textG": 0, "textR": 0 }, - "comment": "(normalX ; normalY)" + "comment": "If this distance is smaller than the specified radius, the Boid must try turn in the right direction to avoid the area." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::PropertyTrajectoryDistance" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", ">", "0"] - } - ], - "actions": [ + "parameters": [ + "TrajectoryDistance", + ">", + "- Radius" + ] + }, { "type": { - "value": "BoidsMovement::BoidsMovement::MoveInDirection" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", - "-(CenterY - Object.CenterY())", - "CenterX - Object.CenterX()", - "DecisionWeight", - "" + "TrajectoryDistance", + "<", + "Radius" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "(-normalX ; -normalY)" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "(normalX ; normalY)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TrajectoryDistance", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "BoidsMovement::BoidsMovement::MoveInDirection" + }, + "parameters": [ + "Object", + "Behavior", + "-(CenterY - Object.CenterY())", + "CenterX - Object.CenterX()", + "DecisionWeight", + "" + ] + } + ] + }, { - "type": { - "value": "BoidsMovement::BoidsMovement::PropertyTrajectoryDistance" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "<", "0"] - } - ], - "actions": [ + "comment": "(-normalX ; -normalY)" + }, { - "type": { - "value": "BoidsMovement::BoidsMovement::MoveInDirection" - }, - "parameters": [ - "Object", - "Behavior", - "CenterY - Object.CenterY()", - "-(CenterX - Object.CenterX())", - "DecisionWeight", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TrajectoryDistance", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "BoidsMovement::BoidsMovement::MoveInDirection" + }, + "parameters": [ + "Object", + "Behavior", + "CenterY - Object.CenterY()", + "-(CenterX - Object.CenterX())", + "DecisionWeight", + "" + ] + } ] } ] } + ], + "variables": [ + { + "folded": true, + "name": "TrajectoryDistance", + "type": "number", + "value": 0 + } ] } ], @@ -10828,8 +11672,8 @@ "objectGroups": [] }, { - "description": "Return the current vertical speed.", - "fullName": "Velocity Y", + "description": "Return the current horizontal speed.", + "fullName": "Velocity X", "functionType": "Expression", "name": "VelocityX", "sentence": "", @@ -10870,8 +11714,8 @@ "objectGroups": [] }, { - "description": "Return the current horizontal speed.", - "fullName": "Velocity X", + "description": "Return the current vertical speed.", + "fullName": "Velocity Y", "functionType": "Expression", "name": "VelocityY", "sentence": "", @@ -10912,22 +11756,35 @@ "objectGroups": [] }, { - "description": "Change the maximum speed of the object.", - "fullName": "Maximum speed", - "functionType": "Action", + "description": "Check if the object is rotated while moving on its path.", + "fullName": "Object Rotated", + "functionType": "Condition", "group": "Boids movement configuration", - "name": "SetMaxSpeed", - "sentence": "Change the maximum speed of _PARAM0_ to _PARAM2_", + "name": "ShouldRotate", + "sentence": "_PARAM0_ is rotated when moving", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldRotate", + "True", + "" + ] + } + ], "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyMaxSpeed" + "value": "SetReturnBoolean" }, - "parameters": ["Object", "Behavior", "=", "MaxSpeed"] + "parameters": [ + "True" + ] } ] } @@ -10943,22 +11800,17 @@ "name": "Behavior", "supplementaryInformation": "BoidsMovement::BoidsMovement", "type": "behavior" - }, - { - "description": "Max Speed", - "name": "MaxSpeed", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Change the maximum acceleration of the object.", - "fullName": "Maximum acceleration", - "functionType": "Action", + "description": "Return the maximum speed.", + "fullName": "Maximum speed", + "functionType": "Expression", "group": "Boids movement configuration", - "name": "SetMaxAcceleration", - "sentence": "Change the maximum acceleration of _PARAM0_ to _PARAM2_", + "name": "MaxSpeed", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -10966,13 +11818,18 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyMaxAcceleration" + "value": "SetReturnNumber" }, - "parameters": ["Object", "Behavior", "=", "SteeringForce"] + "parameters": [ + "MaxSpeed" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -10984,39 +11841,31 @@ "name": "Behavior", "supplementaryInformation": "BoidsMovement::BoidsMovement", "type": "behavior" - }, - { - "description": "Steering Force", - "name": "SteeringForce", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if the object is rotated while moving on its path.", - "fullName": "Object Rotated", - "functionType": "Condition", + "description": "Change the maximum speed of the object.", + "fullName": "Maximum speed", + "functionType": "Action", "group": "Boids movement configuration", - "name": "ShouldRotate", - "sentence": "_PARAM0_ is rotated when moving", + "name": "SetMaxSpeed", + "sentence": "Change the maximum speed of _PARAM0_ to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BoidsMovement::BoidsMovement::PropertyShouldRotate" - }, - "parameters": ["Object", "Behavior"] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, - "parameters": ["True"] + "parameters": [ + "MaxSpeed", + "=", + "Value" + ] } ] } @@ -11032,16 +11881,21 @@ "name": "Behavior", "supplementaryInformation": "BoidsMovement::BoidsMovement", "type": "behavior" + }, + { + "description": "Max Speed", + "name": "Value", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Return the maximum speed.", - "fullName": "Maximum speed", + "description": "Return the maximum acceleration.", + "fullName": "Maximum acceleration", "functionType": "Expression", "group": "Boids movement configuration", - "name": "MaxSpeed", + "name": "MaxAcceleration", "sentence": "", "events": [ { @@ -11052,7 +11906,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["MaxSpeed"] + "parameters": [ + "MaxAcceleration" + ] } ] } @@ -11076,12 +11932,12 @@ "objectGroups": [] }, { - "description": "Return the maximum acceleration.", + "description": "Change the maximum acceleration of the object.", "fullName": "Maximum acceleration", - "functionType": "Expression", + "functionType": "Action", "group": "Boids movement configuration", - "name": "MaxAcceleration", - "sentence": "", + "name": "SetMaxAcceleration", + "sentence": "Change the maximum acceleration of _PARAM0_ to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -11089,16 +11945,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetNumberVariable" }, - "parameters": ["MaxAcceleration"] + "parameters": [ + "MaxAcceleration", + "=", + "Value" + ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -11110,6 +11967,11 @@ "name": "Behavior", "supplementaryInformation": "BoidsMovement::BoidsMovement", "type": "behavior" + }, + { + "description": "Steering Force", + "name": "Value", + "type": "expression" } ], "objectGroups": [] @@ -11130,7 +11992,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["CohesionRadius"] + "parameters": [ + "CohesionRadius" + ] } ] } @@ -11167,9 +12031,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyCohesionRadius" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "CohesionRadius", + "=", + "Value" + ] } ] } @@ -11210,7 +12078,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["AlignmentRadius"] + "parameters": [ + "AlignmentRadius" + ] } ] } @@ -11247,9 +12117,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyAlignmentRadius" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "AlignmentRadius", + "=", + "Value" + ] } ] } @@ -11290,7 +12164,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["SeparationRadius"] + "parameters": [ + "SeparationRadius" + ] } ] } @@ -11327,9 +12203,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertySeparationRadius" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "SeparationRadius", + "=", + "Value" + ] } ] } @@ -11370,7 +12250,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["CohesionWeight"] + "parameters": [ + "CohesionWeight" + ] } ] } @@ -11407,9 +12289,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyCohesionWeight" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "CohesionWeight", + "=", + "Value" + ] } ] } @@ -11450,7 +12336,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["AlignmentWeight"] + "parameters": [ + "AlignmentWeight" + ] } ] } @@ -11487,9 +12375,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertyAlignmentWeight" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "AlignmentWeight", + "=", + "Value" + ] } ] } @@ -11530,7 +12422,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["SeparationWeight"] + "parameters": [ + "SeparationWeight" + ] } ] } @@ -11567,9 +12461,13 @@ "actions": [ { "type": { - "value": "BoidsMovement::BoidsMovement::SetPropertySeparationWeight" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "Value"] + "parameters": [ + "SeparationWeight", + "=", + "Value" + ] } ] } @@ -11601,9 +12499,7 @@ "type": "Number", "unit": "PixelSpeed", "label": "Maximum speed", - "description": "", "group": "Movement", - "extraInformation": [], "name": "MaxSpeed" }, { @@ -11611,18 +12507,15 @@ "type": "Number", "unit": "PixelAcceleration", "label": "Maximum acceleration", - "description": "", "group": "Movement", - "extraInformation": [], "name": "MaxAcceleration" }, { "value": "true", "type": "Boolean", "label": "Rotate object", - "description": "", "group": "Movement", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "ShouldRotate" }, { @@ -11630,9 +12523,8 @@ "type": "Number", "unit": "Pixel", "label": "Cohesion sight radius", - "description": "", "group": "Sight", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "CohesionRadius" }, { @@ -11640,9 +12532,8 @@ "type": "Number", "unit": "Pixel", "label": "Alignement sight radius", - "description": "", "group": "Sight", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "AlignmentRadius" }, { @@ -11650,9 +12541,8 @@ "type": "Number", "unit": "Pixel", "label": "Separation sight radius", - "description": "", "group": "Sight", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "SeparationRadius" }, { @@ -11660,9 +12550,8 @@ "type": "Number", "unit": "Dimensionless", "label": "Cohesion decision weight", - "description": "", "group": "Decision", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "CohesionWeight" }, { @@ -11670,9 +12559,8 @@ "type": "Number", "unit": "Dimensionless", "label": "Alignment decision weight", - "description": "", "group": "Decision", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "AlignmentWeight" }, { @@ -11680,20 +12568,18 @@ "type": "Number", "unit": "Dimensionless", "label": "Separation decision weight", - "description": "", "group": "Decision", - "extraInformation": [], + "quickCustomizationVisibility": "hidden", "name": "SeparationWeight" }, { - "value": "", + "value": "0", "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TrajectoryDistance" + "unit": "Dimensionless", + "label": "Collision layer", + "advanced": true, + "quickCustomizationVisibility": "hidden", + "name": "CollisionLayer" } ], "sharedPropertyDescriptors": [] @@ -11706,6 +12592,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Sine (or ellipsis) Movement (deprecated)", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/extension-sinemovement-and-deptheffect", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNpbmUtd2F2ZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDIxQzEzLjUsMjEgMTIuMzEsMTYuNzYgMTEuMDUsMTIuMjhDMTAuMTQsOS4wNCA5LDUgNy41LDVDNC4xMSw1IDQsMTEuOTMgNCwxMkgyQzIsMTEuNjMgMi4wNiwzIDcuNSwzQzEwLjUsMyAxMS43MSw3LjI1IDEyLjk3LDExLjc0QzEzLjgzLDE0LjggMTUsMTkgMTYuNSwxOUMxOS45NCwxOSAyMC4wMywxMi4wNyAyMC4wMywxMkgyMi4wM0MyMi4wMywxMi4zNyAyMS45NywyMSAxNi41LDIxWiIgLz48L3N2Zz4=", "name": "SineMovement", @@ -11754,6 +12641,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -11787,13 +12676,23 @@ "type": { "value": "SineMovement::SineMovement::PropertyCenterPointX" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "SineMovement::SineMovement::PropertyCenterPointY" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] } ], "actions": [ @@ -11801,13 +12700,23 @@ "type": { "value": "SineMovement::SineMovement::SetPropertyCenterPointX" }, - "parameters": ["Object", "Behavior", "=", "Object.X()"] + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] }, { "type": { "value": "SineMovement::SineMovement::SetPropertyCenterPointY" }, - "parameters": ["Object", "Behavior", "=", "Object.Y()"] + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] } ] }, @@ -11830,7 +12739,12 @@ "type": { "value": "SineMovement::SineMovement::PropertyHorizontalDistance" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] } ], "actions": [ @@ -11853,7 +12767,12 @@ "type": { "value": "SineMovement::SineMovement::PropertyVerticalDistance" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] } ], "actions": [ @@ -11946,7 +12865,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertySineProgressY()"] + "parameters": [ + "Object.Behavior::PropertySineProgressY()" + ] } ] } @@ -11984,7 +12905,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertySineProgressX()"] + "parameters": [ + "Object.Behavior::PropertySineProgressX()" + ] } ] } @@ -12062,7 +12985,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyVerticalSpeed()"] + "parameters": [ + "Object.Behavior::PropertyVerticalSpeed()" + ] } ] } @@ -12180,7 +13105,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyCenterPointX()"] + "parameters": [ + "Object.Behavior::PropertyCenterPointX()" + ] } ] } @@ -12218,7 +13145,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyCenterPointY()"] + "parameters": [ + "Object.Behavior::PropertyCenterPointY()" + ] } ] } @@ -12526,13 +13455,23 @@ "type": { "value": "SineMovement::SineMovement::SetPropertySineProgressX" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] }, { "type": { "value": "SineMovement::SineMovement::SetPropertySineProgressY" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] } ] } @@ -12558,63 +13497,42 @@ "value": "60", "type": "Number", "label": "Horizontal speed, in degrees per second", - "description": "", - "group": "", - "extraInformation": [], "name": "HorizontalSpeed" }, { "value": "60", "type": "Number", "label": "Vertical speed, in degrees per second", - "description": "", - "group": "", - "extraInformation": [], "name": "VerticalSpeed" }, { "value": "100", "type": "Number", "label": "Horizontal distance: amplitude of the movement on X axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], "name": "HorizontalDistance" }, { "value": "0", "type": "Number", "label": "Vertical distance: amplitude of the movement on Y axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], "name": "VerticalDistance" }, { "value": "0", "type": "Number", "label": "Center of movement, X position", - "description": "", - "group": "", - "extraInformation": [], "name": "CenterPointX" }, { "value": "0", "type": "Number", "label": "Center of movement, Y position", - "description": "", - "group": "", - "extraInformation": [], "name": "CenterPointY" }, { "value": "0", "type": "Number", "label": "Counter used to change X position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SineProgressX" }, @@ -12622,9 +13540,6 @@ "value": "0", "type": "Number", "label": "Counter used to change Y position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SineProgressY" } @@ -12635,6 +13550,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] -} + "externalLayouts": [] +} \ No newline at end of file diff --git a/examples/buttons/buttons.json b/examples/buttons/buttons.json index c64de765d..ae2c33228 100755 --- a/examples/buttons/buttons.json +++ b/examples/buttons/buttons.json @@ -1,13 +1,15 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "landscape", "packageName": "com.example.gamename", @@ -16,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Button States", "description": "", @@ -51,7 +52,9 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -63,7 +66,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Play.png", "kind": "image", "metadata": "", @@ -76,7 +78,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Isometric Voxel Cactus_Stem.png", "kind": "image", "metadata": "", @@ -89,7 +90,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Isometric Voxel Cactus_Top.png", "kind": "image", "metadata": "", @@ -102,7 +102,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -115,7 +114,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -128,7 +126,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -151,10 +148,12 @@ "name": "Roboto-Regular.ttf" } } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -173,13 +172,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.6455105703311477, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -364,9 +366,9 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "c38dafef3b324b20cb46d73bda03ed7228f6e4600c9cfb1da8ed9269044d67a0", "name": "PlayButton", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -433,9 +435,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "8834ba7beffd0dbc7720870b67fecb748b4d36c86e46ee8d3e9016a385499035", "name": "IsometricVoxelCactus", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -529,8 +531,8 @@ { "assetStoreId": "3699f3a9dbcacb430dfb90834c239c60a0324b631635c6658396cd524c7adb0a", "name": "PanelSpriteButton", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Purple Button With Stone Frame", "variables": [], "effects": [], "behaviors": [], @@ -540,54 +542,8 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Button", - "font": "Roboto-Regular.ttf", - "textAlignment": "center", - "characterSize": 35, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } + "HoveredFadeOutDuration": 0.2, + "LabelText": "Button" } }, { @@ -612,6 +568,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 255, "particleBlue2": 255, + "particleColor1": "255;255;255", + "particleColor2": "51;77;255", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 255, @@ -627,7 +585,6 @@ "rendererParam1": 10, "rendererParam2": 10, "rendererType": "Line", - "tags": "", "tank": 100, "textureParticleName": "", "type": "ParticleSystem::ParticleEmitter", @@ -642,7 +599,6 @@ "italic": false, "name": "ButtonState", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -656,6 +612,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button State", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -664,7 +642,6 @@ "italic": false, "name": "ButtonStatesBehavior_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -678,6 +655,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button States Behavior", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 45, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -686,7 +685,6 @@ "italic": false, "name": "PanelSpriteButton_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -700,9 +698,57 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Panel Sprite Button", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 45, + "lineHeight": 0, + "color": "255;255;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "PlayButton" + }, + { + "objectName": "IsometricVoxelCactus" + }, + { + "objectName": "PanelSpriteButton" + }, + { + "objectName": "ClickParticles" + }, + { + "objectName": "ButtonState" + }, + { + "objectName": "ButtonStatesBehavior_Text" + }, + { + "objectName": "PanelSpriteButton_Text" + } + ] + }, "events": [ { "colorB": 224, @@ -771,8 +817,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change size", - "comment2": "" + "comment": "Change size" }, { "type": "BuiltinCommonInstructions::Standard", @@ -851,8 +896,7 @@ "textG": 0, "textR": 0 }, - "comment": "Show white outline", - "comment2": "" + "comment": "Show white outline" }, { "type": "BuiltinCommonInstructions::Standard", @@ -949,8 +993,7 @@ "textG": 0, "textR": 0 }, - "comment": "Darken", - "comment2": "" + "comment": "Darken" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1015,8 +1058,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change size", - "comment2": "" + "comment": "Change size" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1210,8 +1252,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create a text object above each button and create an object link between the two objects", - "comment2": "" + "comment": "Create a text object above each button and create an object link between the two objects" }, { "type": "BuiltinCommonInstructions::ForEach", @@ -1260,8 +1301,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update text based on the state of the button it is linked to", - "comment2": "" + "comment": "Update text based on the state of the button it is linked to" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1563,9 +1603,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 8071752, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -1583,10 +1630,38 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, { "name": "ButtonFSM", "type": "ButtonStates::ButtonFSM" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + }, { "name": "Tween", "type": "Tween::TweenBehavior" @@ -1601,14 +1676,15 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", "shortDescription": "A button that can be customized.", - "version": "1.4.3", + "version": "2.1.1", "description": [ - "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." ], @@ -1623,8 +1699,39 @@ "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -1640,62 +1747,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -1709,496 +1781,430 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -2207,13 +2213,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -2223,50 +2228,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -2336,22 +2442,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -2386,11 +2490,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -2435,11 +2538,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -2484,11 +2586,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -2533,11 +2634,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -2559,11 +2659,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2608,11 +2707,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -2657,11 +2755,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2710,7 +2807,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -2741,8 +2838,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -2750,25 +2845,35 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" - ], - "hidden": true, - "name": "State" - }, - { + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -2776,9 +2881,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -2786,9 +2888,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -2796,9 +2895,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -2808,10 +2904,314 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -2829,8 +3229,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown.", - "comment2": "" + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -2842,7 +3241,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -2854,7 +3253,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -2862,14 +3261,24 @@ }, { "type": { - "value": "Create" + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "", "Pressed", - "0", - "0", - "" + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { @@ -2897,64 +3306,26 @@ "=", "1" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Pressed", "=", - "2" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -2993,18 +3364,47 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ "Object", + "=", + "PressedLabelOffsetY", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -3042,8 +3442,7 @@ "textG": 0, "textR": 0 }, - "comment": "Show the right background accordingly to the new state.", - "comment2": "" + "comment": "Show the right background accordingly to the new state." }, { "type": "BuiltinCommonInstructions::Standard", @@ -3067,12 +3466,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -3107,10 +3507,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -3119,7 +3519,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -3127,7 +3527,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -3138,10 +3538,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -3165,10 +3565,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -3185,10 +3586,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -3217,12 +3619,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -3262,10 +3665,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -3294,12 +3698,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -3351,12 +3756,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -3388,127 +3794,6 @@ } ], "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -3519,22 +3804,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -3756,6 +4026,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -3764,21 +4035,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -3792,18 +4055,18 @@ "type": "object" }, { - "description": "", - "name": "LabelText", + "description": "Text", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -3812,18 +4075,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -3835,12 +4098,11 @@ "objectGroups": [] }, { - "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", - "fullName": "", - "functionType": "Expression", - "name": "CenterWithPaddingY", - "private": true, - "sentence": "", + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3848,17 +4110,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -3870,122 +4132,6 @@ ], "objectGroups": [] }, - { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", - "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, - { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" - ] - }, - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] - }, { "description": "De/activate interactions with the button.", "fullName": "De/activate interactions", @@ -3998,10 +4144,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -4024,10 +4172,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -4101,169 +4251,454 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "LeftPadding" }, { - "value": "0", - "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "RightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "LabelOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "TopPadding" + "objectGroups": [] }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "BottomPadding" + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { "value": "0.25", "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", "name": "HoveredFadeOutDuration" - } - ], - "objects": [ + }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", + "choices": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" } ], - "effects": [], - "behaviors": [ + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "3699f3a9dbcacb430dfb90834c239c60a0324b631635c6658396cd524c7adb0a", + "assetStoreOriginalName": "Purple Button With Stone Frame", + "name": "Purple Button With Stone Frame", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "74b3bb84-0bdf-4e85-a321-8b5462c65e1e", + "width": 283, + "x": 32, + "y": 51, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -4273,27 +4708,48 @@ "author": "", "category": "User interface", "extensionNamespace": "", - "fullName": "Button States", + "fullName": "Button states and effects", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", - "shortDescription": "Track user interaction with an object including hover, press, and click.", - "version": "1.0.0", - "description": "Provides conditions that change based on how the player is interacting with the object.", + "shortDescription": "Use any object as a button and change appearance according to user interactions.", + "version": "1.3.1", + "description": [ + "Use the \"Button states\" behavior to track user interactions with an object, including:", + "", + "- Hovered", + "- Pressed", + "- Clicked", + "- Idle", + "", + "Add additional behaviors to make juicy buttons with animated responses to user input:", + "", + "- Size", + "- Color", + "- Animation", + "- Object effects" + ], + "origin": { + "identifier": "ButtonStates", + "name": "gdevelop-extension-store" + }, "tags": [ "ui", - "button", - "fsm" + "button" ], "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "Track interaction with an object including hover, press, and click.", + "description": "Use objects as buttons.", "fullName": "Button states", "name": "ButtonFSM", "objectType": "", @@ -4301,7 +4757,7 @@ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -4323,19 +4779,17 @@ "textG": 0, "textR": 0 }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -4344,11 +4798,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -4374,8 +4827,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" + "comment": "Make sure the cursor position is only checked once per frame." }, { "type": "BuiltinCommonInstructions::Standard", @@ -4383,12 +4835,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -4398,11 +4850,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -4419,12 +4872,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -4439,8 +4892,7 @@ "textG": 0, "textR": 0 }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." }, { "type": "BuiltinCommonInstructions::Standard", @@ -4448,12 +4900,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -4463,11 +4915,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -4478,20 +4929,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -4523,11 +4974,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -4549,31 +4999,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -4589,22 +5038,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -4615,11 +5062,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -4634,11 +5080,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -4667,20 +5112,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -4689,36 +5134,4987 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"Idle\"" ] } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Enable effects on buttons based on their state.", + "fullName": "Button object effects", + "name": "ButtonObjectEffects", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "yes" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "IdleEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "IdleEffect", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "FocusedEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "FocusedEffect", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PressedEffect", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "PressedEffect", + "yes" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state effect of the object.", + "fullName": "Idle state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "IdleEffect", + "sentence": "the idle state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "IdleEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleEffect", + "name": "SetIdleEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state effect of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "FocusedEffect", + "sentence": "the focused state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FocusedEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedEffect", + "name": "SetFocusedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FocusedEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state effect of the object.", + "fullName": "Pressed state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "PressedEffect", + "sentence": "the pressed state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PressedEffect" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedEffect", + "name": "SetPressedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PressedEffect", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "choices": [], + "name": "Effect" + }, + { + "value": "", + "type": "String", + "label": "Idle state effect", + "group": "Effects", + "name": "IdleEffect" + }, + { + "value": "", + "type": "String", + "label": "Focused state effect", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Effects", + "name": "FocusedEffect" + }, + { + "value": "", + "type": "String", + "label": "Pressed state effect", + "group": "Effects", + "name": "PressedEffect" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Change the animation of buttons according to their state.", + "fullName": "Button animation", + "name": "ButtonAnimationName", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "IdleAnimationName" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change based on state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "IdleAnimationName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "FocusedAnimationName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "PressedAnimationName" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state animation name of the object.", + "fullName": "Idle state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "IdleAnimationName", + "sentence": "the idle state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "IdleAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleAnimationName", + "name": "SetIdleAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state animation name of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "FocusedAnimationName", + "sentence": "the focused state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FocusedAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedAnimationName", + "name": "SetFocusedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FocusedAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state animation name of the object.", + "fullName": "Pressed state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "PressedAnimationName", + "sentence": "the pressed state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PressedAnimationName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedAnimationName", + "name": "SetPressedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PressedAnimationName", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "choices": [], + "name": "Animation" + }, + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "Idle", + "type": "String", + "label": "Idle state animation name", + "group": "Animation", + "name": "IdleAnimationName" + }, + { + "value": "Focused", + "type": "String", + "label": "Focused state animation name", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Animation", + "name": "FocusedAnimationName" + }, + { + "value": "Pressed", + "type": "String", + "label": "Pressed state animation name", + "group": "Animation", + "name": "PressedAnimationName" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly change an effect on buttons according to their state.", + "fullName": "Button object effect tween", + "name": "ButtonObjectEffectTween", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "IdleValue" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleValue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedValue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedValue", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedValue", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Tween", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeIn\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "FadeInDuration", + "FadeInEasing", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeOut\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "FadeOutDuration", + "FadeOutEasing", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Time delta", + "functionType": "Expression", + "name": "TimeDelta", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TimeDelta() * LayerTimeScale(Object.Layer())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeIn\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenInitialValue", + "=", + "EffectValue" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTargetedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"FadeOut\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenInitialValue", + "=", + "EffectValue" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTargetedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Play tween", + "functionType": "Action", + "name": "PlayTween", + "private": true, + "sentence": "Tween the effect property of object _PARAM0_ over _PARAM2_ seconds with _PARAM3_ easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TweenTime", + "<", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TweenTime", + "+", + "Object.Behavior::TimeDelta()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TweenTime", + ">=", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "EffectValue", + "=", + "TweenTargetedValue" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::SetEffectDoubleParameter" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "EffectProperty", + "EffectValue" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the effect name of the object.", + "fullName": "Effect name", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectName", + "sentence": "the effect name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "EffectName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectProperty", + "sentence": "the effect parameter", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "EffectProperty" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", + "functionType": "Action", + "getterName": "EffectName", + "group": "Button effect tween configuration", + "name": "SetEffectProperty", + "sentence": "Change the tweened effect of _PARAM0_ to _PARAM2_ with parameter _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "EffectName", + "=", + "NewEffectName" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "EffectProperty", + "=", + "NewPropertyName" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Effect name", + "name": "NewEffectName", + "type": "string" + }, + { + "description": "Parameter name", + "name": "NewPropertyName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the idle effect parameter value of the object.", + "fullName": "Idle effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "IdleValue", + "sentence": "the idle effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "IdleValue" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleValue", + "name": "SetIdleValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "IdleValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused effect parameter value of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FocusedValue", + "sentence": "the focused effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FocusedValue" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedValue", + "name": "SetFocusedValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FocusedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed effect parameter value of the object.", + "fullName": "Pressed effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "PressedValue", + "sentence": "the pressed effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "PressedValue" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedValue", + "name": "SetPressedValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PressedValue", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeInEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeInEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeOutEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeOutEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeInDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeInDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeOutDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeOutDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "choices": [], + "name": "Effect" + }, + { + "value": "Effect", + "type": "String", + "label": "Effect name", + "group": "Effect", + "name": "EffectName" + }, + { + "value": "", + "type": "String", + "label": "Effect parameter", + "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "group": "Effect", + "name": "EffectProperty" + }, + { + "value": "0", + "type": "Number", + "label": "Idle effect parameter value", + "group": "Value", + "name": "IdleValue" + }, + { + "value": "0", + "type": "Number", + "label": "Focused effect parameter value", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Value", + "name": "FocusedValue" + }, + { + "value": "0", + "type": "Number", + "label": "Pressed effect parameter value", + "group": "Value", + "name": "PressedValue" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeOutEasing" + }, + { + "value": "0.125", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" + }, + { + "value": "0.5", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } + ], + "hidden": true, + "name": "PreviousState" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenInitialValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenTargetedValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TweenTime" + }, + { + "value": "NoTween", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } + ], + "hidden": true, + "name": "TweenState" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "EffectValue" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly resize buttons according to their state.", + "fullName": "Button scale tween", + "name": "ButtonScaleTween", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "=", + "IdleScale" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change based on state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleScale", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedScale", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "FocusedScale", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedScale", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state size scale of the object.", + "fullName": "Idle state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "IdleScale", + "sentence": "the idle state size scale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "IdleScale" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleScale", + "name": "SetIdleScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "IdleScale", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state size scale of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FocusedScale", + "sentence": "the focused state size scale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FocusedScale" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedScale", + "name": "SetFocusedScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FocusedScale", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state size scale of the object.", + "fullName": "Pressed state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "PressedScale", + "sentence": "the pressed state size scale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "PressedScale" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedScale", + "name": "SetPressedScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PressedScale", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeInDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeInDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FadeOutDuration" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "FadeOutDuration", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeInEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeInEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "FadeOutEasing" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "FadeOutEasing", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "choices": [], + "name": "Scale" + }, + { + "value": "", + "type": "Behavior", + "label": "Button states behavior (required)", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Tween behavior (required)", + "extraInformation": [ + "Tween::TweenBehavior" + ], + "choices": [], + "name": "Tween" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Idle state size scale", + "group": "Size", + "name": "IdleScale" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Focused state size scale", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Size", + "name": "FocusedScale" + }, + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" + }, + { + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, + { + "value": "0.95", + "type": "Number", + "unit": "Dimensionless", + "label": "Pressed state size scale", + "group": "Size", + "name": "PressedScale" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } + ], + "hidden": true, + "name": "PreviousState" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly change the color tint of buttons according to their state.", + "fullName": "Button color tint tween", + "name": "ButtonColorTintTween", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Object", + "IdleColorTint" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "IdleColorTint", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" ] - }, + } + ], + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -4727,52 +10123,23 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "\"Focused\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "ButtonStates::ButtonColorTintTween::FadeIn" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedOutside\"" + "FocusedColorTint", + "" ] } ] @@ -4782,178 +10149,216 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousState", + "=", + "\"Pressed\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", - "\"PressedOutside\"" + "\"Focused\"" ] - } - ], - "actions": [ + }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "ButtonStates::ButtonColorTintTween::FadeOut" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedInside\"" + "FocusedColorTint", + "" ] } ] } - ], - "parameters": [] + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - }, - { - "type": { - "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "PreviousState", + "!=", + "\"Pressed\"" ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "PreviousState", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "PressedColorTint", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectColorTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectColorTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", + "no", + "yes" + ] } - ], - "parameters": [] + ] } ], "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" } ], "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "onDeActivate", - "sentence": "", + "description": "the idle state color tint of the object.", + "fullName": "Idle state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "IdleColorTint", + "sentence": "the idle state color tint", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -4961,39 +10366,40 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::ResetState" + "value": "SetReturnString" }, "parameters": [ - "Object", - "Behavior", - "" + "IdleColorTint" ] } ] } ], + "expressionType": { + "type": "color" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Reset the state of the button.", - "fullName": "Reset state", - "functionType": "Action", - "name": "ResetState", - "private": true, - "sentence": "Reset the button state of _PARAM0_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleColorTint", + "name": "SetIdleColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5001,24 +10407,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - }, - { - "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", - "0" + "Value" ] } ] @@ -5028,268 +10422,408 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", + "description": "the focused state color tint of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FocusedColorTint", + "sentence": "the focused state color tint", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "FocusedColorTint" ] } ] } ], + "expressionType": { + "type": "color" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedColorTint", + "name": "SetFocusedColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", - "\"Validated\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state color tint of the object.", + "fullName": "Pressed state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "PressedColorTint", + "sentence": "the pressed state color tint", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "PressedColorTint" ] } ] } ], + "expressionType": { + "type": "color" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedColorTint", + "name": "SetPressedColorTint", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", - "\"Hovered\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "FadeInDuration" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "\"Hovered\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "FadeOutDuration" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "\"PressedOutside\"" + "Value" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "FadeInEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "FadeInEasing", + "=", + "Value" ] } ] @@ -5299,72 +10833,67 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the button is currently being pressed outside with mouse or touch.", - "fullName": "Is held outside", - "functionType": "Condition", - "name": "IsPressedOutside", - "sentence": "_PARAM0_ is held outside", + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "FadeOutEasing" ] } ] } ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the touch id that is using the button or 0 if none.", - "fullName": "Touch id", - "functionType": "ExpressionAndCondition", - "name": "TouchId", - "sentence": "the touch id", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5372,28 +10901,28 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetStringVariable" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "FadeOutEasing", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ButtonStates::ButtonFSM", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], @@ -5402,70 +10931,365 @@ ], "propertyDescriptors": [ { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" + "value": "", + "type": "Behavior", + "label": "Button states", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" }, { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", + "value": "", + "type": "Behavior", + "label": "Tween", "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "Tween::TweenBehavior" ], - "hidden": true, - "name": "State" + "choices": [], + "name": "Tween" }, { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" + "value": "255;255;255", + "type": "Color", + "label": "Idle state color tint", + "group": "Color", + "name": "IdleColorTint" }, { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" + "value": "192;192;192", + "type": "Color", + "label": "Focused state color tint", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Color", + "name": "FocusedColorTint" }, { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" + "value": "64;64;64", + "type": "Color", + "label": "Pressed state color tint", + "group": "Color", + "name": "PressedColorTint" }, { - "value": "", + "value": "0.1", "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "group": "Speed", + "name": "FadeInDuration" + }, + { + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "group": "Speed", + "name": "FadeOutDuration" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "group": "Speed", + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [], + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } + ], "hidden": true, - "name": "Index" + "name": "PreviousState" } ], "sharedPropertyDescriptors": [] @@ -5474,6 +11298,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/conviction-of-gun-dude-mobile/assets/Flat Bar Red Fill Bar.png b/examples/conviction-of-gun-dude-mobile/assets/Flat Bar Red Fill Bar.png new file mode 100644 index 000000000..ed4af9e9a Binary files /dev/null and b/examples/conviction-of-gun-dude-mobile/assets/Flat Bar Red Fill Bar.png differ diff --git a/examples/conviction-of-gun-dude-mobile/assets/Flat Bar White Border.png b/examples/conviction-of-gun-dude-mobile/assets/Flat Bar White Border.png new file mode 100644 index 000000000..14782eb17 Binary files /dev/null and b/examples/conviction-of-gun-dude-mobile/assets/Flat Bar White Border.png differ diff --git a/examples/conviction-of-gun-dude-mobile/assets/Healthbar.png b/examples/conviction-of-gun-dude-mobile/assets/Healthbar.png deleted file mode 100644 index 2e9ae9818..000000000 Binary files a/examples/conviction-of-gun-dude-mobile/assets/Healthbar.png and /dev/null differ diff --git a/examples/conviction-of-gun-dude-mobile/assets/HealthbarBorder.png b/examples/conviction-of-gun-dude-mobile/assets/HealthbarBorder.png deleted file mode 100644 index 02f8c923d..000000000 Binary files a/examples/conviction-of-gun-dude-mobile/assets/HealthbarBorder.png and /dev/null differ diff --git a/examples/conviction-of-gun-dude-mobile/assets/rotate-screen-icon.png b/examples/conviction-of-gun-dude-mobile/assets/rotate-screen-icon.png index ba619fae3..a7726dee3 100644 Binary files a/examples/conviction-of-gun-dude-mobile/assets/rotate-screen-icon.png and b/examples/conviction-of-gun-dude-mobile/assets/rotate-screen-icon.png differ diff --git a/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json b/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json index e215b988c..1a0174e94 100644 --- a/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json +++ b/examples/conviction-of-gun-dude-mobile/conviction-of-gun-dude-mobile.json @@ -1,7 +1,7 @@ { "firstLayout": "StartMenu", "gdVersion": { - "build": 221, + "build": 245, "major": 5, "minor": 5, "revision": 0 @@ -89,7 +89,8 @@ "leaderboard" ], "playableDevices": [ - "keyboard" + "keyboard", + "mobile" ], "extensionProperties": [], "platforms": [ @@ -230,22 +231,6 @@ "smoothed": false, "userAdded": true }, - { - "file": "assets/HealthbarBorder.png", - "kind": "image", - "metadata": "", - "name": "HealthbarBorder.png", - "smoothed": false, - "userAdded": true - }, - { - "file": "assets/Healthbar.png", - "kind": "image", - "metadata": "", - "name": "Healthbar.png", - "smoothed": false, - "userAdded": true - }, { "file": "assets/Room_4Way_Walls2.png", "kind": "image", @@ -1169,20 +1154,28 @@ "userAdded": true }, { - "file": "assets/Healthbar.png", + "file": "assets/Flat Bar Red Fill Bar.png", "kind": "image", "metadata": "", - "name": "assets\\Healthbar.png", + "name": "Flat Bar Red Fill Bar.png", "smoothed": false, - "userAdded": true + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Resource bars/pixel art/212e9679eaae4753beaa5d595d7c80ea66df3235485c6a3963e88b0d936a1798_Flat Bar Red Fill Bar.png", + "name": "Flat Bar Red Fill Bar.png" + } }, { - "file": "assets/HealthbarBorder.png", + "file": "assets/Flat Bar White Border.png", "kind": "image", "metadata": "", - "name": "assets\\HealthbarBorder.png", + "name": "Flat Bar White Border.png", "smoothed": false, - "userAdded": true + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Resource bars/pixel art/c090d31cafed0c8ef7bb4d5af75a7dbf7149bcc03a7d5d63ae997d59100e362e_Flat Bar White Border.png", + "name": "Flat Bar White Border.png" + } }, { "file": "assets/rotate-screen-icon.png", @@ -1192,12 +1185,11 @@ "smoothed": false, "userAdded": false, "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/assets/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", + "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", "name": "rotate-screen-icon.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -1221,13 +1213,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.6599999999999973, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -1368,6 +1363,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 100, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1428,6 +1424,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } } @@ -1819,6 +1816,7 @@ "ambientLightColorB": 32, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -1845,9 +1843,25 @@ } ], "behaviorsSharedData": [ + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, { "name": "ShakeObject_PositionAngle", "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] }, @@ -1866,13 +1880,16 @@ "gridType": "rectangular", "gridWidth": 16, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 0.8973490369514181, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -9190,6 +9207,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 10, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9232,6 +9250,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 10, + "lineHeight": 0, "color": "56;255;4" } }, @@ -9380,6 +9399,7 @@ "assetStoreId": "3d6c54e76a9a06cbd7629c1e78388d4ab808bbf36d644c61d6a14c9ad34d4f89", "name": "HealthBar", "type": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "variant": "Red Flat Bar", "variables": [], "effects": [], "behaviors": [ @@ -9397,74 +9417,6 @@ "BarRightPadding": 4, "MaxValue": 6, "InitialValue": 6 - }, - "childrenContent": { - "Background": { - "bottomMargin": 6, - "height": 34, - "leftMargin": 4, - "rightMargin": 4, - "texture": "assets\\HealthbarBorder.png", - "tiled": true, - "topMargin": 6, - "width": 224 - }, - "Buffer": { - "bottomMargin": 0, - "height": 24, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Healthbar.png", - "tiled": true, - "topMargin": 0, - "width": 24 - }, - "FillBar": { - "bottomMargin": 0, - "height": 24, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\Healthbar.png", - "tiled": true, - "topMargin": 0, - "width": 24 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "6 / 6", - "font": "PTSans-Bold.ttf", - "textAlignment": "center", - "characterSize": 22, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "6 / 6", - "font": "PTSans-Bold.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 22, - "color": "255;255;255" - } - } } }, { @@ -9506,6 +9458,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10104,6 +10057,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 22, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10151,6 +10105,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 22, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10198,6 +10153,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 22, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10245,6 +10201,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 22, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10390,6 +10347,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 100, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10450,6 +10408,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10510,6 +10469,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10570,6 +10530,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10676,6 +10637,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 25, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10718,6 +10680,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 25, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10828,6 +10791,7 @@ "assetStoreId": "", "name": "MovementJoystick", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -10909,6 +10873,7 @@ "assetStoreId": "", "name": "AimingJoystick", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", "variables": [], "effects": [], "behaviors": [ @@ -11003,6 +10968,7 @@ "assetStoreId": "e5919fb86a559b00001678c710efe55f4e9f2e032a9ff9610087370f998d57de", "name": "ScreenOrientationChecker", "type": "ScreenOrientationChecker::ScreenOrientationChecker", + "variant": "Black screen orientation checker", "variables": [], "effects": [], "behaviors": [ @@ -11022,116 +10988,6 @@ "BackgroundColor": "24;24;24", "CornerRadius": 8, "Padding": 5 - }, - "childrenContent": { - "BackgroundPainter": { - "fillOpacity": 255, - "outlineSize": 0, - "outlineOpacity": 255, - "absoluteCoordinates": true, - "clearBetweenFrames": true, - "antialiasing": "none", - "fillColor": { - "r": 0, - "g": 0, - "b": 0 - }, - "outlineColor": { - "r": 0, - "g": 0, - "b": 0 - } - }, - "Icon": { - "adaptCollisionMaskAutomatically": true, - "updateIfNotVisible": false, - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "rotate-screen-icon.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 52.5, - "y": 56.5 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 1 - }, - { - "x": 105, - "y": 1 - }, - { - "x": 105, - "y": 113 - }, - { - "x": 0, - "y": 113 - } - ] - ] - } - ] - } - ] - } - ] - }, - "Text": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" - } - } } } ], @@ -18822,6 +18678,7 @@ "ambientLightColorB": 32, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -18850,6 +18707,7 @@ "ambientLightColorB": 11412152, "ambientLightColorG": 6040208, "ambientLightColorR": 11290968, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -18867,6 +18725,7 @@ "ambientLightColorB": 9768528, "ambientLightColorG": 6034944, "ambientLightColorR": 7581144, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -18884,6 +18743,7 @@ "ambientLightColorB": -2147483632, "ambientLightColorG": 6040208, "ambientLightColorR": 11290968, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -18901,6 +18761,7 @@ "ambientLightColorB": 12199304, "ambientLightColorG": 6040208, "ambientLightColorR": 11978728, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -18918,6 +18779,7 @@ "ambientLightColorB": -2147483616, "ambientLightColorG": 6034944, "ambientLightColorR": 7337136, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -18935,6 +18797,7 @@ "ambientLightColorB": 12252528, "ambientLightColorG": 6034944, "ambientLightColorR": 12637240, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -19023,13 +18886,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 1, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -19079,6 +18945,7 @@ "ambientLightColorB": 0, "ambientLightColorG": 134217728, "ambientLightColorR": 1597066561, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -19114,6 +18981,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Fire bullets", + "gdevelopVersion": "", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", @@ -23869,17 +23737,12 @@ "unit": "Second", "label": "Firing cooldown", "description": "Objects cannot shoot while firing cooldown is active.", - "group": "", - "extraInformation": [], "name": "FireCooldown" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustFired" }, @@ -23887,9 +23750,6 @@ "value": "true", "type": "Boolean", "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], "name": "RotateBullet" }, { @@ -23899,7 +23759,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "FiringArc" }, { @@ -23908,7 +23767,6 @@ "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "BulletQuantity" }, { @@ -23918,7 +23776,6 @@ "label": "Angle variance", "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "AngleVariance" }, @@ -23929,7 +23786,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range.", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "BulletSpeedVariance" }, @@ -23937,9 +23793,6 @@ "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -23949,7 +23802,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ShotsPerReload" }, @@ -23960,7 +23812,6 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ReloadDuration" }, @@ -23968,9 +23819,7 @@ "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "MaxAmmo" }, @@ -23978,9 +23827,6 @@ "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -23989,8 +23835,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -23998,9 +23842,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -24008,9 +23849,7 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "StartingAmmo" }, @@ -24018,9 +23857,6 @@ "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, @@ -24028,9 +23864,7 @@ "value": "true", "type": "Boolean", "label": "Unlimited ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "UnlimitedAmmo" }, @@ -24038,9 +23872,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ReloadInProgress" }, @@ -24050,7 +23881,6 @@ "label": "Heat increase per shot (between 0 and 1)", "description": " Object is overheated when Heat reaches 1.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "HeatIncreasePerShot" }, @@ -24058,9 +23888,6 @@ "value": "0", "type": "Number", "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeatLevel" }, @@ -24068,9 +23895,7 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "AutomaticReloading" }, @@ -24081,7 +23906,6 @@ "label": "Overheat duration", "description": "Object cannot shoot while overheat duration is active.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "OverheatDuration" }, @@ -24089,9 +23913,7 @@ "value": "0.1", "type": "Number", "label": "Linear cooling rate (per second)", - "description": "", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "LinearCoolingRate" }, @@ -24105,6 +23927,7 @@ "Linear", "Exponential" ], + "choices": [], "advanced": true, "name": "ExponentialCoolingRate" }, @@ -24114,7 +23937,6 @@ "label": "Layer the bullets are created on", "description": "Base layer by default.", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -24122,9 +23944,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" } @@ -24139,18 +23958,19 @@ "category": "Input", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/multitouch-joystick", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", "name": "SpriteMultitouchJoystick", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", "shortDescription": "Joysticks or buttons for touchscreens.", - "version": "1.6.1", + "version": "1.9.0", "description": [ - "Multitouch joysticks can be used the same way as physical gamepads:", + "Multitouch joysticks are objects showing a joystick on the screen, useful for mobile. They work like a physical gamepad:", "- 4 or 8 directions", "- Analogus pads", "- Player selection", - "- Controls mapping for top-down movement and platformer characters", + "- Automatic \"mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the virtual joystick (it works by reading the multitouch joystick state and simulating controls). No need for additional events to make it work once the behaviors are set up.", "", "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." ], @@ -24214,6 +24034,28 @@ } ], "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, { "fullName": "Accelerated speed", "functionType": "Expression", @@ -24242,10 +24084,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", "<", "0" ] @@ -24270,10 +24112,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "TargetedSpeed" ] @@ -24297,20 +24139,20 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "TargetedSpeed" ] }, { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "0" ] @@ -24346,10 +24188,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">=", "0" ] @@ -24375,10 +24217,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", ">", "0" ] @@ -24403,10 +24245,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "TargetedSpeed" ] @@ -24430,20 +24272,20 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "TargetedSpeed" ] }, { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "0" ] @@ -24479,10 +24321,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<=", "0" ] @@ -24508,10 +24350,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"TargetedSpeed\"", + "TargetedSpeed", "=", "0" ] @@ -24524,10 +24366,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", "<", "0" ] @@ -24551,10 +24393,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "NumberVariable" }, "parameters": [ - "\"CurrentSpeed\"", + "CurrentSpeed", ">", "0" ] @@ -24632,11 +24474,11 @@ "objectGroups": [] }, { - "description": "Check if a button is pressed on a gamepad.", - "fullName": "Multitouch controller button pressed", + "description": "Check if a button was just pressed on a multitouch controller.", + "fullName": "Multitouch controller button just pressed", "functionType": "Condition", - "name": "IsButtonPressed", - "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ was just pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -24648,7 +24490,73 @@ "parameters": [ "Controllers[ControllerIdentifier].Buttons[Button].State", "=", - "\"Pressed\"" + "\"JustPressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is pressed on a multitouch controller.", + "fullName": "Multitouch controller button pressed", + "functionType": "Condition", + "name": "IsButtonPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"JustPressed\"" + ] + } ] } ], @@ -24680,7 +24588,7 @@ "objectGroups": [] }, { - "description": "Check if a button is released on a gamepad.", + "description": "Check if a button is released on a multitouch controller.", "fullName": "Multitouch controller button released", "functionType": "Condition", "name": "IsButtonReleased", @@ -24766,7 +24674,7 @@ { "description": "Button state", "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "supplementaryInformation": "[\"Idle\",\"Pressed\",\"JustPressed\",\"Released\"]", "type": "stringWithSelector" } ], @@ -25941,10 +25849,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsString" + "value": "StringVariable" }, "parameters": [ - "\"Side\"", + "Side", "=", "\"Left\"" ] @@ -25979,10 +25887,10 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsString" + "value": "StringVariable" }, "parameters": [ - "\"Side\"", + "Side", "=", "\"Right\"" ] @@ -26139,41 +26047,23 @@ "conditions": [ { "type": { - "value": "HasGameJustResumed" + "inverted": true, + "value": "SpriteMultitouchJoystick::IsInGameEdition" }, "parameters": [ + "", "" ] } ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Manage touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "HasAnyTouchOrMouseStarted" + "value": "HasGameJustResumed" }, "parameters": [ "" @@ -26183,176 +26073,207 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" }, "parameters": [ "Object", "Behavior", - "=", - "0" + "" ] } - ], + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Manage touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(TouchIndex)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "+", + "1" + ] + } ] } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "HasTouchEnded" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "", - "TouchId" - ] - } - ], - "actions": [ + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" + }, { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" - }, - "parameters": [ - "Object", - "Behavior", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update joystick position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ], + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update joystick position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "Object", + "Behavior", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", + "" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" - ] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", - "" - ] - } - ] + "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -26424,11 +26345,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "JoystickForce", "=", "Value" ] @@ -26522,11 +26442,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "JoystickAngle", "=", "Value" ] @@ -26792,11 +26711,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -26855,11 +26773,10 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -26936,11 +26853,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyControllerIdentifier" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ControllerIdentifier", "=", "Value" ] @@ -27017,11 +26933,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickIdentifier" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "JoystickIdentifier", "=", "Value" ] @@ -27098,11 +27013,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyDeadZoneRadius" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "DeadZoneRadius", "=", "Value" ] @@ -27150,11 +27064,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "Value" ] @@ -27188,18 +27101,12 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "String", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": [], "name": "JoystickIdentifier" }, { @@ -27207,17 +27114,12 @@ "type": "Number", "label": "Dead zone radius (range: 0 to 1)", "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "group": "", - "extraInformation": [], "name": "DeadZoneRadius" }, { "value": "0", "type": "Number", "label": "Joystick angle (range: -180 to 180)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JoystickAngle" }, @@ -27225,9 +27127,6 @@ "value": "0", "type": "Number", "label": "Joystick force (range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "JoystickForce" }, @@ -27235,9 +27134,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -27245,9 +27141,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" } @@ -27255,7 +27148,7 @@ "sharedPropertyDescriptors": [] }, { - "description": "Detect button presses made on a touchscreen.", + "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", "name": "MultitouchButton", "objectType": "", @@ -27271,11 +27164,11 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::IsReleased" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "IsReleased", + "True", "" ] } @@ -27283,12 +27176,50 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsReleased", + "False", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" }, "parameters": [ "Object", "Behavior", - "no" + "\"Idle\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" ] }, { @@ -27298,7 +27229,7 @@ "parameters": [ "Object", "Behavior", - "\"Idle\"", + "\"Pressed\"", "" ] } @@ -27330,11 +27261,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIndex", "=", "0" ] @@ -27368,11 +27298,10 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyRadius" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Radius", ">", "DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer()), TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer()))" ] @@ -27383,11 +27312,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(TouchIndex)" ] @@ -27399,7 +27327,17 @@ "parameters": [ "Object", "Behavior", - "\"Pressed\"", + "\"JustPressed\"", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", "" ] } @@ -27411,11 +27349,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIndex", "+", "1" ] @@ -27463,21 +27400,30 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsReleased", + "True", + "" ] }, { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "IsJustPressed", + "False", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", "=", "0" ] @@ -27501,22 +27447,23 @@ "objectGroups": [] }, { - "description": "Check if button is released.", - "fullName": "Button released", + "description": "Check if the button was just pressed.", + "fullName": "Button just pressed", "functionType": "Condition", - "name": "IsReleased", - "sentence": "Button _PARAM0_ is released", + "name": "IsJustPressed", + "sentence": "Button _PARAM0_ was just pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyIsReleased" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsJustPressed", + "True", + "" ] } ], @@ -27548,7 +27495,7 @@ "objectGroups": [] }, { - "description": "Check if button is pressed.", + "description": "Check if the button is pressed.", "fullName": "Button pressed", "functionType": "Condition", "name": "IsPressed", @@ -27559,11 +27506,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -27596,6 +27542,54 @@ ], "objectGroups": [] }, + { + "description": "Check if the button is released.", + "fullName": "Button released", + "functionType": "Condition", + "name": "IsReleased", + "sentence": "Button _PARAM0_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "fullName": "Button state", "functionType": "Action", @@ -27637,7 +27631,7 @@ { "description": "Button state", "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "supplementaryInformation": "[\"Idle\",\"JustPressed\",\"Pressed\",\"Released\"]", "type": "stringWithSelector" } ], @@ -27649,27 +27643,18 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "A", "type": "String", "label": "Button identifier", - "description": "", - "group": "", - "extraInformation": [], "name": "ButtonIdentifier" }, { "value": "0", "type": "Number", "label": "TouchID", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -27677,9 +27662,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIndex" }, @@ -27687,20 +27669,22 @@ "value": "", "type": "Boolean", "label": "Button released", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsReleased" }, + { + "value": "", + "type": "Boolean", + "label": "Button just pressed", + "hidden": true, + "name": "IsJustPressed" + }, { "value": "0", "type": "Number", "unit": "Pixel", "label": "Triggering circle radius", "description": "This circle adds up to the object collision mask.", - "group": "", - "extraInformation": [], "name": "Radius" } ], @@ -27711,6 +27695,7 @@ "fullName": "Platformer multitouch controller mapper", "name": "PlatformerMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -27888,184 +27873,40 @@ "value": "", "type": "Behavior", "label": "Platform character behavior", - "description": "", - "group": "", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], + "choices": [], "name": "Property" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" - ], - "name": "JoystickIdentifier" - }, - { - "value": "A", - "type": "String", - "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], - "name": "JumpButton" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D platformer multitouch controller mapper", - "name": "Platformer3DMultitouchMapper", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::StickForce" - }, - "parameters": [ - "", - ">", - "0", - "ControllerIdentifier", - "JoystickIdentifier", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "=", - "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" - ] - }, - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateStick" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D", - "-90", - "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::IsButtonPressed" - }, - "parameters": [ - "", - "ControllerIdentifier", - "JumpButton", - "\"Down\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PhysicsCharacter3D" - ] - } - ] - } - ], - "parameters": [ + "choices": [ { - "description": "Object", - "name": "Object", - "type": "object" + "label": "Primary", + "value": "Primary" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", - "type": "behavior" + "label": "Secondary", + "value": "Secondary" } ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D physics character", - "description": "", - "group": "", - "extraInformation": [ - "Physics3D::PhysicsCharacter3D" - ], - "name": "PhysicsCharacter3D" - }, - { - "value": "1", - "type": "Number", - "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "Choice", - "label": "Walk joystick", - "description": "", - "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" - ], "name": "JoystickIdentifier" }, { "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -28073,9 +27914,153 @@ }, { "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D shooter multitouch controller mapper", - "name": "Shooter3DMultitouchMapper", + "fullName": "3D platformer multitouch controller mapper", + "name": "Platformer3DMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "=", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "-90", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D shooter multitouch controller mapper", + "name": "Shooter3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -28163,31 +28148,32 @@ "value": "", "type": "Behavior", "label": "3D physics character", - "description": "", - "group": "", "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Walk joystick", - "description": "", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -28195,9 +28181,7 @@ "value": "A", "type": "String", "label": "Jump button name", - "description": "", "group": "Controls", - "extraInformation": [], "name": "JumpButton" } ], @@ -28208,6 +28192,7 @@ "fullName": "First person camera multitouch controller mapper", "name": "FirstPersonMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -28233,11 +28218,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyCurrentRotationSpeedZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentRotationSpeedZ", "=", "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedZ, SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)" ] @@ -28254,11 +28238,10 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyCurrentRotationSpeedY" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentRotationSpeedY", "=", "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedY, SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)" ] @@ -28458,11 +28441,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyHorizontalRotationSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationSpeedMax", "=", "Value" ] @@ -28539,11 +28521,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyHorizontalRotationAcceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationAcceleration", "=", "Value" ] @@ -28620,11 +28601,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyHorizontalRotationDeceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationDeceleration", "=", "Value" ] @@ -28701,11 +28681,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalRotationSpeedMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationSpeedMax", "=", "Value" ] @@ -28782,11 +28761,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalRotationAcceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationAcceleration", "=", "Value" ] @@ -28863,11 +28841,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalRotationDeceleration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationDeceleration", "=", "Value" ] @@ -28944,11 +28921,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalAngleMin" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalAngleMin", "=", "Value" ] @@ -29025,11 +29001,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyVerticalAngleMax" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalAngleMax", "=", "Value" ] @@ -29106,11 +29081,10 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::SetPropertyOffsetZ" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OffsetZ", "=", "Value" ] @@ -29139,31 +29113,32 @@ "value": "", "type": "Behavior", "label": "3D capability", - "description": "", - "group": "", "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Secondary", "type": "Choice", "label": "Camera joystick", - "description": "", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "CameraStick" }, @@ -29172,27 +29147,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationSpeedMax" }, { "value": "360", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationAcceleration" }, { "value": "720", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Horizontal rotation", - "extraInformation": [], "name": "HorizontalRotationDeceleration" }, { @@ -29200,27 +29169,21 @@ "type": "Number", "unit": "AngularSpeed", "label": "Maximum rotation speed", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationSpeedMax" }, { "value": "240", "type": "Number", "label": "Rotation acceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationAcceleration" }, { "value": "480", "type": "Number", "label": "Rotation deceleration", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalRotationDeceleration" }, { @@ -29228,9 +29191,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Minimum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMin" }, { @@ -29238,9 +29199,7 @@ "type": "Number", "unit": "DegreeAngle", "label": "Maximum angle", - "description": "", "group": "Vertical rotation", - "extraInformation": [], "name": "VerticalAngleMax" }, { @@ -29248,9 +29207,7 @@ "type": "Number", "unit": "Pixel", "label": "Z position offset", - "description": "", "group": "Position", - "extraInformation": [], "name": "OffsetZ" }, { @@ -29258,9 +29215,6 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Z", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedZ" }, @@ -29269,20 +29223,196 @@ "type": "Number", "unit": "AngularSpeed", "label": "Current rotation speed Y", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentRotationSpeedY" } ], "sharedPropertyDescriptors": [] }, + { + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "name": "PhysicsCar3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "SteerJoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateSteeringStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, \"Primary\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "SpeedJoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateAcceleratorStick" + }, + "parameters": [ + "Object", + "PhysicsCar3D", + "-SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, \"Secondary\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "HandBrakeButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCar3D::SimulateHandBrakeKey" + }, + "parameters": [ + "Object", + "PhysicsCar3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::PhysicsCar3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics car", + "extraInformation": [ + "Physics3D::PhysicsCar3D" + ], + "choices": [], + "name": "PhysicsCar3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Steer joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SteerJoystickIdentifier" + }, + { + "value": "Secondary", + "type": "Choice", + "label": "Speed joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SpeedJoystickIdentifier" + }, + { + "value": "B", + "type": "String", + "label": "Hand brake button name", + "group": "Controls", + "name": "HandBrakeButton" + } + ], + "sharedPropertyDescriptors": [] + }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", "name": "TopDownMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -29295,11 +29425,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"Analog\"" ] @@ -29324,11 +29453,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"360°\"" ] @@ -29353,11 +29481,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"8 Directions\"" ] @@ -29796,31 +29923,31 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], + "choices": [], "name": "TopDownMovement" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -29828,12 +29955,20 @@ "value": "Analog", "type": "Choice", "label": "Stick mode", - "description": "", "group": "Controls", - "extraInformation": [ - "Analog", - "360°", - "8 Directions" + "choices": [ + { + "label": "Analog", + "value": "Analog" + }, + { + "label": "360°", + "value": "360°" + }, + { + "label": "8 Directions", + "value": "8 Directions" + } ], "name": "StickMode" } @@ -29854,6 +29989,112 @@ "fullName": "Multitouch Joystick", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Thumb", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Border", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "MultitouchJoystick", + "type": "SpriteMultitouchJoystick::MultitouchJoystick", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Primary", + "FloatingEnabled": false, + "DeadZoneRadius": 0.4, + "JoystickAngle": 0, + "JoystickForce": 0, + "TouchId": 0, + "TouchIndex": 0 + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Thumb" + }, + { + "objectName": "Border" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -29970,62 +30211,92 @@ "name": "doStepPostEvents", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreAutour" - }, - "parameters": [ - "Thumb", - "Border", - "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", - "Border.MultitouchJoystick::JoystickAngle()" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::PropertyShouldBeHiddenWhenReleased" - }, - "parameters": [ - "Object" - ] - }, { "type": { "inverted": true, - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" + "value": "SpriteMultitouchJoystick::IsInGameEdition" }, "parameters": [ - "Object", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Cache" - }, - "parameters": [ - "Object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "Thumb", + "Border", + "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", + "Border.MultitouchJoystick::JoystickAngle()" + ] + } ] }, { - "type": { - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" - }, - "parameters": [ - "Object", - "no", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "True", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" + }, + "parameters": [ + "Object", + "no", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "False", + "" + ] + } ] } ] @@ -30187,11 +30458,12 @@ }, { "type": { - "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::SetPropertyShouldBeHiddenWhenReleased" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShouldBeHiddenWhenReleased", + "True", + "" ] }, { @@ -30317,10 +30589,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -30342,10 +30616,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -30955,20 +31231,21 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -30977,8 +31254,6 @@ "type": "Number", "label": "Dead zone radius (range: 0 to 1)", "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "group": "", - "extraInformation": [], "name": "DeadZoneRadius" }, { @@ -30986,10 +31261,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -30998,8 +31273,6 @@ "type": "Number", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -31008,10 +31281,10 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbIsScaledProportionally" }, @@ -31020,8 +31293,6 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ParentOrigin" }, @@ -31029,117 +31300,11 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldBeHiddenWhenReleased" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "Thumb", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] - }, - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "Border", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "MultitouchJoystick", - "type": "SpriteMultitouchJoystick::MultitouchJoystick", - "ControllerIdentifier": 1, - "JoystickIdentifier": "Primary", - "FloatingEnabled": false, - "DeadZoneRadius": 0.4, - "JoystickAngle": 0, - "JoystickForce": 0, - "TouchId": 0, - "TouchIndex": 0 - } - ], - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Thumb" - }, - { - "objectName": "Border" - } - ] - }, - "objectsGroups": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ - { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 - } - ], - "effects": [] - } - ], - "instances": [] + "variants": [] } ] }, @@ -31148,12 +31313,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Resource bar (continuous)", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/resource-bar", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjgsMTJIMTRINGMtMi4yLDAtNCwxLjgtNCw0czEuOCw0LDQsNGgxMGgxNGMyLjIsMCw0LTEuOCw0LTRTMzAuMiwxMiwyOCwxMnogTTQsMThjLTEuMSwwLTItMC45LTItMnMwLjktMiwyLTJoMTANCgljMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJINHoiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteContinuousBar", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Interface Elements/ea06363a57846caab544f536b78a952234b68d4941d41c1577852a1d61aefec3_Interface Elements_interface_ui_loading_progress_bar.svg", "shortDescription": "A bar that represents a resource in the game (health, mana, ammo, etc).", - "version": "1.1.3", + "version": "2.0.0", "description": [ "A bar that represents a resource in the game (health, mana, ammo, etc).", "", @@ -31178,6 +31344,12 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1", "q8ubdigLvIRXLxsJDDTaokO41mc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Resource bars now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing resource bars in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], "globalVariables": [], "sceneVariables": [], @@ -31269,7 +31441,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Value" + "CurrentValue" ] } ] @@ -31306,11 +31478,10 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", "clamp(Value, 0, Object.Behavior::MaxValue())" ] @@ -31322,11 +31493,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Value", "<", "Object.Behavior::PreviousHighValue()" ] @@ -31349,11 +31519,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Value", ">=", "PreviousHighValue" ] @@ -31442,11 +31611,10 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", "Value" ] @@ -31481,11 +31649,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", "0" ] @@ -31530,11 +31697,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", "MaxValue" ] @@ -31620,13 +31786,12 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyPreviousHighValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValue", "=", - "Value" + "CurrentValue" ] } ] @@ -31701,11 +31866,10 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyPreviousHighValueDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValueDuration", "=", "Value" ] @@ -31740,14 +31904,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PreviousHighValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValue", "!=", - "Value", - "" + "CurrentValue" ] }, { @@ -31795,27 +31957,18 @@ "value": "1", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "name": "Value" + "name": "CurrentValue" }, { "value": "3", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxValue" }, { "value": "", "type": "Number", "label": "Previous high value", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousHighValue" }, @@ -31823,9 +31976,7 @@ "value": "1", "type": "Number", "label": "Previous high value conservation duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], + "hidden": true, "name": "PreviousHighValueDuration" } ], @@ -31834,7 +31985,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -31843,8 +31994,278 @@ "defaultName": "ResourceBar", "description": "A bar that represents a resource in the game (health, mana, ammo, etc).", "fullName": "Resource bar (continuous)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteContinuousBar", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 4, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "2 / 3", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "2 / 3", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ResourceBar", + "type": "PanelSpriteContinuousBar::ResourceBar", + "Value": 1, + "MaxValue": 3, + "PreviousValue": 0, + "CurrentValue": 1 + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Buffer", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Buffer" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "fa2b0c42-1baa-489d-9c47-87ec233cbe8c", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "Buffer", + "persistentUuid": "6e01eec9-ca43-4a5c-b4e1-4d9d384473e2", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "4833affb-a8d1-4a2b-9019-a20cf5fdc68e", + "width": 196, + "x": 10, + "y": 10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "0e63f21c-2071-4765-8254-e9021fa84ec4", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 4, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -31862,7 +32283,7 @@ "textG": 0, "textR": 0 }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31870,12 +32291,100 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "FillBar", + "Anchor", + "" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Buffer", + "Anchor", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Buffer", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - (max(FillBar.BoundingBoxRight(), Buffer.BoundingBoxRight()) - min(FillBar.BoundingBoxLeft(), Buffer.BoundingBoxLeft()))" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - (max(FillBar.BoundingBoxBottom(), Buffer.BoundingBoxBottom()) - min(FillBar.BoundingBoxTop(), Buffer.BoundingBoxTop()))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Buffer", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - (FillBar.BoundingBoxRight() - FillBar.BoundingBoxLeft())" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - (FillBar.BoundingBoxBottom() - FillBar.BoundingBoxTop())" + ] + } ] } ] @@ -31890,7 +32399,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances." + "comment": "This allows to detect a change of \"intial value\" on hot reload." }, { "type": "BuiltinCommonInstructions::Standard", @@ -31898,60 +32407,38 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Background", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "FillBar", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Background", - "=", - "1" - ] - }, - { - "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "FillBar", + "PreviousInitialValue", "=", - "3" + "InitialValue" ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create the child-object instances." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyPreviousHighValueDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - ">", + "PreviousHighValueDuration", + "=", "0" ] } @@ -31959,25 +32446,12 @@ "actions": [ { "type": { - "value": "Create" + "value": "Delete" }, "parameters": [ - "", "Buffer", - "0", - "0", "" ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Buffer", - "=", - "2" - ] } ] }, @@ -31993,62 +32467,18 @@ }, "comment": "Create the label over the bar." }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Label", - "=", - "4" - ] - }, - { - "type": { - "value": "TextObject::SetTextAlignment" - }, - "parameters": [ - "Label", - "\"center\"" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyShowLabel" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabel", + "True", + "" ] } ], @@ -32086,50 +32516,62 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetValue" + "value": "PanelSpriteContinuousBar::ResourceBar::SetValue" }, "parameters": [ - "Object", + "FillBar", + "ResourceBar", "=", - "Object.PropertyInitialValue()", - "Object.PropertyInitialValue()" + "InitialValue", + "" ] }, { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPreviousValueDuration" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ - "Object", + "FillBar", + "Resizable", "=", - "Object.PropertyPreviousHighValueDuration()", - "" + "Object.WidthForValue()" ] }, { "type": { - "value": "Tween::RemoveTween" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ - "FillBar", - "Tween", - "\"ChangeValue\"" + "Buffer", + "Resizable", + "=", + "FillBar.Width()" ] }, { "type": { - "value": "PanelSpriteObject::Width" + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPreviousValueDuration" }, "parameters": [ - "FillBar", + "Object", "=", - "Object.WidthForValue()" + "PreviousHighValueDuration", + "" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLabel" + }, + "parameters": [ + "Object", + "" ] } ] @@ -32171,7 +32613,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] } @@ -32182,24 +32624,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -32209,7 +32651,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] }, @@ -32220,7 +32662,7 @@ "parameters": [ "Object", "=", - "Object.PropertyPreviousHighValueDuration()", + "PreviousHighValueDuration", "" ] }, @@ -32242,10 +32684,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] @@ -32270,141 +32713,101 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "NumberVariable" }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the bar size is refreshed according to the value\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Background.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Background.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Width" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Height" - ] - }, - { - "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "variables": [ - { - "name": "Width", - "type": "number", - "value": 0 - }, - { - "name": "Height", - "type": "number", - "value": 0 - } - ] - } + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.WidthForValue()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "Buffer", + "Resizable", + "=", + "FillBar.Width()" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "FillBar", + "Tween", + "\"ChangeValue\"" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Buffer", + "Tween", + "\"ChangeValue\"" ] } - ], - "parameters": [] + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "Buffer", + "Resizable", + "=", + "FillBar.Height()" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", @@ -32429,7 +32832,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectWidthTween" + "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ "Buffer", @@ -32437,7 +32840,7 @@ "\"ChangeValue\"", "Object.WidthForValue()", "\"linear\"", - "Object.PropertyEasingDuration() * 1000", + "EasingDuration", "" ] } @@ -32448,10 +32851,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::Width" }, "parameters": [ "FillBar", + "Resizable", "<", "Buffer.Width()" ] @@ -32474,10 +32878,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::Width" }, "parameters": [ "FillBar", + "Resizable", ">=", "Buffer.Width()" ] @@ -32519,121 +32924,25 @@ "actions": [ { "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] }, { "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Buffer", - "=", - "FillBar.X()", - "=", - "FillBar.Y()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "Buffer", + "Resizable", "=", "FillBar.Width()" ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Buffer", - "=", - "FillBar.Height()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Object.FullBarWidth()" - ] - }, - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "FillBar.CenterY()" - ] - }, - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()) / 2" - ] } ] } @@ -32714,10 +33023,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "EasingDuration", ">", "0" ] @@ -32726,7 +33035,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectWidthTween" + "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ "FillBar", @@ -32734,7 +33043,7 @@ "\"ChangeValue\"", "Object.WidthForValue()", "\"linear\"", - "Object.PropertyEasingDuration() * 1000", + "EasingDuration", "" ] } @@ -32745,10 +33054,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "EasingDuration", "<=", "0" ] @@ -32757,10 +33066,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] @@ -32799,10 +33109,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "Buffer", + "Resizable", "=", "round(Object.FullBarWidth() * FillBar.ResourceBar::PreviousHighValue() / FillBar.ResourceBar::MaxValue())" ] @@ -32843,7 +33154,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "FillBar.ResourceBar::PropertyMaxValue()" + "FillBar.ResourceBar::MaxValue()" ] } ] @@ -33027,7 +33338,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "FillBar.ResourceBar::PropertyPreviousHighValueDuration()" + "FillBar.ResourceBar::PreviousHighValueDuration()" ] } ] @@ -33235,7 +33546,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -33267,10 +33578,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyShowLabel" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabel", + "True", + "" ] } ], @@ -33310,21 +33623,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyShowLabel" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "ShowLabel", + "False", + "" ] }, { @@ -33342,21 +33658,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyShowLabel" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShowLabel", + "True", + "" ] }, { @@ -33400,10 +33719,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(round(Object.Value())) + \" / \" + ToString(Object.MaxValue())" ] @@ -33423,74 +33743,16 @@ } ], "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarLeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarTopPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarRightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarBottomPadding" - }, { "value": "3", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxValue" }, { "value": "3", "type": "Number", "label": "Initial value", - "description": "", - "group": "", - "extraInformation": [], "name": "InitialValue" }, { @@ -33498,235 +33760,325 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, { "value": "1", "type": "Number", + "unit": "Second", "label": "Previous high value conservation duration (in seconds)", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PreviousHighValueDuration" }, { "value": "0.25", "type": "Number", + "unit": "Second", "label": "Easing duration", - "description": "", "group": "Animation", - "extraInformation": [], "name": "EasingDuration" }, { "value": "true", "type": "Boolean", "label": "Show the label", - "description": "", - "group": "", "extraInformation": [ "Label" ], + "choices": [], "name": "ShowLabel" }, { - "value": "", - "type": "Boolean", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "Buffer" - ], "hidden": true, - "name": "ShowBuffer" + "name": "BarLeftPlusRightMargin" }, { - "value": "Center", - "type": "String", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "Label" - ], "hidden": true, - "name": "LabelVerticalAnchorOrigin" + "name": "BarTopPlusBottomMargin" }, { - "value": "Center", - "type": "String", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "FillBar" - ], "hidden": true, - "name": "LabelVerticalAnchorTarget" + "name": "OldParentWidth" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "2 / 3", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "2 / 3", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ResourceBar", - "type": "PanelSpriteContinuousBar::ResourceBar", - "Value": 1, - "MaxValue": 3, - "PreviousValue": 0 - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Buffer", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "FillBar" - }, - { - "objectName": "Buffer" + "variants": [ + { + "areaMaxX": 224, + "areaMaxY": 34, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "3d6c54e76a9a06cbd7629c1e78388d4ab808bbf36d644c61d6a14c9ad34d4f89", + "assetStoreOriginalName": "Red Flat Bar", + "name": "Red Flat Bar", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "8 / 16", + "font": "", + "textAlignment": "center", + "characterSize": 16, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "8 / 16", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 24, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "Flat Bar Red Fill Bar.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 24, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ResourceBar", + "type": "PanelSpriteContinuousBar::ResourceBar", + "Value": 1, + "MaxValue": 3, + "PreviousValue": 0, + "CurrentValue": 1 + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 24, + "leftMargin": 0, + "name": "Buffer", + "rightMargin": 0, + "texture": "Flat Bar Red Fill Bar.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 24, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 6, + "height": 34, + "leftMargin": 4, + "name": "Background", + "rightMargin": 4, + "texture": "Flat Bar White Border.png", + "tiled": false, + "topMargin": 6, + "type": "PanelSpriteObject::PanelSprite", + "width": 224, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Buffer" + }, + { + "objectName": "Background" + } + ] }, - { - "objectName": "Background" - } - ] - }, - "objectsGroups": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ - { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 - } - ], - "effects": [] + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 24, + "keepRatio": true, + "layer": "", + "name": "FillBar", + "persistentUuid": "5a0d266a-f680-4580-8e30-0a8516815f9a", + "width": 216, + "x": 4, + "y": 4, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 24, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "03472802-6b7f-42d1-bf9b-68bf9d0d399f", + "width": 216, + "x": 4, + "y": 16, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {} } - ], - "instances": [] + ] } ] }, @@ -33735,6 +34087,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Flash layer", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", "name": "FlashLayer", @@ -33837,6 +34190,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Health points and damage", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWhlYXJ0LWhhbGYtZnVsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDVDMTUsNSAxMy41OCw1LjkxIDEzLDcuMlYxNy43NEMxNy4yNSwxMy44NyAyMCwxMS4yIDIwLDguNUMyMCw2LjUgMTguNSw1IDE2LjUsNU0xNi41LDNDMTkuNTgsMyAyMiw1LjQxIDIyLDguNUMyMiwxMi4yNyAxOC42LDE1LjM2IDEzLjQ1LDIwLjAzTDEyLDIxLjM1TDEwLjU1LDIwLjAzQzUuNCwxNS4zNiAyLDEyLjI3IDIsOC41QzIsNS40MSA0LjQyLDMgNy41LDNDOS4yNCwzIDEwLjkxLDMuODEgMTIsNS4wOEMxMy4wOSwzLjgxIDE0Ljc2LDMgMTYuNSwzWiIgLz48L3N2Zz4=", "name": "Health", @@ -38490,18 +38844,14 @@ "value": "100", "type": "Number", "label": "Starting health", - "description": "", "group": "Health", - "extraInformation": [], "name": "Health" }, { "value": "0", "type": "Number", "label": "Current health (life) points", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "CurrentHealth" }, @@ -38511,7 +38861,6 @@ "label": "Maximum health", "description": "Use 0 for no maximum.", "group": "Health", - "extraInformation": [], "name": "MaxHealth" }, { @@ -38519,18 +38868,14 @@ "type": "Number", "unit": "Second", "label": "Damage cooldown", - "description": "", "group": "Health", - "extraInformation": [], "name": "DamageCooldown" }, { "value": "", "type": "Boolean", "label": "Allow heals to increase health above max health (regen will never exceed max health)", - "description": "", "group": "Health", - "extraInformation": [], "advanced": true, "name": "AllowOverHealing" }, @@ -38538,9 +38883,7 @@ "value": "", "type": "Boolean", "label": "", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "IsHealthJustDamaged" }, @@ -38548,9 +38891,7 @@ "value": "0", "type": "Number", "label": "Damage to health from the previous incoming damage", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "DamageToBeApplied" }, @@ -38558,9 +38899,7 @@ "value": "", "type": "Boolean", "label": "", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "HitAtLeastOnce" }, @@ -38570,7 +38909,6 @@ "label": "Chance to dodge incoming damage (between 0 and 1)", "description": "When a damage is dodged, no damage is applied.", "group": "Health", - "extraInformation": [], "advanced": true, "name": "ChanceToDodge" }, @@ -38578,9 +38916,7 @@ "value": "", "type": "Boolean", "label": "", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "IsJustDodged" }, @@ -38588,9 +38924,7 @@ "value": "0", "type": "Number", "label": "Health points gained from the previous heal", - "description": "", "group": "Health", - "extraInformation": [], "hidden": true, "name": "HealToBeApplied" }, @@ -38598,9 +38932,7 @@ "value": "0", "type": "Number", "label": "Rate of health regeneration (points per second)", - "description": "", "group": "Health regeneration", - "extraInformation": [], "advanced": true, "name": "HealthRegenRate" }, @@ -38611,7 +38943,6 @@ "label": "Health regeneration delay ", "description": "Delay before health regeneration starts after a hit.", "group": "Health regeneration", - "extraInformation": [], "advanced": true, "name": "HealthRegenDelay" }, @@ -38619,9 +38950,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsJustHealed" }, @@ -38629,9 +38957,7 @@ "value": "", "type": "Number", "label": "Current shield points", - "description": "", "group": "Shield", - "extraInformation": [], "hidden": true, "name": "CurrentShieldPoints" }, @@ -38641,7 +38967,6 @@ "label": "Maximum shield", "description": "Leave 0 for unlimited.", "group": "Shield", - "extraInformation": [], "advanced": true, "name": "MaxShieldPoints" }, @@ -38652,7 +38977,6 @@ "label": "Duration of shield", "description": "Use 0 to make the shield permanent.", "group": "Shield", - "extraInformation": [], "advanced": true, "name": "ShieldDuration" }, @@ -38660,9 +38984,7 @@ "value": "0", "type": "Number", "label": "Rate of shield regeneration (points per second)", - "description": "", "group": "Shield regeneration", - "extraInformation": [], "advanced": true, "name": "ShieldRegenRate" }, @@ -38670,9 +38992,7 @@ "value": "", "type": "Boolean", "label": "Block excess damage when shield is broken", - "description": "", "group": "Shield", - "extraInformation": [], "advanced": true, "name": "BlockExcessDamage" }, @@ -38683,7 +39003,6 @@ "label": "Shield regeneration delay", "description": "Delay before shield regeneration starts after a hit.", "group": "Shield regeneration", - "extraInformation": [], "advanced": true, "name": "ShieldRegenDelay" }, @@ -38691,9 +39010,7 @@ "value": "", "type": "Boolean", "label": "", - "description": "", "group": "Shield", - "extraInformation": [], "hidden": true, "name": "IsShieldJustDamaged" }, @@ -38701,9 +39018,7 @@ "value": "", "type": "Number", "label": "Damage to shield from the previous incoming damage", - "description": "", "group": "Shield", - "extraInformation": [], "hidden": true, "name": "ShieldDamageTaken" }, @@ -38713,7 +39028,6 @@ "label": "Flat damage reduction from armor", "description": "Incoming damages are reduced by this value.", "group": "Armor", - "extraInformation": [], "advanced": true, "name": "FlatDamageReduction" }, @@ -38721,9 +39035,7 @@ "value": "0", "type": "Number", "label": "Percentage damage reduction from armor (between 0 and 1)", - "description": "", "group": "Armor", - "extraInformation": [], "advanced": true, "name": "PercentDamageReduction" } @@ -38738,6 +39050,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Flash object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", "name": "Flash", @@ -39632,17 +39945,12 @@ "unit": "Second", "label": "Half period ", "description": "Time that the object is invisible", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -39652,8 +39960,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" } @@ -40206,17 +40512,12 @@ "unit": "Second", "label": "Half period", "description": "Time between flashes", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -40226,8 +40527,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -40235,9 +40534,6 @@ "value": "\"255;255;255\"", "type": "String", "label": "Tint color", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TintColor" } @@ -40840,22 +41136,20 @@ "value": "", "type": "Behavior", "label": "Opacity capability", - "description": "", - "group": "", "extraInformation": [ "OpacityCapability::OpacityBehavior" ], + "choices": [], "name": "Opacity" }, { "value": "", "type": "Behavior", "label": "Tween Behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "TweenBehavior" }, { @@ -40864,17 +41158,12 @@ "unit": "Second", "label": "Half period", "description": "Time between flashes", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -40884,8 +41173,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -40895,8 +41182,6 @@ "unit": "Dimensionless", "label": "Target opacity (Range: 0 - 255)", "description": "Opacity will fade between the starting value and a target value", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetOpacity" }, @@ -40906,8 +41191,6 @@ "unit": "Dimensionless", "label": "Starting opacity", "description": "Opacity will fade between the starting value and a target value", - "group": "", - "extraInformation": [], "hidden": true, "name": "StartingOpacity" } @@ -41725,11 +42008,10 @@ "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { @@ -41738,17 +42020,12 @@ "unit": "Second", "label": "Half period", "description": "Time between flashes", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -41758,8 +42035,6 @@ "unit": "Second", "label": "Flash duration", "description": "Use \"0\" to keep flashing until stopped", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" }, @@ -41767,9 +42042,6 @@ "value": "", "type": "String", "label": "Name of effect", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectName" } @@ -41784,6 +42056,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Shake object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", @@ -46182,20 +46455,16 @@ "value": "", "type": "Behavior", "label": "Scalable capability", - "description": "", - "group": "", "extraInformation": [ "ScalableCapability::ScalableBehavior" ], + "choices": [], "name": "Scale" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "name": "Property" } ], @@ -46209,6 +46478,7 @@ "category": "Camera", "extensionNamespace": "", "fullName": "Camera shake", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZlY3Rvci1kaWZmZXJlbmNlLWFiIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTMsMUMxLjg5LDEgMSwxLjg5IDEsM1Y1SDNWM0g1VjFIM003LDFWM0gxMFYxSDdNMTIsMVYzSDE0VjVIMTZWM0MxNiwxLjg5IDE1LjExLDEgMTQsMUgxMk0xLDdWMTBIM1Y3SDFNMTQsN0MxNCw3IDE0LDExLjY3IDE0LDE0QzExLjY3LDE0IDcsMTQgNywxNEM3LDE0IDcsMTggNywyMEM3LDIxLjExIDcuODksMjIgOSwyMkgyMEMyMS4xMSwyMiAyMiwyMS4xMSAyMiwyMFY5QzIyLDcuODkgMjEuMTEsNyAyMCw3QzE4LDcgMTQsNyAxNCw3TTE2LDlIMjBWMjBIOVYxNkgxNEMxNS4xMSwxNiAxNiwxNS4xMSAxNiwxNFY5TTEsMTJWMTRDMSwxNS4xMSAxLjg5LDE2IDMsMTZINVYxNEgzVjEySDFaIiAvPjwvc3ZnPg==", "name": "CameraShake", @@ -49783,12 +50053,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.2.0", + "version": "1.3.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -49859,11 +50130,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -49872,11 +50142,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -49910,12 +50179,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -49925,11 +50194,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -49946,12 +50216,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -49974,12 +50244,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -49989,11 +50259,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -50012,12 +50281,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -50049,11 +50318,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -50083,23 +50351,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -50115,22 +50382,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -50141,11 +50406,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50160,11 +50424,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -50193,20 +50456,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -50215,11 +50478,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -50231,20 +50493,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -50253,11 +50515,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -50270,20 +50531,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50292,11 +50553,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -50308,20 +50568,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -50330,11 +50590,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50369,11 +50628,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -50385,11 +50643,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50398,11 +50655,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -50415,11 +50671,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50427,11 +50682,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -50440,11 +50694,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -50527,22 +50780,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -50577,11 +50828,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -50626,11 +50876,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -50675,11 +50924,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -50724,11 +50972,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -50750,11 +50997,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -50799,11 +51045,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -50848,11 +51093,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -50932,8 +51176,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -50941,14 +51183,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -50957,9 +51212,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -50967,9 +51219,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -50977,9 +51226,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -50987,9 +51233,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -51122,11 +51365,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "!=", "\"\"" ] @@ -51161,11 +51403,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "!=", "\"\"" ] @@ -51200,11 +51441,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "!=", "\"\"" ] @@ -51307,11 +51547,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "=", "Value" ] @@ -51388,11 +51627,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "=", "Value" ] @@ -51469,11 +51707,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "=", "Value" ] @@ -51502,31 +51739,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -51535,16 +51768,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "PressedEffect" } ], @@ -51767,11 +51997,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", "Value" ] @@ -51848,11 +52077,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedAnimationName", "=", "Value" ] @@ -51929,11 +52157,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedAnimationName", "=", "Value" ] @@ -51962,31 +52189,27 @@ "value": "", "type": "Behavior", "label": "Animatable capability", - "description": "", - "group": "", "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], + "choices": [], "name": "Animation" }, { "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -51995,16 +52218,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PressedAnimationName" } ], @@ -52028,11 +52248,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "IdleValue" ] @@ -52085,11 +52304,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -52098,11 +52316,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -52141,11 +52358,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -52154,11 +52370,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -52181,11 +52396,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -52194,11 +52408,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -52233,11 +52446,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -52246,11 +52458,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -52285,11 +52496,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] @@ -52315,11 +52525,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] @@ -52412,44 +52621,40 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", "Value" ] @@ -52490,44 +52695,40 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", "Value" ] @@ -52567,11 +52768,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "<", "Duration" ] @@ -52580,22 +52780,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] @@ -52607,11 +52805,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", ">=", "Duration" ] @@ -52620,22 +52817,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"NoTween\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", "TweenTargetedValue" ] @@ -52784,22 +52979,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", "NewEffectName" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", "NewPropertyName" ] @@ -52886,11 +53079,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", "Value" ] @@ -52967,11 +53159,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", "Value" ] @@ -53048,11 +53239,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", "Value" ] @@ -53130,11 +53320,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -53212,11 +53401,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -53293,11 +53481,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -53374,11 +53561,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -53407,31 +53593,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -53440,16 +53622,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "IdleValue" }, { @@ -53458,58 +53637,153 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -53517,42 +53791,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -53561,9 +53933,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -53571,21 +53941,26 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -53594,9 +53969,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -53604,9 +53976,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -53614,9 +53983,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -53624,12 +53990,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -53638,9 +54011,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -53722,11 +54092,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -53735,11 +54104,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -53778,11 +54146,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -53791,11 +54158,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -53818,11 +54184,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -53831,11 +54196,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -53870,11 +54234,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -53883,11 +54246,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -54078,11 +54440,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", "Value" ] @@ -54159,11 +54520,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", "Value" ] @@ -54240,11 +54600,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", "Value" ] @@ -54321,11 +54680,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -54402,11 +54760,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -54484,11 +54841,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -54566,11 +54922,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -54599,33 +54954,30 @@ "value": "", "type": "Behavior", "label": "Scalable capability", - "description": "", - "group": "", "extraInformation": [ "ScalableCapability::ScalableBehavior" ], + "choices": [], "name": "Scale" }, { "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -54633,9 +54985,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -54645,7 +54995,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -54653,9 +55002,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -54663,9 +55010,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -54673,51 +55018,147 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -54725,42 +55166,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -54768,12 +55307,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -54855,11 +55401,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -54868,11 +55413,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -54911,11 +55455,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -54924,11 +55467,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -54951,11 +55493,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -54964,11 +55505,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -55003,11 +55543,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -55016,11 +55555,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -55213,11 +55751,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", "Value" ] @@ -55296,11 +55833,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", "Value" ] @@ -55379,11 +55915,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", "Value" ] @@ -55462,11 +55997,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", "Value" ] @@ -55545,11 +56079,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", "Value" ] @@ -55629,11 +56162,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", "Value" ] @@ -55713,11 +56245,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", "Value" ] @@ -55747,31 +56278,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -55780,16 +56307,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "PressedColorTint" }, { @@ -55797,9 +56321,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -55807,51 +56329,147 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -55859,42 +56477,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -55902,12 +56618,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -55923,12 +56646,13 @@ "category": "Input", "extensionNamespace": "", "fullName": "Screen Orientation Checker", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNjcmVlbi1yb3RhdGlvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik03LjUsMjEuNUM0LjI1LDE5Ljk0IDEuOTEsMTYuNzYgMS41NSwxM0gwLjA1QzAuNTYsMTkuMTYgNS43MSwyNCAxMiwyNEwxMi42NiwyMy45N0w4Ljg1LDIwLjE2TTE0LjgzLDIxLjE5TDIuODEsOS4xN0w5LjE3LDIuODFMMjEuMTksMTQuODNNMTAuMjMsMS43NUM5LjY0LDEuMTYgOC42OSwxLjE2IDguMTEsMS43NUwxLjc1LDguMTFDMS4xNiw4LjcgMS4xNiw5LjY1IDEuNzUsMTAuMjNMMTMuNzcsMjIuMjVDMTQuMzYsMjIuODQgMTUuMzEsMjIuODQgMTUuODksMjIuMjVMMjIuMjUsMTUuODlDMjIuODQsMTUuMyAyMi44NCwxNC4zNSAyMi4yNSwxMy43N0wxMC4yMywxLjc1TTE2LjUsMi41QzE5Ljc1LDQuMDcgMjIuMDksNy4yNCAyMi40NSwxMUgyMy45NUMyMy40NCw0Ljg0IDE4LjI5LDAgMTIsMEwxMS4zNCwwLjAzTDE1LjE1LDMuODRMMTYuNSwyLjVaIiAvPjwvc3ZnPg==", "name": "ScreenOrientationChecker", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/0126888931a4a4f82bb2824df9f096347ace1c47f510c44df42aa8dc9e49e24a_screen-rotation.svg", "shortDescription": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", - "version": "0.0.2", + "version": "0.2.1", "description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", "origin": { "identifier": "ScreenOrientationChecker", @@ -55951,6 +56675,28 @@ ], "sceneVariables": [], "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, { "fullName": "Get game target orientation", "functionType": "StringExpression", @@ -56014,7 +56760,272 @@ "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "ScreenOrientationChecker", + "objects": [ + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "BackgroundPainter", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 0, + "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 0, + "g": 0, + "b": 0 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 35, + "keepRatio": true, + "layer": "", + "name": "Text", + "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", + "width": 207, + "x": 104, + "y": 120, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "BackgroundPainter", + "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", + "width": 0, + "x": 38, + "y": 17, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0.9624060150375939, + "height": 96, + "layer": "", + "name": "Icon", + "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", + "width": 96, + "x": 158, + "y": 16, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.75, + "windowMask": false, + "selectedLayer": "" + }, "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::ClearBetweenFrames" + }, + "parameters": [ + "BackgroundPainter", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, { "fullName": "", "functionType": "Action", @@ -56022,41 +57033,66 @@ "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if the screen must be shown" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ScreenOrientationChecker::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SystemInfo::IsMobile" + "inverted": true, + "value": "ScreenOrientationChecker::IsInGameEdition" }, - "parameters": [] + "parameters": [ + "", + "" + ] } ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if the screen must be shown" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "SystemInfo::IsMobile" }, - "parameters": [ - "SceneWindowWidth()", - ">", - "SceneWindowHeight()" - ] + "parameters": [] } ], "actions": [], @@ -56066,23 +57102,69 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" + "SceneWindowWidth()", + ">", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" - }, - "parameters": [ - "Object", - "yes" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "!=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] @@ -56092,317 +57174,456 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "!=", - "\"portrait\"" + "SceneWindowWidth()", + "<=", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" - }, - "parameters": [ - "Object", - "no" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"landscape\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show/hide the screen as needed" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "SceneWindowWidth()", - "<=", - "SceneWindowHeight()" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [], + "subInstructions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "TargetOrientation", - "=", - "\"landscape\"" + "IsShown", + "True", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "yes" + "IsForceShown", + "True", + "" ] } ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" - }, - "parameters": [ - "Object", - "no" - ] - } + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show/hide the screen as needed" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsShown", + "True", + "" ] }, { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsForceShown", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" }, "parameters": [ "Object" ] } ] - } - ], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "BackgroundPainter", - "BackgroundColor" - ] }, { - "type": { - "value": "PrimitiveDrawing::RoundedRectangle" - }, - "parameters": [ - "BackgroundPainter", - "Padding", - "Padding", - "Object.Width()-Padding", - "Object.Height()-Padding", - "CornerRadius" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Icon", + "=", + "Text.Y() - 100" + ] + } ] }, { - "type": { - "value": "Montre" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Animate the icon" + }, { - "type": { - "inverted": true, - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" - }, - "parameters": [ - "Object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + } ] }, { - "type": { - "inverted": true, - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" - }, - "parameters": [ - "Object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "Cache" - }, - "parameters": [ - "Object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"", + "-8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Draw the background.", + "fullName": "Draw the background", + "functionType": "Action", + "name": "DrawBackground", + "private": true, + "sentence": "Draw the background of _PARAM0_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "MettreY" + "value": "PrimitiveDrawing::RoundedRectangle" }, "parameters": [ - "Icon", - "=", - "Text.Y() - 100" + "BackgroundPainter", + "Padding", + "Padding", + "Object.Width()-Padding", + "Object.Height()-Padding", + "CornerRadius" ] } ] - }, + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Animate the icon" - }, + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game.", + "fullName": "Force show the screen", + "functionType": "Condition", + "name": "IsForceShown", + "sentence": "_PARAM0_ is forced to be shown", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "Tween::Exists" + "value": "BooleanVariable" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" - ] - }, - { - "type": { - "inverted": true, - "value": "Tween::Exists" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" + "IsForceShown", + "True", + "" ] } ], "actions": [ { "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" + "value": "SetReturnBoolean" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", - "" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game.", + "fullName": "Force show the screen", + "functionType": "Action", + "name": "SetIsForceShown", + "sentence": "Force _PARAM0_ to be shown: _PARAM1_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Tween::HasFinished" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" + "value": "SetBooleanVariable" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", + "IsForceShown", + "False", "" ] - }, - { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" - ] } ] }, @@ -56411,39 +57632,25 @@ "conditions": [ { "type": { - "value": "Tween::HasFinished" + "value": "BooleanVariable" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" + "value": "SetBooleanVariable" }, "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"", - "-8", - "\"easeInOutQuad\"", - "2", + "IsForceShown", + "False", "" ] - }, - { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" - ] } ] } @@ -56454,42 +57661,42 @@ "name": "Object", "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", "type": "object" + }, + { + "defaultValue": "yes", + "description": "Force show the screen?", + "name": "Value", + "optional": true, + "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game.", - "fullName": "Force show the screen", - "functionType": "Condition", - "group": "Screen Orientation Checker configuration", - "name": "IsForceShown", - "sentence": "_PARAM0_ is forced to be shown", + "description": "the message of the object.", + "fullName": "Message", + "functionType": "ExpressionAndCondition", + "name": "Message", + "sentence": "the message", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" - }, - "parameters": [ - "Object" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnString" }, "parameters": [ - "True" + "Text.Text::Value()" ] } ] } ], + "expressionType": { + "type": "string" + }, "parameters": [ { "description": "Object", @@ -56501,58 +57708,25 @@ "objectGroups": [] }, { - "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game.", - "fullName": "Force show the screen", - "functionType": "Action", - "group": "Screen Orientation Checker configuration", - "name": "SetIsForceShown", - "sentence": "Force _PARAM0_ to be shown: _PARAM1_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Message", + "name": "SetMessage", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" - }, - "parameters": [ - "Object", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "yes" + "Text", + "Text", + "=", + "Value" ] } ] @@ -56564,13 +57738,6 @@ "name": "Object", "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", "type": "object" - }, - { - "defaultValue": "yes", - "description": "Force show the screen?", - "name": "Value", - "optional": true, - "type": "yesorno" } ], "objectGroups": [] @@ -56581,9 +57748,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsShown" }, @@ -56592,8 +57756,6 @@ "type": "Boolean", "label": "Force show the screen", "description": "Use this to test the screen in your game", - "group": "", - "extraInformation": [], "name": "IsForceShown" }, { @@ -56601,9 +57763,7 @@ "type": "Number", "unit": "Pixel", "label": "Padding", - "description": "", "group": "Appearance", - "extraInformation": [], "name": "Padding" }, { @@ -56613,271 +57773,277 @@ "label": "Corner radius", "description": "Corner radius for the background", "group": "Appearance", - "extraInformation": [], "name": "CornerRadius" - }, - { - "value": "0;0;0", - "type": "Color", - "label": "Background color", - "description": "", - "group": "Appearance", - "extraInformation": [], - "name": "BackgroundColor" } ], - "objects": [ - { - "assetStoreId": "", - "bold": true, - "italic": false, - "name": "Text", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 0, - "topEdgeAnchor": 4, - "useLegacyBottomAndRightAnchors": false - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ], - "string": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" - } - }, - { - "assetStoreId": "", - "name": "BackgroundPainter", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [], - "fillOpacity": 255, - "outlineSize": 0, - "outlineOpacity": 255, - "absoluteCoordinates": true, - "clearBetweenFrames": true, - "antialiasing": "none", - "fillColor": { - "r": 0, - "g": 0, - "b": 0 - }, - "outlineColor": { - "r": 0, - "g": 0, - "b": 0 - } - }, - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "Icon", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 4, - "topEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "variants": [ + { + "areaMaxX": 400, + "areaMaxY": 200, + "areaMaxZ": 0, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "2743bcd6cf431c6c00cda3a59684eb152b3a09d598b799b15383e4f77daf8b37", + "assetStoreOriginalName": "Black screen orientation checker", + "name": "Black screen orientation checker", + "objects": [ + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "BackgroundPainter", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 0, + "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 0, + "g": 0, + "b": 0 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } }, { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ], - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "rotate-screen-icon.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 52.5, - "y": 56.5 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 1 - }, - { - "x": 105, - "y": 1 - }, - { - "x": 105, - "y": 113 + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "rotate-screen-icon.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 52.5, + "y": 56.5 }, - { + "centerPoint": { + "automatic": true, + "name": "centre", "x": 0, - "y": 113 - } - ] + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 105, + "y": 1 + }, + { + "x": 105, + "y": 113 + }, + { + "x": 0, + "y": 113 + } + ] + ] + } ] } ] } ] } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Text" - }, - { - "objectName": "BackgroundPainter" + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] }, - { - "objectName": "Icon" - } - ] - }, - "objectsGroups": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ - { - "defaultSize": true, - "defaultViewport": true, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 35, + "keepRatio": true, + "layer": "", + "name": "Text", + "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", + "width": 207, + "x": 104, + "y": 120, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 - } - ], - "effects": [] - } - ], - "instances": [ - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 35, - "keepRatio": true, - "layer": "", - "name": "Text", - "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", - "width": 207, - "x": 104, - "y": 120, - "zOrder": 15, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, - "layer": "", - "name": "BackgroundPainter", - "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", - "width": 0, - "x": 38, - "y": 17, - "zOrder": 14, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, - "layer": "", - "name": "Icon", - "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", - "width": 0, - "x": 204, - "y": 64, - "zOrder": 16, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "keepRatio": true, + "layer": "", + "name": "BackgroundPainter", + "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", + "width": 0, + "x": 38, + "y": 17, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Icon", + "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", + "width": 0, + "x": 204, + "y": 64, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {} } ] } diff --git a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json index ff6c3a0d1..9959ecc79 100644 --- a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json +++ b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 224, + "build": 245, "major": 5, "minor": 5, "revision": 0 @@ -56,7 +56,9 @@ "Bouh" ], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -202,14 +204,14 @@ "name": "Yellow Button_Pressed.png" } } - ], - "resourceFolders": [] + ] }, "objects": [ { "assetStoreId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", "name": "Back_button", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Red Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -219,75 +221,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Back", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Back", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 40, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Pressed.png", - "tiled": false, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" } } ], @@ -317,13 +252,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.6854852482256868, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -461,6 +399,7 @@ "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "VideoAds", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -470,75 +409,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "VideoAds", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 42, - "g": 87, - "r": 139 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "VideoAds", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "VideoAds" } }, { @@ -580,6 +452,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -647,6 +520,7 @@ "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "Game", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -656,81 +530,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Game", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 42, - "g": 87, - "r": 139 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Game", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Game" } }, { "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "Banners", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -740,81 +548,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Banners", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 42, - "g": 87, - "r": 139 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Banners", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Banners" } }, { "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "User", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -824,251 +566,52 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "User", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 42, - "g": 87, - "r": 139 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "User", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } - } - }, - { - "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", - "name": "Data", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Data", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 42, - "g": 87, - "r": 139 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Data", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } - } - }, - { - "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", - "name": "In_game_purchases", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": false, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "In-game purchases", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 42, - "g": 87, - "r": 139 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "In-game purchases", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": false, - "topMargin": 32, - "width": 256 - } - } - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "VideoAds" + "HoveredFadeOutDuration": 0.25, + "LabelText": "User" + } + }, + { + "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "name": "Data", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Data" + } + }, + { + "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "name": "In_game_purchases", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "In-game purchases" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "VideoAds" }, { "objectName": "Title" @@ -1280,6 +823,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -1367,13 +911,16 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 53, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.7130377630690402, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -1556,6 +1103,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Show_midgame_ad", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -1565,264 +1113,66 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Show midgame ad", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Show midgame ad", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Show_rewarded_ad", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Show rewarded ad", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Show rewarded ad", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Check_adblock", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Check adblock", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Check adblock", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } - } - }, - { - "assetStoreId": "", - "bold": true, - "italic": false, - "name": "Adblock_result", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Adblock result: ----", - "font": "", - "textAlignment": "left", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Show midgame ad" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Show_rewarded_ad", + "persistentUuid": "e0bfaf2a-055f-4b40-817b-a56b37958c96", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Show rewarded ad" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Check_adblock", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Check adblock" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Adblock_result", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Adblock result: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 }, "content": { "bold": true, @@ -1843,6 +1193,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1945,6 +1296,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1987,6 +1339,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2029,6 +1382,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2071,6 +1425,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2113,6 +1468,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } } @@ -2556,6 +1912,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -2643,13 +2000,16 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 53, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.7130377630690402, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -2756,6 +2116,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Request_banners", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2765,81 +2126,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Request banners", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Request banners", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Request banners" } }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Hide_all_banners", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2849,75 +2144,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Hide all banners", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Hide all banners", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Hide all banners" } }, { @@ -3019,6 +2247,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -3061,6 +2290,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } } @@ -3199,6 +2429,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -3286,13 +2517,16 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 53, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.6897782140104503, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -3603,6 +2837,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Happy_time", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3612,81 +2847,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Happy time", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Happy time", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Happy time" } }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Gameplay_start", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3696,81 +2865,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Gameplay start", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Gameplay start", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Gameplay start" } }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Gameplay_stop", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3780,81 +2883,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Gameplay stop", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Gameplay stop", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Gameplay stop" } }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Generate_invite_link", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3864,81 +2901,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Generate invite link", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Generate invite link", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Generate invite link" } }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Get_room_id", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -3948,75 +2919,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Get room id", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Get room id", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Get room id" } }, { @@ -4058,6 +2962,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4160,6 +3065,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4202,6 +3108,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4244,6 +3151,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4286,6 +3194,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4316,6 +3225,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Open_invite_button", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4325,81 +3235,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Open invite button", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Open invite button", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Open invite button" } }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Hide_invite_button", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4409,81 +3253,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Hide invite button", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Hide invite button", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Hide invite button" } }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Loading_start", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4493,81 +3271,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Game loading start", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Game loading start", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Game loading start" } }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Loading_stop", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -4577,75 +3289,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Game loading stop", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Game loading stop", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Game loading stop" } }, { @@ -4687,6 +3332,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -4729,6 +3375,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } } @@ -5167,6 +3814,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -5522,6 +4170,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Sign_In", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -5587,6 +4236,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -5606,6 +4256,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "AccountLinking", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -5671,6 +4322,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -5690,6 +4342,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "User_Token", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "", "variables": [], "effects": [], "behaviors": [], @@ -5755,6 +4408,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -5809,6 +4463,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -5851,6 +4506,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -5953,6 +4609,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -5995,6 +4652,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -6037,6 +4695,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -6079,6 +4738,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -6204,6 +4864,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -6246,6 +4907,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -6288,6 +4950,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } } @@ -6725,6 +5388,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -6812,13 +5476,16 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 53, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.7130377630690402, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -6955,6 +5622,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Save_user_data", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -6964,81 +5632,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Save session data", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Save session data", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Save session data" } }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Load_user_data", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -7048,75 +5650,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Load session data", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Load session data", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Load session data" } }, { @@ -7218,6 +5753,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -7260,6 +5796,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -7325,6 +5862,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } } @@ -7469,6 +6007,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -7556,13 +6095,16 @@ "gridType": "rectangular", "gridWidth": 64, "gridHeight": 53, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.6897782140104501, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -7669,6 +6211,7 @@ "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", "name": "Xolla_Token", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button 2", "variables": [], "effects": [], "behaviors": [], @@ -7678,9 +6221,23 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "HoveredFadeOutDuration": 0.25, + "LabelText": "Generate Ingame purchase token" }, "childrenContent": { + "BitmapLabel": { + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + }, "Hovered": { "bottomMargin": 32, "height": 106, @@ -7734,6 +6291,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "72;72;79" } }, @@ -7848,6 +6406,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 65, + "lineHeight": 0, "color": "255;255;255" } }, @@ -7913,6 +6472,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } } @@ -8033,6 +6593,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -8146,6 +6707,7 @@ "category": "General", "extensionNamespace": "", "fullName": "Load images from a URL", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZpbGUtZG93bmxvYWQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTQsMkg2QzQuODksMiA0LDIuODkgNCw0VjIwQzQsMjEuMTEgNC44OSwyMiA2LDIySDE4QzE5LjExLDIyIDIwLDIxLjExIDIwLDIwVjhMMTQsMk0xMiwxOUw4LDE1SDEwLjVWMTJIMTMuNVYxNUgxNkwxMiwxOU0xMyw5VjMuNUwxOC41LDlIMTNaIiAvPjwvc3ZnPg==", "name": "LoadImageFromURL", @@ -8273,6 +6835,7 @@ "category": "Ads", "extensionNamespace": "", "fullName": "CrazyGames SDK v3", + "gdevelopVersion": "", "helpPath": "/extensions/crazy-games-ad-api/details", "iconUrl": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODkiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgODkgMTAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTg0LjkwMzQgMjUuODkyOUM4NS4wNzI3IDE4LjY4MjQgODQuNjQ5NCA2LjExNjk0IDgwLjA3NzYgMC44NzQ4NTlDNzcuNTcyOSAtMS45OTY2NCA3MS42MTgzIDIuODA4MDEgNjcuNzY2MSA2LjUxOTA5QzYxLjM4MSAzLjQwNzcxIDUzLjUzNTUgMS44NzY3MSA0My45OTY4IDEuODc2NzFDMzQuNDU4IDEuODc2NzEgMjYuNjE5NiAzLjQxNDc2IDIwLjI0MTYgNi41MTkwOUMxNi4zODI0IDIuODA4MDEgMTAuNDM0OCAtMS45ODk1OSA3LjkzMDE0IDAuODgxOTE1QzMuMzY1MzcgNi4xMTY5NCAyLjkzNSAxOC42NDAxIDMuMTA0MzIgMjUuODU3NkMxLjA1MTIzIDMxLjUwMTkgMCAzOC4wOTE1IDAgNDUuNjEyNUMwIDYxLjQzMDQgNC41Mjk1IDczLjE0MjIgMTMuNDU0NCA4MC40NzI3QzE5LjQ2NTYgODUuMzk3MyAyNy4zMTgxIDg4LjIzMzUgMzcuMzIyNSA4OS4wODcyQzM2Ljg2MDcgODkuMzE4MSAzNi4zOTIzIDg5LjU0NjggMzUuOTE3NyA4OS43Nzg1TDM1LjkxNjMgODkuNzc5MkwzNS45MTU5IDg5Ljc3OTRDMzUuMTg3NSA5MC4xMzUgMzQuNDQ0NyA5MC40OTc3IDMzLjY4OSA5MC44ODYzTDMwLjA2MjYgOTIuNjY0MkwyOC4wMDI1IDkzLjY3MzFDMjcuNDEwMiA5My45ODI5IDI2LjgxMjMgOTQuMjgyIDI2LjIwNjUgOTQuNTg1MkwyNi4yMDYyIDk0LjU4NTRDMjQuNzY5NyA5NS4zMDQyIDIzLjI4ODQgOTYuMDQ1NSAyMS43MzAzIDk3LjAwMzJMMjEuMTg3IDk3LjI5MjVDMjEuMDMxOCA5Ny40MDU0IDIwLjg4MzcgOTcuNTk1OSAyMC44NTU0IDk3LjgwNzVDMjAuNzg0OSA5OC4yMDk3IDIxLjA2MDEgOTguNTkwNyAyMS40NjIyIDk4LjY0NzFDMjIuMDU4NyA5OC43MzY4IDIyLjY1MzMgOTguODM0NSAyMy4yNDggOTguOTMyMkwyMy4yNDgzIDk4LjkzMjJDMjQuNjY1IDk5LjE2NSAyNi4wODE2IDk5LjM5NzcgMjcuNTIyNyA5OS41MjE5TDI5LjA0NjYgOTkuNjkxM0MyOS41NDc2IDk5Ljc0NzcgMzAuMDU1NSA5OS43OSAzMC41NzA2IDk5LjgxODNMMzMuNjMyNiA5OS45ODc2QzM3LjczMTcgMTAwLjA1OCA0MS44NTkxIDk5LjgzMjQgNDUuOTUxMSA5OS4xOTAzQzUwLjAzNjEgOTguNTc2NSA1NC4wNTA2IDk3LjQzMzYgNTcuOTA5OCA5NS44NDYxQzYxLjc1NSA5NC4yNTg3IDY1LjQyMzcgOTIuMTkxNSA2OC43NDY4IDg5LjY3MjhDNzUuMzM2NCA4NC41NTc3IDgwLjUxNSA3Ny42NzE3IDgzLjU5ODEgNjkuOTk1NkM4NC43MjcgNjcuMjE1OCA4NS41NjY2IDY0LjMzMDIgODYuMTczMyA2MS40MDIyQzg3LjM5MzkgNTYuNzAzNCA4OC4wMTQ4IDUxLjQ0MDEgODguMDE0OCA0NS42MTI1Qzg4LjAxNDggMzguMTEyNyA4Ni45NzA2IDMxLjUzNzIgODQuOTI0NSAyNS45TDg0LjkwMzQgMjUuODkyOVpNNDMuOTg5NyA3My41MjMyQzI3LjEyNzYgNzMuNTIzMiAxNS45MDI2IDY4Ljc4MiAxNS45MDI2IDQ1LjYwNTRDMTUuOTAyNiAzNC42NzY4IDE4LjQwNzMgMjcuMjc1OCAyMy41NzE3IDIzLjAyODVDMjcuOTMxOSAxOS40MzAzIDM0LjYyMDMgMTcuNjg3NiA0My45ODk3IDE3LjY4NzZDNTMuMzU5MiAxNy42ODc2IDYwLjA0NzYgMTkuNDQ0NCA2NC40MDc4IDIzLjAyODVDNjkuNTU4MSAyNy4yNjg3IDcyLjA3NjkgMzQuNjU1NiA3Mi4wNzY5IDQ1LjYwNTRDNzIuMDc2OSA2OC43ODIgNjAuODUxOSA3My41MjMyIDQzLjk4OTcgNzMuNTIzMlpNMzUuMDI5NiAzOS42NzE5QzM1LjAyOTYgMzcuNTkwNiAzNi40MTI0IDM1LjgyNjggMzguMzEwMyAzNS4yMzQxQzM3LjI2NjEgMzQuMjY3NiAzNS44NjkxIDMzLjY3NDkgMzQuMzMxMSAzMy42NzQ5QzMxLjEwNjggMzMuNjc0OSAyOC40NjgxIDM2LjI5OTUgMjguNDY4MSAzOS41MDI2VjUxLjE1NzlDMjguNDY4MSA1NC4zNjEgMzEuMTA2OCA1Ni45ODU2IDM0LjMzMTEgNTYuOTg1NkMzNy41NTU0IDU2Ljk4NTYgNDAuMTk0IDU0LjM2ODEgNDAuMTk0IDUxLjE1NzlWNDQuMzAwMkM0MC4wMzE4IDQ0LjMxNDMgMzkuODY5NSA0NC4zMjg0IDM5LjcwNzIgNDQuMzI4NEMzNy4xMTc5IDQ0LjMyODQgMzUuMDIyNSA0Mi4yNDcxIDM1LjAyMjUgMzkuNjc5TDM1LjAyOTYgMzkuNjcxOVpNNTcuMjExNCAzNC44ODg0QzU1LjQxMjMgMzUuNTM3NSA1NC4xMjgyIDM3LjI0NDkgNTQuMTI4MiAzOS4yNTU3VjM5LjI2MjdDNTQuMTI4MiA0MS44MzA4IDU2LjIyMzYgNDMuOTEyMSA1OC44MTI5IDQzLjkxMjFDNTkuMDUyOCA0My45MTIxIDU5LjI4NTYgNDMuODkxIDU5LjUxMTQgNDMuODU1N1Y1MS4xNTc5QzU5LjUxMTQgNTQuMzY4MSA1Ni44NzI3IDU2Ljk4NTYgNTMuNjQ4NCA1Ni45ODU2QzUwLjQyNDIgNTYuOTg1NiA0Ny43ODU1IDU0LjM2MSA0Ny43ODU1IDUxLjE1NzlWMzkuNTAyNkM0Ny43ODU1IDM2LjI5OTUgNTAuNDI0MiAzMy42NzQ5IDUzLjY0ODQgMzMuNjc0OUM1NC45ODg5IDMzLjY3NDkgNTYuMjIzNiAzNC4xMzM1IDU3LjIxMTQgMzQuODg4NFoiIGZpbGw9IiMwQzBEMTQiLz4KPC9zdmc+Cg==", "name": "CrazyGamesAdApi", @@ -10610,6 +9173,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Clipboard", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNsaXBib2FyZC10ZXh0LW11bHRpcGxlLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNCA3VjIxSDE4VjIzSDRDMi45IDIzIDIgMjIuMSAyIDIxVjdINE0yMCAzQzIxLjEgMyAyMiAzLjkgMjIgNVYxN0MyMiAxOC4xIDIxLjEgMTkgMjAgMTlIOEM2LjkgMTkgNiAxOC4xIDYgMTdWNUM2IDMuOSA2LjkgMyA4IDNIMTEuMThDMTEuNiAxLjg0IDEyLjcgMSAxNCAxQzE1LjMgMSAxNi40IDEuODQgMTYuODIgM0gyME0xNCAzQzEzLjQ1IDMgMTMgMy40NSAxMyA0QzEzIDQuNTUgMTMuNDUgNSAxNCA1QzE0LjU1IDUgMTUgNC41NSAxNSA0QzE1IDMuNDUgMTQuNTUgMyAxNCAzTTEwIDdWNUg4VjE3SDIwVjVIMThWN00xNSAxNUgxMFYxM0gxNU0xOCAxMUgxMFY5SDE4VjExWiIgLz48L3N2Zz4=", "name": "Clipboard", @@ -10853,14 +9417,15 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", "shortDescription": "A button that can be customized.", - "version": "1.4.4", + "version": "2.1.1", "description": [ - "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." ], @@ -10875,10 +9440,39 @@ "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -10894,61 +9488,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -10962,494 +9522,430 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -11458,13 +9954,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -11474,83 +9969,184 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] - } - ], - "parameters": [] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "onDeActivate", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::ResetState" - }, - "parameters": [ - "Object", + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", "Behavior", "" ] @@ -11587,22 +10183,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -11637,11 +10231,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -11686,11 +10279,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -11735,11 +10327,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -11784,11 +10375,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -11810,11 +10400,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -11859,11 +10448,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -11908,11 +10496,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -11961,7 +10548,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -11992,8 +10579,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -12001,14 +10586,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -12017,9 +10615,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -12027,9 +10622,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -12037,9 +10629,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -12047,9 +10636,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -12059,7 +10645,7 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 64, + "areaMaxX": 256, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, @@ -12068,56 +10654,341 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", - "isUsingLegacyInstancesRenderer": true, + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Idle", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Hovered", - "0", - "0", - "" - ] - }, - { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Hovered", + "0", + "0", + "" + ] + }, + { "type": { "value": "Create" }, @@ -12131,58 +11002,40 @@ }, { "type": { - "value": "Cache" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "Hovered" + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { "type": { - "value": "Cache" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "Pressed" + "Pressed", + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { "type": { - "value": "ChangePlan" + "value": "Cache" }, "parameters": [ - "Hovered", - "=", - "1" + "Hovered" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "Create" + "value": "Cache" }, "parameters": [ - "", - "Label", - "0", - "0", - "" + "Pressed" ] }, { @@ -12190,27 +11043,30 @@ "value": "ChangePlan" }, "parameters": [ - "Label", + "Hovered", "=", - "2" + "1" ] }, { "type": { - "value": "TextObject::SetWrapping" + "value": "ChangePlan" }, "parameters": [ - "Label", - "yes" + "Pressed", + "=", + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -12249,18 +11105,47 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ "Object", + "=", + "PressedLabelOffsetY", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -12322,12 +11207,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -12362,10 +11248,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -12374,7 +11260,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -12382,7 +11268,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -12393,10 +11279,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -12420,10 +11306,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -12440,10 +11327,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -12472,12 +11360,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -12517,10 +11406,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -12549,12 +11439,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -12606,12 +11497,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -12643,126 +11535,6 @@ } ], "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -12773,22 +11545,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -13010,6 +11767,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -13018,21 +11776,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -13047,17 +11797,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -13066,18 +11816,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -13089,12 +11839,11 @@ "objectGroups": [] }, { - "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", - "fullName": "", - "functionType": "Expression", - "name": "CenterWithPaddingY", - "private": true, - "sentence": "", + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -13102,17 +11851,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -13124,122 +11873,6 @@ ], "objectGroups": [] }, - { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", - "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, - { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" - ] - }, - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] - }, { "description": "De/activate interactions with the button.", "fullName": "De/activate interactions", @@ -13252,10 +11885,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -13278,10 +11913,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -13355,231 +11992,1408 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" }, { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "LabelOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "name": "LeftPadding" + "objectGroups": [] }, { - "value": "0", - "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "name": "RightPadding" + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "BottomPadding" + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { - "value": "0.25", + "value": "0", "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Text", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "0;0;0" - } + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "value": "", + "type": "Choice", + "label": "", + "choices": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" } ], - "effects": [], - "behaviors": [ + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Grey Button 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 30, + "lineHeight": 0, + "color": "72;72;79" + } + }, { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 80, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "d52675e5-4b81-4535-8e9a-d392ed684d6e", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "" + } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "assetStoreOriginalName": "Yellow button", + "name": "Yellow button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "lineHeight": 0, + "color": "139;87;42" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - { - "objectName": "Idle" + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 106, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 81, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] + }, + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "assetStoreOriginalName": "Grey Button", + "name": "Grey Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - { - "objectName": "Hovered" + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 80, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "d52675e5-4b81-4535-8e9a-d392ed684d6e", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] + }, + { + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", + "assetStoreOriginalName": "Red Button With Shadow", + "name": "Red Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Red Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Red Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Red Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - { - "objectName": "Pressed" - } - ] - }, - "objectsGroups": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + "objectsGroups": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [] + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "1a9eba11-e70c-4a1a-88b8-ed6f52e3d4dc", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } - ], - "instances": [] + ] } ] }, @@ -13588,12 +13402,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.1.0", + "version": "1.3.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -13635,7 +13450,7 @@ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -13664,11 +13479,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -13677,11 +13491,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -13715,12 +13528,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -13730,11 +13543,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -13751,12 +13565,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -13779,12 +13593,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -13794,11 +13608,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -13809,20 +13622,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -13854,11 +13667,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -13880,31 +13692,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -13920,22 +13731,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -13946,11 +13755,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -13965,11 +13773,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -13998,20 +13805,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14020,11 +13827,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14036,20 +13842,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14058,11 +13864,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14075,20 +13880,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14097,11 +13902,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14113,20 +13917,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14135,11 +13939,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14167,18 +13970,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -14190,11 +13992,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14203,11 +14004,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14220,11 +14020,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14232,11 +14031,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14245,11 +14043,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14332,22 +14129,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -14382,11 +14177,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14431,11 +14225,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14480,11 +14273,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14529,11 +14321,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14555,11 +14346,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14604,11 +14394,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14653,11 +14442,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14706,7 +14494,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -14737,8 +14525,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -14746,14 +14532,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -14762,9 +14561,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -14772,9 +14568,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -14782,9 +14575,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -14792,9 +14582,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -14824,7 +14611,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] }, @@ -14835,7 +14622,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -14846,7 +14633,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -14894,7 +14681,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "no" ] }, @@ -14905,7 +14692,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -14916,7 +14703,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -14927,11 +14714,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "!=", "\"\"" ] @@ -14955,7 +14741,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] } @@ -14966,11 +14752,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "!=", "\"\"" ] @@ -14994,7 +14779,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "yes" ] } @@ -15005,11 +14790,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "!=", "\"\"" ] @@ -15033,7 +14817,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "yes" ] } @@ -15075,7 +14859,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleEffect()" + "IdleEffect" ] } ] @@ -15112,13 +14896,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15156,7 +14939,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedEffect()" + "FocusedEffect" ] } ] @@ -15193,13 +14976,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15237,7 +15019,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedEffect()" + "PressedEffect" ] } ] @@ -15274,13 +15056,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15307,31 +15088,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -15340,16 +15117,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "PressedEffect" } ], @@ -15359,7 +15133,7 @@ "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", "name": "ButtonAnimationName", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -15379,7 +15153,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15389,7 +15163,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15439,7 +15212,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15467,7 +15240,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -15495,7 +15268,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -15508,7 +15281,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15537,7 +15309,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15550,7 +15322,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15575,13 +15346,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15591,7 +15361,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15620,7 +15389,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -15633,7 +15402,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15658,13 +15426,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15674,7 +15441,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15703,7 +15469,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -15716,7 +15482,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15741,13 +15506,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15757,7 +15521,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15771,24 +15534,31 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "choices": [], + "name": "Animation" + }, { "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -15797,16 +15567,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PressedAnimationName" } ], @@ -15830,13 +15597,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -15887,11 +15653,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -15900,11 +15665,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -15916,7 +15680,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleValue()", + "IdleValue", "" ] } @@ -15943,11 +15707,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -15956,11 +15719,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -15972,7 +15734,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -15983,11 +15745,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -15996,11 +15757,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -16012,7 +15772,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -16035,11 +15795,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -16048,11 +15807,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -16064,7 +15822,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedValue()", + "PressedValue", "" ] } @@ -16087,11 +15845,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] @@ -16105,8 +15862,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeInDuration()", - "Object.Behavior::PropertyFadeInEasing()", + "FadeInDuration", + "FadeInEasing", "" ] } @@ -16117,11 +15874,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] @@ -16135,8 +15891,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeOutDuration()", - "Object.Behavior::PropertyFadeOutEasing()", + "FadeOutDuration", + "FadeOutEasing", "" ] } @@ -16214,46 +15970,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16292,46 +16044,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16369,37 +16117,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "<", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Tween::Ease(GetArgumentAsString(\"Easing\"), Object.Behavior::PropertyTweenInitialValue(), Object.Behavior::PropertyTweenTargetedValue(), Object.Behavior::PropertyTweenTime() / GetArgumentAsNumber(\"Duration\"))" + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] } ] @@ -16409,37 +16154,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", ">=", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"NoTween\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyTweenTargetedValue()" + "TweenTargetedValue" ] } ] @@ -16455,9 +16197,9 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyEffectName()", - "Object.Behavior::PropertyEffectProperty()", - "Object.Behavior::PropertyEffectValue()" + "EffectName", + "EffectProperty", + "EffectValue" ] } ] @@ -16506,7 +16248,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectName()" + "EffectName" ] } ] @@ -16547,7 +16289,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectProperty()" + "EffectProperty" ] } ] @@ -16586,24 +16328,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", - "GetArgumentAsString(\"Value\")" + "NewEffectName" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", - "GetArgumentAsString(\"Value\")" + "NewPropertyName" ] } ] @@ -16623,12 +16363,12 @@ }, { "description": "Effect name", - "name": "EffectName", + "name": "NewEffectName", "type": "string" }, { "description": "Parameter name", - "name": "PropertyName", + "name": "NewPropertyName", "type": "string" } ], @@ -16651,7 +16391,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -16688,13 +16428,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16732,7 +16471,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedValue()" + "FocusedValue" ] } ] @@ -16769,13 +16508,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16813,7 +16551,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedValue()" + "PressedValue" ] } ] @@ -16850,13 +16588,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16894,7 +16631,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -16932,13 +16669,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -16976,7 +16712,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -17014,13 +16750,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -17058,7 +16793,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -17095,13 +16830,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17139,7 +16873,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -17176,13 +16910,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17209,31 +16942,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -17242,16 +16971,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "IdleValue" }, { @@ -17260,58 +16986,153 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -17319,42 +17140,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -17363,9 +17282,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -17373,21 +17290,26 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -17396,9 +17318,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -17406,9 +17325,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -17416,9 +17332,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -17426,12 +17339,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -17440,9 +17360,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -17453,7 +17370,7 @@ "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", "name": "ButtonScaleTween", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -17473,7 +17390,7 @@ "Object", "Scale", "=", - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -17483,7 +17400,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17525,11 +17441,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -17538,11 +17453,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -17554,7 +17468,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleScale()", + "IdleScale", "" ] } @@ -17581,11 +17495,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -17594,11 +17507,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -17610,7 +17522,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -17621,11 +17533,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -17634,11 +17545,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -17650,7 +17560,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -17673,11 +17583,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -17686,11 +17595,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -17702,7 +17610,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedScale()", + "PressedScale", "" ] } @@ -17716,7 +17624,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17747,10 +17654,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -17762,7 +17669,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17798,10 +17704,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -17813,7 +17719,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17847,7 +17752,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -17860,7 +17765,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17885,13 +17789,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17901,7 +17804,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17930,7 +17832,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedScale()" + "FocusedScale" ] } ] @@ -17943,7 +17845,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17968,13 +17869,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17984,7 +17884,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18013,7 +17912,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedScale()" + "PressedScale" ] } ] @@ -18026,7 +17925,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18051,13 +17949,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18067,7 +17964,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18096,7 +17992,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -18109,7 +18005,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18134,13 +18029,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18150,7 +18044,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18179,7 +18072,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -18192,7 +18085,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18217,13 +18109,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18233,7 +18124,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18262,7 +18152,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -18276,7 +18166,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18301,13 +18190,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -18317,7 +18205,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18346,7 +18233,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -18360,7 +18247,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18385,13 +18271,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -18401,7 +18286,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18415,26 +18299,34 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "choices": [], + "name": "Scale" + }, { "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -18442,9 +18334,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -18454,7 +18344,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -18462,9 +18351,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -18472,9 +18359,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -18482,51 +18367,147 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -18534,42 +18515,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -18577,12 +18656,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -18612,7 +18698,7 @@ }, "parameters": [ "Object", - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -18664,11 +18750,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -18677,11 +18762,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -18693,7 +18777,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleColorTint()", + "IdleColorTint", "" ] } @@ -18720,11 +18804,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -18733,11 +18816,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -18749,7 +18831,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -18760,11 +18842,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -18773,11 +18854,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -18789,7 +18869,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -18812,11 +18892,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -18825,11 +18904,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -18841,7 +18919,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedColorTint()", + "PressedColorTint", "" ] } @@ -18886,9 +18964,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -18936,9 +19014,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -18984,7 +19062,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -19022,13 +19100,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19067,7 +19144,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedColorTint()" + "FocusedColorTint" ] } ] @@ -19105,13 +19182,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19150,7 +19226,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedColorTint()" + "PressedColorTint" ] } ] @@ -19188,13 +19264,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19233,7 +19308,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -19271,13 +19346,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -19316,7 +19390,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -19354,13 +19428,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -19399,7 +19472,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -19438,13 +19511,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19483,7 +19555,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -19522,13 +19594,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19556,31 +19627,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -19589,16 +19656,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "PressedColorTint" }, { @@ -19606,9 +19670,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -19616,51 +19678,147 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -19668,42 +19826,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -19711,12 +19967,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" diff --git a/examples/draggable-physics/draggable-physics.json b/examples/draggable-physics/draggable-physics.json index 44054c2e3..2810252ed 100644 --- a/examples/draggable-physics/draggable-physics.json +++ b/examples/draggable-physics/draggable-physics.json @@ -1,13 +1,15 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { "adaptGameResolutionAtRuntime": false, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "default", "packageName": "com.example.draggablephysics", @@ -16,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": true, "version": "1.0.0", "name": "Extension: Draggable (physics)", "description": "Test the Draggable (physics) extension.", @@ -77,10 +78,18 @@ "placement": "bottom-left", "showWatermark": true }, - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], - "authorUsernames": ["VictrisGames"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "authorUsernames": [ + "VictrisGames" + ], "categories": [], - "playableDevices": ["keyboard", "mobile"], + "playableDevices": [ + "keyboard", + "mobile", + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -92,7 +101,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Grass.png", "kind": "image", "metadata": "", @@ -101,7 +109,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Pea-Happy.png", "kind": "image", "metadata": "", @@ -110,7 +117,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Border.png", "kind": "image", "metadata": "", @@ -123,7 +129,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Fill Bar.png", "kind": "image", "metadata": "", @@ -136,7 +141,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Thumb.png", "kind": "image", "metadata": "", @@ -149,7 +153,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Toggle_Off.png", "kind": "image", "metadata": "", @@ -162,7 +165,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Toggle_On.png", "kind": "image", "metadata": "", @@ -175,7 +177,6 @@ } }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -183,10 +184,12 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -205,13 +208,16 @@ "gridType": "rectangular", "gridWidth": 16, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 0.8781260801866498, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -540,9 +546,9 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player", - "tags": "", "type": "Sprite", "updateIfNotVisible": true, "variables": [], @@ -637,7 +643,6 @@ "assetStoreId": "", "height": 32, "name": "GrassBlock", - "tags": "", "texture": "Grass.png", "type": "TiledSpriteObject::TiledSprite", "width": 32, @@ -675,7 +680,6 @@ "italic": false, "name": "TextMessage", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -689,6 +693,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Click and drag the peas.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -697,7 +723,6 @@ "italic": false, "name": "Title_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -711,6 +736,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Extension: Draggable (physics)", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -719,7 +766,6 @@ "italic": false, "name": "Frequency_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -733,6 +779,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Frequency", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -741,7 +809,6 @@ "italic": false, "name": "MaxForce_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -755,6 +822,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Max Force", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -763,7 +852,6 @@ "italic": false, "name": "LeftButton_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -777,6 +865,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Left Button", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -785,7 +895,6 @@ "italic": false, "name": "RightButton_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -799,6 +908,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Right Button", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -807,7 +938,6 @@ "italic": false, "name": "Dampening_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -821,13 +951,35 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Dampening", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MaxForce_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -839,60 +991,13 @@ "LabelMargin": 4, "MinValue": 0, "MaxValue": 500 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "Frequency_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -903,60 +1008,13 @@ "BarBottomPadding": 4, "LabelMargin": 4, "MaxValue": 60 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "Dampening_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -968,206 +1026,76 @@ "LabelMargin": 4, "MaxValue": 1, "StepSize": 0.01 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { "assetStoreId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", "name": "LeftButton_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square Blue Toggle", "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} }, { "assetStoreId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", "name": "RightButton_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square Blue Toggle", "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square Blue Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Player" + }, + { + "objectName": "GrassBlock" + }, + { + "objectName": "TextMessage" + }, + { + "objectName": "Title_Text" + }, + { + "objectName": "Frequency_Text" + }, + { + "objectName": "MaxForce_Text" + }, + { + "objectName": "LeftButton_Text" + }, + { + "objectName": "RightButton_Text" + }, + { + "objectName": "Dampening_Text" + }, + { + "objectName": "MaxForce_Slider" + }, + { + "objectName": "Frequency_Slider" + }, + { + "objectName": "Dampening_Slider" + }, + { + "objectName": "LeftButton_Toggle" + }, + { + "objectName": "RightButton_Toggle" + } + ] + }, "events": [ { "colorB": 228, @@ -1185,7 +1113,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -1193,19 +1123,34 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["MaxForce_Slider", "=", "500", ""] + "parameters": [ + "MaxForce_Slider", + "=", + "500", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["Frequency_Slider", "=", "10", ""] + "parameters": [ + "Frequency_Slider", + "=", + "10", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["Dampening_Slider", "=", "1", ""] + "parameters": [ + "Dampening_Slider", + "=", + "1", + "" + ] } ] }, @@ -1219,8 +1164,7 @@ "textG": 0, "textR": 0 }, - "comment": "Adjust extension values based checkboxes", - "comment2": "" + "comment": "Adjust extension values based checkboxes" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1229,7 +1173,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["LeftButton_Toggle", ""] + "parameters": [ + "LeftButton_Toggle", + "" + ] }, { "type": { @@ -1243,7 +1190,11 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["RightButton_Toggle", "no", ""] + "parameters": [ + "RightButton_Toggle", + "no", + "" + ] }, { "type": { @@ -1266,7 +1217,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["RightButton_Toggle", ""] + "parameters": [ + "RightButton_Toggle", + "" + ] }, { "type": { @@ -1280,7 +1234,11 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["LeftButton_Toggle", "no", ""] + "parameters": [ + "LeftButton_Toggle", + "no", + "" + ] }, { "type": { @@ -1304,14 +1262,20 @@ "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["RightButton_Toggle", ""] + "parameters": [ + "RightButton_Toggle", + "" + ] }, { "type": { "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["LeftButton_Toggle", ""] + "parameters": [ + "LeftButton_Toggle", + "" + ] }, { "type": { @@ -1325,7 +1289,11 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["LeftButton_Toggle", "yes", ""] + "parameters": [ + "LeftButton_Toggle", + "yes", + "" + ] }, { "type": { @@ -1351,8 +1319,7 @@ "textG": 0, "textR": 0 }, - "comment": "Adjust extension values based on sliders", - "comment2": "" + "comment": "Adjust extension values based on sliders" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1418,8 +1385,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop dragging if mouse gets far from object", - "comment2": "" + "comment": "Stop dragging if mouse gets far from object" }, { "disabled": true, @@ -1429,7 +1395,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" }, - "parameters": ["Player", "DraggablePhysics", ""] + "parameters": [ + "Player", + "DraggablePhysics", + "" + ] }, { "type": { @@ -1447,7 +1417,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::ReleaseDrag" }, - "parameters": ["Player", "DraggablePhysics", ""] + "parameters": [ + "Player", + "DraggablePhysics", + "" + ] } ] }, @@ -1461,8 +1435,7 @@ "textG": 0, "textR": 0 }, - "comment": "Only allow one object to be dragged at once", - "comment2": "" + "comment": "Only allow one object to be dragged at once" }, { "disabled": true, @@ -1472,19 +1445,30 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" }, - "parameters": ["Player", "DraggablePhysics", ""] + "parameters": [ + "Player", + "DraggablePhysics", + "" + ] }, { "type": { "value": "PickedInstancesCount" }, - "parameters": ["Player", ">", "1"] + "parameters": [ + "Player", + ">", + "1" + ] }, { "type": { "value": "AjoutHasard" }, - "parameters": ["", "Player"] + "parameters": [ + "", + "Player" + ] } ], "actions": [ @@ -1492,7 +1476,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::ReleaseDrag" }, - "parameters": ["Player", "DraggablePhysics", ""] + "parameters": [ + "Player", + "DraggablePhysics", + "" + ] } ] } @@ -1505,9 +1493,16 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -1525,10 +1520,26 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, { "name": "DraggablePhysics", "type": "DraggablePhysics::DraggablePhysics" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, { "name": "Physics2", "type": "Physics2::Physics2Behavior", @@ -1536,6 +1547,18 @@ "gravityY": 9.8, "scaleX": 100, "scaleY": 100 + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] } @@ -1547,12 +1570,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/toggle-switch", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", "name": "SpriteToggleSwitch", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.2.2", + "version": "2.0.2", "description": [ "Toggle switch that users can click or touch. The switch can be customized with sprites.", "", @@ -1562,13 +1586,50 @@ "identifier": "SpriteToggleSwitch", "name": "gdevelop-extension-store" }, - "tags": ["ui", "widget", "toggle", "switch"], + "tags": [ + "ui", + "widget", + "toggle", + "switch", + "check box" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], - "dependencies": [], - "eventsFunctions": [], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Toggle switches now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing toggle switches in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the switch object.", @@ -1585,79 +1646,70 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "WasChecked", + "False", + "" + ] } - ], - "actions": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" - }, - "parameters": ["Object", "Behavior", "yes"] - } + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "WasChecked", + "True", + "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" - }, - "parameters": ["Object", "Behavior", "yes"] - } + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" - }, - "parameters": ["Object", "Behavior", "no"] - } + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "Toggle", + "" ] } ] @@ -1682,7 +1734,6 @@ "description": "Check if the toggle switch is checked.", "fullName": "Is checked", "functionType": "Condition", - "group": "Switch finite state machine configuration", "name": "IsChecked", "sentence": "_PARAM0_ is checked", "events": [ @@ -1691,9 +1742,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "IsChecked", + "True", + "" + ] } ], "actions": [ @@ -1701,7 +1756,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -1722,49 +1779,104 @@ "objectGroups": [] }, { - "description": "Check (or uncheck) the toggle switch.", - "fullName": "Check (or uncheck)", - "functionType": "Action", - "group": "Switch finite state machine configuration", - "name": "SetChecked", - "sentence": "Check _PARAM0_: _PARAM2_", + "description": "Check if the toggle switch was checked in the current frame.", + "fullName": "Has just been checked", + "functionType": "Condition", + "name": "HasJustBeenChecked", + "sentence": "_PARAM0_ has just been checked", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsChecked", + "True", + "" + ] + }, { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "WasChecked", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetReturnBoolean" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "True" + ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was unchecked in the current frame.", + "fullName": "Has just been unchecked", + "functionType": "Condition", + "name": "HasJustBeenUnchecked", + "sentence": "_PARAM0_ has just been unchecked", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "IsChecked", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "WasChecked", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetReturnBoolean" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "True" + ] } ] } @@ -1780,174 +1892,434 @@ "name": "Behavior", "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", "type": "behavior" - }, - { - "defaultValue": "yes", - "description": "IsChecked", - "name": "Value", - "optional": true, - "type": "yesorno" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "Button finite state machine", - "description": "", - "group": "", - "extraInformation": ["SpriteToggleSwitch::ButtonFSM"], - "hidden": false, - "name": "ButtonFSM" - }, - { - "value": "false", - "type": "Boolean", - "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "IsChecked" }, { - "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "WasChecked" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", - "private": true, - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", + "description": "Check if the toggle switch was toggled in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenChecked" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenUnchecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check (or uncheck) the toggle switch.", + "fullName": "Check (or uncheck)", + "functionType": "Action", + "name": "SetChecked", + "sentence": "Check _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Avoid a started touch to interfere with a state change from events." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" ] - }, + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" ] - }, + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsChecked", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "Object", + "Behavior", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "Object", + "Behavior", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button finite state machine", + "extraInformation": [ + "SpriteToggleSwitch::ButtonFSM" + ], + "choices": [], + "name": "ButtonFSM" + }, + { + "value": "false", + "type": "Boolean", + "label": "Is checked", + "name": "IsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "PreviousIsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "WasChecked" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "name": "ButtonFSM", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -1958,238 +2330,29 @@ "textG": 0, "textR": 0 }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -2197,155 +2360,400 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } - ] + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -2354,13 +2762,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -2370,50 +2777,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] }, { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] } ] } - ] + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -2443,15 +2951,62 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -2483,9 +3038,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -2493,7 +3052,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2525,9 +3086,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -2535,7 +3100,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2567,9 +3134,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -2577,7 +3148,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2609,9 +3182,13 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -2619,7 +3196,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -2628,11 +3207,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2643,7 +3221,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2675,11 +3255,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -2690,7 +3269,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2722,11 +3303,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2737,7 +3317,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -2772,7 +3354,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -2802,8 +3386,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -2811,14 +3393,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -2827,9 +3422,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -2837,9 +3429,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -2847,9 +3436,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -2857,9 +3443,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -2869,42 +3452,137 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "ToggleSwitch", "description": "A toggle switch that users can click or touch.", "fullName": "Toggle switch", + "isUsingLegacyInstancesRenderer": false, "name": "SpriteToggleSwitch", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state.", - "comment2": "" + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ { - "type": { - "value": "Create" - }, - "parameters": ["", "State", "0", "0", ""] + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] } ] }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -2915,17 +3593,20 @@ "textG": 0, "textR": 0 }, - "comment": "Pass the configuration to the behavior.\nThe PreviousIsChecked property allows to detect a change of \"intial value\" on hot reload.", - "comment2": "" + "comment": "Pass the configuration to the behavior.\nThe PreviousIsChecked property allows to detect a change of \"intial value\" on hot reload." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "True", + "" + ] } ], "actions": [ @@ -2933,13 +3614,22 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "", ""] + "parameters": [ + "State", + "SwitchFSM", + "", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ] }, @@ -2948,10 +3638,13 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "False", + "" + ] } ], "actions": [ @@ -2959,13 +3652,22 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "no", ""] + "parameters": [ + "State", + "SwitchFSM", + "no", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", ""] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ] }, @@ -2977,7 +3679,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -3028,16 +3733,23 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "True", + "" + ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "SwitchFSM", ""] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ], "actions": [ @@ -3045,13 +3757,21 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["Object", "yes", "no"] + "parameters": [ + "Object", + "yes", + "no" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ] }, @@ -3060,16 +3780,23 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "IsChecked", + "False", + "" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, - "parameters": ["Object", "SwitchFSM", ""] + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] } ], "actions": [ @@ -3077,13 +3804,21 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" }, - "parameters": ["Object", "SwitchFSM", "no"] + "parameters": [ + "Object", + "SwitchFSM", + "no" + ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] } ] } @@ -3112,7 +3847,10 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -3141,7 +3879,140 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" }, - "parameters": ["State", "SwitchFSM", ""] + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was checked in the current frame.", + "fullName": "Has just been checked", + "functionType": "Condition", + "name": "HasJustBeenChecked", + "sentence": "_PARAM0_ has just been checked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was unchecked in the current frame.", + "fullName": "Has just been unchecked", + "functionType": "Condition", + "name": "HasJustBeenUnchecked", + "sentence": "_PARAM0_ has just been unchecked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenUnchecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was checked or unchecked in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenToggled" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] } ], "actions": [ @@ -3149,7 +4020,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3177,9 +4050,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ @@ -3187,7 +4064,12 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "no", ""] + "parameters": [ + "State", + "SwitchFSM", + "no", + "" + ] } ] }, @@ -3196,9 +4078,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ @@ -3206,7 +4092,12 @@ "type": { "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" }, - "parameters": ["State", "SwitchFSM", "yes", ""] + "parameters": [ + "State", + "SwitchFSM", + "yes", + "" + ] } ] } @@ -3228,6 +4119,40 @@ ], "objectGroups": [] }, + { + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::ToggleChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Check if the button is not used.", "fullName": "Is idle", @@ -3243,7 +4168,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsIdle" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -3251,7 +4180,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3281,7 +4212,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -3289,7 +4224,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3318,7 +4255,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsHovered" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -3326,7 +4267,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3356,7 +4299,11 @@ "type": { "value": "SpriteToggleSwitch::ButtonFSM::IsFocused" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -3364,7 +4311,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3384,7 +4333,6 @@ "fullName": "Is pressed", "functionType": "Condition", "name": "IsPressed", - "private": true, "sentence": "_PARAM0_ is pressed", "events": [ { @@ -3392,9 +4340,56 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsPressed" + "value": "SpriteToggleSwitch::ButtonFSM::IsPressed" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsPressedOutside" }, - "parameters": ["State", "ButtonFSM", ""] + "parameters": [ + "State", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -3402,7 +4397,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3432,13 +4429,20 @@ "type": { "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { "value": "AnimationName" }, - "parameters": ["State", "\"Unchecked\""] + "parameters": [ + "State", + "\"Unchecked\"" + ] } ], "actions": [ @@ -3446,13 +4450,18 @@ "type": { "value": "SetAnimationName" }, - "parameters": ["State", "\"Checked\""] + "parameters": [ + "State", + "\"Checked\"" + ] }, { "type": { "value": "PlayAnimation" }, - "parameters": ["State"] + "parameters": [ + "State" + ] } ] }, @@ -3464,13 +4473,20 @@ "inverted": true, "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" }, - "parameters": ["Object", "ButtonFSM", ""] + "parameters": [ + "Object", + "ButtonFSM", + "" + ] }, { "type": { "value": "AnimationName" }, - "parameters": ["State", "\"Checked\""] + "parameters": [ + "State", + "\"Checked\"" + ] } ], "actions": [ @@ -3478,13 +4494,18 @@ "type": { "value": "SetAnimationName" }, - "parameters": ["State", "\"Unchecked\""] + "parameters": [ + "State", + "\"Unchecked\"" + ] }, { "type": { "value": "PlayAnimation" }, - "parameters": ["State"] + "parameters": [ + "State" + ] } ] } @@ -3511,9 +4532,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -3521,7 +4546,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["State", "ButtonFSM", "yes"] + "parameters": [ + "State", + "ButtonFSM", + "yes" + ] } ] }, @@ -3531,9 +4560,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -3541,7 +4574,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["State", "ButtonFSM", "no"] + "parameters": [ + "State", + "ButtonFSM", + "no" + ] } ] } @@ -3575,7 +4612,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["State", "ButtonFSM"] + "parameters": [ + "State", + "ButtonFSM" + ] } ], "actions": [ @@ -3583,7 +4623,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -3604,10 +4646,6 @@ "value": "true", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "IsChecked" }, { @@ -3615,64 +4653,170 @@ "type": "Boolean", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousIsChecked" } ], - "objects": [ - { - "assetStoreId": "", - "name": "State", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false - } - ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "variants": [ + { + "areaMaxX": 25, + "areaMaxY": 26, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", + "assetStoreOriginalName": "Square Blue Toggle", + "name": "Square Blue Toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ + ], + "animations": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square Blue Toggle_Off.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square Blue Toggle_On.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } ] } - ] + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -3683,12 +4827,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -3698,13 +4843,49 @@ "identifier": "PanelSpriteSlider", "name": "gdevelop-extension-store" }, - "tags": ["draggable", "slider", "ui", "widget"], + "tags": [ + "draggable", + "slider", + "ui", + "widget" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -3728,7 +4909,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValue()"] + "parameters": [ + "CurrentValue" + ] } ] } @@ -3763,21 +4946,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "StepSize", + "=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -3787,21 +4973,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "StepSize", + "!=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -3838,7 +5027,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMinValue()"] + "parameters": [ + "MinValue" + ] } ] } @@ -3874,13 +5065,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -3929,7 +5119,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxValue()"] + "parameters": [ + "MaxValue" + ] } ] } @@ -3965,13 +5157,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -4060,7 +5251,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyStepSize()"] + "parameters": [ + "StepSize" + ] } ] } @@ -4096,13 +5289,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -4141,40 +5333,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Value" + "name": "CurrentValue" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -4194,114 +5370,30 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } + "parameters": [ + "", + "" ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -4312,238 +5404,29 @@ "textG": 0, "textR": 0 }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -4551,155 +5434,400 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } - ] + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -4708,13 +5836,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -4724,50 +5851,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] }, { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] } ] } - ] + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -4797,15 +6025,23 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -4837,9 +6073,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -4847,7 +6087,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4879,9 +6121,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -4889,7 +6135,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4921,9 +6169,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -4931,7 +6183,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -4963,9 +6217,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -4973,7 +6231,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -4982,11 +6242,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -4997,7 +6256,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5029,11 +6290,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -5044,7 +6304,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5076,11 +6338,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -5091,7 +6352,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5126,7 +6389,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -5156,8 +6421,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -5165,14 +6428,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -5181,9 +6457,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -5191,9 +6464,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -5201,9 +6471,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -5211,9 +6478,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -5223,42 +6487,296 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload.", - "comment2": "" + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "Thumb", + "Draggable", + "" ] } ] @@ -5273,8 +6791,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances.", - "comment2": "" + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -5282,39 +6799,71 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": ["", "Background", "0", "0", ""] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "FillBar", "0", "0", ""] + "parameters": [ + "FillBar", + "Anchor", + "" + ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "Thumb", "0", "0", ""] + "parameters": [ + "Thumb", + "Anchor", + "" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Background", "=", "1"] + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - FillBar.Width()" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["FillBar", "=", "2"] - }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - FillBar.Height()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Thumb", "=", "3"] + "parameters": [ + "PreviousInitialValue", + "=", + "InitialValue" + ] } ] }, @@ -5328,8 +6877,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the label that is displayed over the thumb.", - "comment2": "" + "comment": "Create the label that is displayed over the thumb." }, { "type": "BuiltinCommonInstructions::Standard", @@ -5339,25 +6887,21 @@ "type": { "value": "Create" }, - "parameters": ["", "Label", "0", "0", ""] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": ["Label", "=", "4"] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": ["Label", "no"] + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -5371,8 +6915,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass the configuration to the behavior.", - "comment2": "" + "comment": "Pass the configuration to the behavior." }, { "type": "BuiltinCommonInstructions::Standard", @@ -5382,7 +6925,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -5391,7 +6937,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -5405,19 +6951,28 @@ "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Thumb", ""] + "parameters": [ + "Thumb", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["FillBar", ""] + "parameters": [ + "FillBar", + "" + ] } ] } @@ -5442,17 +6997,14 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] }, @@ -5461,24 +7013,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -5488,7 +7040,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -5512,137 +7064,323 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": ["Background", "ButtonFSM"] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" + "value": "BehaviorActivated" }, - "parameters": ["Thumb", "Draggable"] - }, + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [], + "events": [ { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "value": "DraggableBehavior::Dragged" }, - "parameters": ["Background", "ButtonFSM", ""] - }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "DraggableBehavior::Dropped" }, - "parameters": ["Object"] + "parameters": [ + "Thumb", + "Draggable" + ] } ], "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": ["Label", ""] - }, { "type": { "value": "ResetObjectTimer" }, - "parameters": ["Label", "\"HideBack\""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" }, - "parameters": ["Object"] + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] } ], "actions": [ @@ -5650,251 +7388,62 @@ "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": ["Object"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": ["Label", ""] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": ["Label"] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] }, { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": ["Object", "=", "1"] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, + ], "parameters": [] } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": ["Object", ""] - } ] } ], @@ -5929,19 +7478,30 @@ "type": { "value": "DraggableBehavior::Dragged" }, - "parameters": ["Thumb", "Draggable"] + "parameters": [ + "Thumb", + "Draggable" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressed" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] } ] } @@ -5951,7 +7511,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -5981,7 +7543,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::Value()"] + "parameters": [ + "FillBar.Slider::Value()" + ] } ] } @@ -6018,7 +7582,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -6026,7 +7590,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -6063,7 +7630,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MinValue()"] + "parameters": [ + "FillBar.Slider::MinValue()" + ] } ] } @@ -6100,21 +7669,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -6151,7 +7717,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MaxValue()"] + "parameters": [ + "FillBar.Slider::MaxValue()" + ] } ] } @@ -6188,21 +7756,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -6239,7 +7804,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::StepSize()"] + "parameters": [ + "FillBar.Slider::StepSize()" + ] } ] } @@ -6276,7 +7843,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -6312,9 +7879,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] } ], "actions": [ @@ -6322,7 +7893,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -6351,23 +7924,33 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "ShowLabelAtChanges", + "False", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -6376,23 +7959,34 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] } ] } @@ -6412,53 +8006,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -6474,7 +8021,13 @@ "type": { "value": "PanelSpriteSlider::Slider::Size" }, - "parameters": ["FillBar", "Slider", ">", "0", ""] + "parameters": [ + "FillBar", + "Slider", + ">", + "0", + "" + ] } ], "actions": [], @@ -6485,10 +8038,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -6506,126 +8060,71 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { "type": { "value": "SetCenterY" }, - "parameters": ["Thumb", "=", "FillBar.CenterY()"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Label", - "=", - "ToString(Object.Value())" - ] - }, - { - "type": { - "value": "SetCenterX" - }, - "parameters": ["Label", "=", "Thumb.CenterX()"] - }, - { - "type": { - "value": "MettreY" - }, "parameters": [ - "Label", + "Thumb", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "FillBar.CenterY()" ] - }, - { - "type": { - "value": "TextObject::Angle" - }, - "parameters": ["Label", "=", "-Object.Angle()"] } ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.PropertyBarLeftPadding()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Label", + "Text", + "=", + "ToString(Object.Value())" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Label", + "=", + "Thumb.CenterX()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Label", + "=", + "-Object.Angle()" + ] + } ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -6652,7 +8151,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -6689,8 +8188,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass configuration to the behavior and update children.", - "comment2": "" + "comment": "Pass configuration to the behavior and update children." }, { "type": "BuiltinCommonInstructions::Standard", @@ -6703,9 +8201,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -6715,7 +8212,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -6726,7 +8223,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -6755,9 +8252,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -6765,13 +8266,21 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "yes"] + "parameters": [ + "Thumb", + "Draggable", + "yes" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "yes"] + "parameters": [ + "Background", + "ButtonFSM", + "yes" + ] } ] }, @@ -6781,9 +8290,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -6791,19 +8304,29 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "no"] + "parameters": [ + "Thumb", + "Draggable", + "no" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "no"] + "parameters": [ + "Background", + "ButtonFSM", + "no" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] } @@ -6837,7 +8360,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Background", "ButtonFSM"] + "parameters": [ + "Background", + "ButtonFSM" + ] } ], "actions": [ @@ -6845,7 +8371,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -6866,100 +8394,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -6967,8 +8494,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -6977,8 +8502,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -6987,8 +8514,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["FillBar"], + "extraInformation": [ + "FillBar" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -6997,111 +8526,296 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Label"], + "extraInformation": [ + "Label" + ], + "choices": [], "hidden": true, "name": "ShowLabel" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" + } + ], + "variants": [ + { + "areaMaxX": 215, + "areaMaxY": 18, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", + "assetStoreOriginalName": "Square Blue Slider", + "name": "Square Blue Slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 16, + "color": { + "b": 221, + "g": 221, + "r": 221 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "221;221;221" + } + }, { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 + "assetStoreId": "", + "bottomMargin": 3, + "height": 21, + "leftMargin": 3, + "name": "Thumb", + "rightMargin": 3, + "texture": "Square Blue Slider Thumb.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 21, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 1, + "height": 11, + "leftMargin": 1, + "name": "FillBar", + "rightMargin": 1, + "texture": "Square Blue Slider Fill Bar.png", + "tiled": false, + "topMargin": 1, + "type": "PanelSpriteObject::PanelSprite", + "width": 209, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 4, + "height": 18, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square Blue Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 215, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] } - ] + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 11, + "keepRatio": true, + "layer": "", + "name": "FillBar", + "persistentUuid": "92813097-aee7-4422-8421-125e3ed61986", + "width": 209, + "x": 3, + "y": 3, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Thumb", + "persistentUuid": "ac167400-9a98-4f22-a0a2-8b28626074a6", + "width": 0, + "x": 194, + "y": -2, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -7112,35 +8826,45 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Draggable (for physics objects)", + "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjcsMTFjMC0yLTIuMi0zLjYtNS42LTQuNEMyMC42LDMuMiwxOSwxLDE3LDFzLTMuNiwyLjItNC40LDUuNkM5LjIsNy40LDcsOSw3LDExYzAsMiwyLjIsMy42LDUuNiw0LjQNCgljMC4zLDEuMiwwLjYsMi4yLDEuMSwzLjFjMC4zLDAuNSwwLjksMC43LDEuNCwwLjRjMC41LTAuMywwLjctMC45LDAuNC0xLjRjLTAuMy0wLjUtMC41LTEuMS0wLjctMS44YzAuNywwLjEsMS41LDAuMSwyLjIsMC4xDQoJYzAuOCwwLDEuNSwwLDIuMi0wLjFjLTAuMywxLTAuNywxLjktMS4xLDIuNWMtMC4zLDAuNC0wLjIsMS4xLDAuMiwxLjRjMC4yLDAuMSwwLjQsMC4yLDAuNiwwLjJjMC4zLDAsMC42LTAuMSwwLjgtMC40DQoJYzAuNy0xLDEuMy0yLjQsMS43LTRDMjQuOCwxNC42LDI3LDEzLDI3LDExeiBNMTcsM2MwLjcsMCwxLjYsMS4yLDIuMiwzLjNjLTAuNy0wLjEtMS41LTAuMS0yLjItMC4xcy0xLjUsMC0yLjIsMC4xDQoJQzE1LjQsNC4yLDE2LjMsMywxNywzeiBNOSwxMWMwLTAuNywxLjItMS42LDMuMy0yLjJjLTAuMSwwLjctMC4xLDEuNS0wLjEsMi4yYzAsMC44LDAsMS41LDAuMSwyLjJDMTAuMiwxMi42LDksMTEuNyw5LDExeiBNMTcsMTMuOQ0KCWMtMSwwLTEuOS0wLjEtMi43LTAuMmMtMC4xLTAuOC0wLjItMS43LTAuMi0yLjdjMC0xLDAuMS0xLjksMC4yLTIuN0MxNS4xLDguMiwxNiw4LjEsMTcsOC4xczEuOSwwLjEsMi43LDAuMg0KCWMwLjEsMC44LDAuMiwxLjcsMC4yLDIuN2MwLDAuOS0wLjEsMS44LTAuMiwyLjdDMTguOSwxMy44LDE4LDEzLjksMTcsMTMuOXogTTIxLjcsMTMuMmMwLjEtMC43LDAuMS0xLjUsMC4xLTIuMg0KCWMwLTAuOCwwLTEuNS0wLjEtMi4yQzIzLjgsOS40LDI1LDEwLjMsMjUsMTFDMjUsMTEuNywyMy44LDEyLjYsMjEuNywxMy4yeiIvPg0KPHBhdGggZD0iTTI5LjksMTcuNUMyOS43LDE3LjIsMjkuNCwxNywyOSwxN2MtMi4yLDAtNC4zLDEtNS42LDIuOEwyMi41LDIxYy0xLjEsMS4zLTIuOCwyLTQuNSwyaC0zYy0wLjYsMC0xLTAuNC0xLTFzMC40LTEsMS0xaDEuOQ0KCWMxLjYsMCwzLjEtMS4zLDMuMS0yLjljMCwwLDAtMC4xLDAtMC4xYzAtMC41LTAuNS0xLTEtMWwtNi4xLDBjLTMuNiwwLTYuNSwxLjYtOC4xLDQuMmwtMi43LDQuMmMtMC4yLDAuMy0wLjIsMC43LDAsMWwzLDUNCgljMC4xLDAuMiwwLjQsMC40LDAuNiwwLjVjMC4xLDAsMC4xLDAsMC4yLDBjMC4yLDAsMC40LTAuMSwwLjYtMC4yYzMuOC0yLjUsOC4yLTMuOCwxMi43LTMuOGMzLjMsMCw2LjMtMS44LDcuOS00LjdsMi43LTQuOA0KCUMzMCwxOC4yLDMwLDE3LjgsMjkuOSwxNy41eiIvPg0KPC9zdmc+DQo=", "name": "DraggablePhysics", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/Virtual Reality/Virtual Reality_hand_vr_ar_360.svg", "shortDescription": "Drag a physics object with the mouse (or touch).", - "version": "1.1.0", + "version": "1.3.0", "description": [ "Enables players to click and drag on physics objects to move them. The object retains velocity when the click is released, allowing players to fling objects across the screen.", "", "Note:", "- The default \"draggable\" behavior will not work on objects with the physics behavior. This extension should be used instead.", "- This extension will only work on objects that have the physics behavior.", - "- Kinematic physics mode is incompatible with this extension. The object will be changed to dynamic mode." + "- Kinematic physics mode is incompatible with this extension. The object will be changed to dynamic mode.", + "", + "The Parking Jam example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://parking-jam))." ], "origin": { "identifier": "DraggablePhysics", "name": "gdevelop-extension-store" }, "tags": [ - "draggable", + "physics", + "drag", "mouse", + "pointer", + "cursor", "touch", "physics", "object", "joint", "fling" ], - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -7171,7 +8895,10 @@ "type": { "value": "Physics2::IsKinematic" }, - "parameters": ["Object", "PhysicsBehavior"] + "parameters": [ + "Object", + "PhysicsBehavior" + ] } ], "actions": [ @@ -7179,7 +8906,10 @@ "type": { "value": "Physics2::SetDynamic" }, - "parameters": ["Object", "PhysicsBehavior"] + "parameters": [ + "Object", + "PhysicsBehavior" + ] } ] } @@ -7205,26 +8935,20 @@ "textG": 0, "textR": 0 }, - "comment": "Create mouse joints and save the joint ID", - "comment2": "" + "comment": "Create mouse joints and save the joint ID" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "MouseButtonFromTextPressed" + "value": "BooleanVariable" }, "parameters": [ - "", - "Object.Behavior::PropertyMouseButton()" + "EnableAutomaticDragging", + "True", + "" ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] } ], "actions": [], @@ -7234,43 +8958,74 @@ "conditions": [ { "type": { - "inverted": true, - "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" + "value": "MouseButtonFromTextPressed" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "", + "MouseButton" + ] }, { "type": { - "value": "SourisSurObjet" + "value": "BuiltinCommonInstructions::Once" }, - "parameters": ["Object", "", "", ""] + "parameters": [] } ], - "actions": [ - { - "type": { - "value": "Physics2::AddMouseJoint" - }, - "parameters": [ - "Object", - "PhysicsBehavior", - "MouseX(Object.Layer(),0)", - "MouseY(Object.Layer(),0)", - "Object.Behavior::PropertyMaxForce()", - "Object.Behavior::PropertyFrequency()", - "Object.Behavior::PropertyDamping()", - "__DraggablePhysics.MouseJointID" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseJointID" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Variable(__DraggablePhysics.MouseJointID)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "Object", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics2::AddMouseJoint" + }, + "parameters": [ + "Object", + "PhysicsBehavior", + "MouseX(Object.Layer(),0)", + "MouseY(Object.Layer(),0)", + "MaxForce", + "Frequency", + "Damping", + "__DraggablePhysics.MouseJointID" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "MouseJointID", + "=", + "Variable(__DraggablePhysics.MouseJointID)" + ] + } ] } ] @@ -7287,19 +9042,28 @@ "textG": 0, "textR": 0 }, - "comment": "Delete the mouse joint", - "comment2": "" + "comment": "Delete the mouse joint" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "EnableAutomaticDragging", + "True", + "" + ] + }, { "type": { "value": "MouseButtonFromTextReleased" }, "parameters": [ "", - "Object.Behavior::PropertyMouseButton()" + "MouseButton" ] } ], @@ -7308,7 +9072,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::ReleaseDrag" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] }, @@ -7322,8 +9090,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update the position of the mouse joint to follow the mouse", - "comment2": "" + "comment": "Update the position of the mouse joint to follow the mouse" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7332,7 +9099,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -7343,7 +9114,7 @@ "parameters": [ "Object", "PhysicsBehavior", - "Object.Behavior::PropertyMouseJointID()", + "MouseJointID", "MouseX(Object.Layer(),0)", "MouseY(Object.Layer(),0)" ] @@ -7369,6 +9140,72 @@ ], "objectGroups": [] }, + { + "description": "Start dragging object.", + "fullName": "Start dragging object", + "functionType": "Action", + "name": "StartDragging", + "sentence": "Start dragging (physics) _PARAM0_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics2::AddMouseJoint" + }, + "parameters": [ + "Object", + "PhysicsBehavior", + "MouseX(Object.Layer(),0)", + "MouseY(Object.Layer(),0)", + "MaxForce", + "Frequency", + "Damping", + "__DraggablePhysics.MouseJointID" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "MouseJointID", + "=", + "Variable(__DraggablePhysics.MouseJointID)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggablePhysics::DraggablePhysics", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "Release dragged object.", "fullName": "Release dragged object", @@ -7383,7 +9220,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::IsBeingDragged" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -7394,14 +9235,18 @@ "parameters": [ "Object", "PhysicsBehavior", - "Object.Behavior::PropertyMouseJointID()" + "MouseJointID" ] }, { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseJointID" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "MouseJointID", + "=", + "0" + ] } ] } @@ -7433,9 +9278,13 @@ "conditions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::PropertyMouseJointID" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "MouseJointID", + "!=", + "0" + ] } ], "actions": [ @@ -7443,7 +9292,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -7477,7 +9328,11 @@ "type": { "value": "DraggablePhysics::DraggablePhysics::ReleaseDrag" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -7513,7 +9368,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyMouseButton()"] + "parameters": [ + "MouseButton" + ] } ] } @@ -7550,13 +9407,12 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMouseButton" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseButton", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -7593,7 +9449,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxForce()"] + "parameters": [ + "MaxForce" + ] } ] } @@ -7629,13 +9487,12 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyMaxForce" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxForce", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -7672,7 +9529,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyFrequency()"] + "parameters": [ + "Frequency" + ] } ] } @@ -7708,13 +9567,12 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyFrequency" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Frequency", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -7751,7 +9609,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyDamping()"] + "parameters": [ + "Damping" + ] } ] } @@ -7787,13 +9647,140 @@ "actions": [ { "type": { - "value": "DraggablePhysics::DraggablePhysics::SetPropertyDamping" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Damping", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggablePhysics::DraggablePhysics", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if automatic dragging is enabled.", + "fullName": "Automatic dragging", + "functionType": "Condition", + "group": "Draggable (for physics objects) configuration", + "name": "IsAutomaticDraggingEnabled", + "sentence": "Automatic dragging is enabled on _PARAM0_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "EnableAutomaticDragging", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggablePhysics::DraggablePhysics", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Enable (or disable) automatic dragging with the mouse or touch.", + "fullName": "Enable (or disable) automatic dragging", + "functionType": "Action", + "group": "Draggable (for physics objects) configuration", + "name": "SetEnableAutomaticDragging", + "sentence": "Enable automatic dragging on _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "EnableAutomaticDragging", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "EnableAutomaticDragging", + "True", + "" ] } ] @@ -7810,6 +9797,13 @@ "name": "Behavior", "supplementaryInformation": "DraggablePhysics::DraggablePhysics", "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "EnableAutomaticDragging", + "name": "Value", + "optional": true, + "type": "yesorno" } ], "objectGroups": [] @@ -7820,20 +9814,30 @@ "value": "", "type": "Behavior", "label": "Physics behavior", - "description": "", - "group": "", - "extraInformation": ["Physics2::Physics2Behavior"], - "hidden": false, + "extraInformation": [ + "Physics2::Physics2Behavior" + ], + "choices": [], "name": "PhysicsBehavior" }, { "value": "Left", "type": "Choice", "label": "Mouse button", - "description": "", - "group": "", - "extraInformation": ["Left", "Right", "Middle"], - "hidden": false, + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + }, + { + "label": "Middle", + "value": "Middle" + } + ], "name": "MouseButton" }, { @@ -7841,41 +9845,33 @@ "type": "Number", "unit": "Newton", "label": "Maximum force", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxForce" }, { "value": "10", "type": "Number", "label": "Frequency (Hz) ", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Frequency" }, { "value": "1", "type": "Number", "label": "Damping ratio (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Damping" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseJointID" + }, + { + "value": "true", + "type": "Boolean", + "label": "Enable automatic dragging", + "description": "If automatic dragging is disabled, use the \"Start drag\" and \"Release drag\" actions.", + "name": "EnableAutomaticDragging" } ], "sharedPropertyDescriptors": [] @@ -7884,22 +9880,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [ - { - "filename": "C:\\Users\\Maciel\\AppData\\Local\\Temp/GDTemporaries/GD0x5bd27c0SourceFile.cpp", - "gdManaged": true, - "language": "C++" - }, - { - "filename": "C:\\Users\\Maciel\\AppData\\Local\\Temp/GDTemporaries/GD0x4863290SourceFile.cpp", - "gdManaged": true, - "language": "C++" - }, - { - "filename": "C:\\Users\\Maciel\\AppData\\Local\\Temp/GDTemporaries/GD0x4bb7d18SourceFile.cpp", - "gdManaged": true, - "language": "C++" - } - ] -} + "externalLayouts": [] +} \ No newline at end of file diff --git a/examples/face-forward/face-forward.json b/examples/face-forward/face-forward.json index 307f0c0bc..f992b3f34 100644 --- a/examples/face-forward/face-forward.json +++ b/examples/face-forward/face-forward.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "adaptWidth", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Face Forward", "description": "Learn how to use the FaceForward extension.", @@ -60,7 +59,8 @@ "educational" ], "playableDevices": [ - "keyboard" + "keyboard", + "mobile" ], "extensionProperties": [], "platforms": [ @@ -73,7 +73,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "brick_04.png", "kind": "image", "metadata": "", @@ -82,7 +81,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/tiled_Purple background.png", "kind": "image", "metadata": "", @@ -95,7 +93,6 @@ } }, { - "alwaysLoaded": false, "file": "Redship-1.png", "kind": "image", "metadata": "", @@ -104,7 +101,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Border.png", "kind": "image", "metadata": "", @@ -117,7 +113,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Fill Bar.png", "kind": "image", "metadata": "", @@ -130,7 +125,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square Blue Slider Thumb.png", "kind": "image", "metadata": "", @@ -142,10 +136,12 @@ "name": "Square Blue Slider Thumb.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -164,13 +160,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.6935999999999999, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -397,7 +396,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "FaceForwardObject", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -485,7 +483,6 @@ "italic": false, "name": "RotationSpeed_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -499,6 +496,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Rotation Speed:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -507,7 +526,6 @@ "italic": false, "name": "MovementSpeed_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -521,6 +539,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Movement Speed:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -529,7 +569,6 @@ "italic": false, "name": "ObjectQuantity_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -543,13 +582,34 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Object Quantity:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { "assetStoreId": "", "height": 32, "name": "Background", - "tags": "", "texture": "brick_04.png", "type": "TiledSpriteObject::TiledSprite", "width": 32, @@ -561,7 +621,6 @@ "assetStoreId": "", "height": 128, "name": "PurpleBackground", - "tags": "", "texture": "tiled_Purple background.png", "type": "TiledSpriteObject::TiledSprite", "width": 128, @@ -575,7 +634,6 @@ "italic": false, "name": "Title", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -589,13 +647,35 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Extension:\nFace Forward\n", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 35, + "lineHeight": 0, + "color": "0;0;0" } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "RotationSpeed_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -607,60 +687,13 @@ "LabelMargin": 4, "InitialValue": 360, "MaxValue": 720 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "MovementSpeed_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -672,60 +705,13 @@ "LabelMargin": 4, "InitialValue": 250, "MaxValue": 500 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", "name": "ObjectQuantity_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square Blue Slider", "variables": [], "effects": [], "behaviors": [], @@ -739,53 +725,6 @@ "MinValue": 0, "StepSize": 1, "MaxValue": 20 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 18, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square Blue Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 215 - }, - "FillBar": { - "bottomMargin": 1, - "height": 11, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square Blue Slider Fill Bar.png", - "tiled": false, - "topMargin": 1, - "width": 11 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 16, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Thumb": { - "bottomMargin": 3, - "height": 21, - "leftMargin": 3, - "rightMargin": 3, - "texture": "Square Blue Slider Thumb.png", - "tiled": false, - "topMargin": 3, - "width": 21 - } } }, { @@ -794,7 +733,6 @@ "italic": false, "name": "FPS_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -815,9 +753,69 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "FPS: 0", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "FaceForwardObject" + }, + { + "objectName": "RotationSpeed_Text" + }, + { + "objectName": "MovementSpeed_Text" + }, + { + "objectName": "ObjectQuantity_Text" + }, + { + "objectName": "Background" + }, + { + "objectName": "PurpleBackground" + }, + { + "objectName": "Title" + }, + { + "objectName": "RotationSpeed_Slider" + }, + { + "objectName": "MovementSpeed_Slider" + }, + { + "objectName": "ObjectQuantity_Slider" + }, + { + "objectName": "FPS_Text" + } + ] + }, "events": [ { "colorB": 228, @@ -1400,9 +1398,11 @@ "ambientLightColorB": 1702453632, "ambientLightColorG": 92, "ambientLightColorR": 89, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -1416,9 +1416,11 @@ "ambientLightColorB": 0, "ambientLightColorG": 0, "ambientLightColorR": 6323496, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -1471,9 +1473,11 @@ "ambientLightColorB": 1702453632, "ambientLightColorG": 0, "ambientLightColorR": 12, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -1520,6 +1524,10 @@ { "name": "Scale", "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] } @@ -1531,6 +1539,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Frames per second (FPS)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMzAsM2gtMkg0SDJDMS40LDMsMSwzLjQsMSw0czAuNCwxLDEsMWgxdjE2YzAsMC42LDAuNCwxLDEsMWg5LjhsLTUuNSw2LjNjLTAuNCwwLjQtMC4zLDEsMC4xLDEuNEM4LjUsMjkuOSw4LjgsMzAsOSwzMA0KCWMwLjMsMCwwLjYtMC4xLDAuOC0wLjNsNS4yLTZWMjhjMCwwLjYsMC40LDEsMSwxczEtMC40LDEtMXYtNC4zbDUuMiw2YzAuMiwwLjIsMC41LDAuMywwLjgsMC4zYzAuMiwwLDAuNS0wLjEsMC43LTAuMg0KCWMwLjQtMC40LDAuNS0xLDAuMS0xLjRMMTguMiwyMkgyOGMwLjYsMCwxLTAuNCwxLTFWNWgxYzAuNiwwLDEtMC40LDEtMVMzMC42LDMsMzAsM3ogTTI0LjgsOC42bC00LDZjLTAuMywwLjQtMC44LDAuNi0xLjMsMC4zDQoJTDE1LjgsMTNoLTMuNGwtMy43LDMuN0M4LjUsMTYuOSw4LjMsMTcsOCwxN3MtMC41LTAuMS0wLjctMC4zYy0wLjQtMC40LTAuNC0xLDAtMS40bDQtNGMwLjItMC4yLDAuNC0wLjMsMC43LTAuM2g0DQoJYzAuMiwwLDAuMywwLDAuNCwwLjFsMy4yLDEuNmwzLjUtNS4zYzAuMy0wLjUsMC45LTAuNiwxLjQtMC4zQzI1LDcuNSwyNS4xLDguMSwyNC44LDguNnoiLz4NCjwvc3ZnPg0K", "name": "FPS", @@ -1562,6 +1571,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "fullName": "", @@ -1945,10 +1956,6 @@ "value": "FPS: ", "type": "String", "label": "The prefix before the FPS count", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "prefix" }, { @@ -1956,10 +1963,6 @@ "type": "Number", "unit": "Dimensionless", "label": "Number of decimal digits to display", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "DecimalDigits" } ], @@ -1973,12 +1976,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -1998,8 +2002,39 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -2024,7 +2059,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyValue()" + "CurrentValue" ] } ] @@ -2060,11 +2095,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", "0" ] @@ -2073,13 +2107,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -2089,11 +2122,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "!=", "0" ] @@ -2102,13 +2134,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -2146,7 +2177,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMinValue()" + "MinValue" ] } ] @@ -2183,13 +2214,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -2239,7 +2269,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxValue()" + "MaxValue" ] } ] @@ -2276,13 +2306,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -2372,7 +2401,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyStepSize()" + "StepSize" ] } ] @@ -2409,13 +2438,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -2454,40 +2482,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Value" + "name": "CurrentValue" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -2507,61 +2519,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -2575,562 +2553,598 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedInside\"" ] } ] - }, + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "HasTouchEnded" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "", + "TouchId" ] - }, + } + ], + "actions": [ { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "\"Validated\"" + "0" ] } ], - "actions": [ + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] } ] } - ] + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -3160,22 +3174,20 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -3210,11 +3222,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3259,11 +3270,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -3308,11 +3318,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3357,11 +3366,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3383,11 +3391,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3432,11 +3439,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3481,11 +3487,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3534,108 +3539,364 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Slider", + "description": "Let users select a numerical value by dragging a slider.", + "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PanelSpriteSlider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ { - "description": "Object", - "name": "Object", - "type": "object" + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", - "type": "behavior" + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 } - ], - "objectGroups": [] + ] } ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" - }, + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } ], - "hidden": true, - "name": "State" - }, - { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" - }, + "effects": [] + } + ], + "instances": [ { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "defaultName": "Slider", - "description": "Let users select a numerical value by dragging a slider.", - "fullName": "Slider", - "name": "PanelSpriteSlider", + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -3643,30 +3904,28 @@ "name": "onCreated", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "Thumb", + "Draggable", + "" ] } ] @@ -3681,7 +3940,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances." + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -3689,68 +3948,70 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Background", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, "parameters": [ - "", "FillBar", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, "parameters": [ - "", "Thumb", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Background", + "BarLeftPlusRightMargin", "=", - "1" + "Object.Width() - FillBar.Width()" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "FillBar", + "BarTopPlusBottomMargin", "=", - "2" + "Object.Height() - FillBar.Height()" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Thumb", + "PreviousInitialValue", "=", - "3" + "InitialValue" ] } ] @@ -3783,25 +4044,6 @@ "" ] }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Label", - "=", - "4" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "no" - ] - }, { "type": { "value": "Cache" @@ -3844,7 +4086,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -3897,25 +4139,107 @@ { "fullName": "", "functionType": "Action", - "name": "onHotReloading", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "InitialValue", + "!=", + "PreviousInitialValue" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PreviousInitialValue", + "=", + "InitialValue" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "InitialValue", + "Object.PropertyInitialValue()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "" + "OldParentWidth", + "=", + "Object.Width()" ] }, { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, "parameters": [ "Object", @@ -3926,171 +4250,253 @@ }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "ResizableCapability::ResizableBehavior::SetHeight" }, "parameters": [ - "Object", - "!=", - "Object.PropertyPreviousInitialValue()" + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" ] - } - ], - "actions": [ + }, { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetCenterY" }, "parameters": [ - "Object", + "Thumb", "=", - "Object.PropertyInitialValue()" + "FillBar.CenterY()" ] }, { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + "value": "MettreY" }, "parameters": [ - "Object", + "Label", "=", - "Object.PropertyInitialValue()", - "Object.PropertyInitialValue()" + "Thumb.Y() - Label.Height() - LabelMargin" ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ + }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Background", - "ButtonFSM" - ] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - }, - { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" + "value": "BehaviorActivated" }, "parameters": [ - "Thumb", - "Draggable" + "Background", + "ButtonFSM" ] - }, + } + ], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "inverted": true, + "value": "DraggableBehavior::Dragged" }, "parameters": [ - "Background", - "ButtonFSM", - "" + "Thumb", + "Draggable" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "inverted": true, + "value": "DraggableBehavior::Dropped" }, "parameters": [ - "Background", - "ButtonFSM", - "" + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } ] } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "DraggableBehavior::Dragged" }, "parameters": [ - "Object" + "Thumb", + "Draggable" ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, "parameters": [ - "Label", - "" + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" ] - }, + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { "value": "ResetObjectTimer" @@ -4101,331 +4507,92 @@ ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "CompareObjectTimer" }, "parameters": [ - "Object" + "Label", + "\"HideBack\"", + ">", + "0.5" ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" }, "parameters": [ "Label", - "" + "\"HideBack\"" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": [ - "Object" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Label", - "" - ] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Label" - ] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" - ] - } - ] } ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, "parameters": [] } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": [ - "Object", - "" - ] - } ] } ], @@ -4564,7 +4731,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -4651,16 +4818,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -4747,16 +4905,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -4843,7 +4992,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -4879,10 +5028,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabelAtChanges", + "True", + "" ] } ], @@ -4922,21 +5073,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "ShowLabelAtChanges", + "False", + "" ] }, { @@ -4954,21 +5108,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShowLabelAtChanges", + "True", + "" ] }, { @@ -4998,53 +5155,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -5077,10 +5187,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -5098,7 +5209,7 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { @@ -5119,10 +5230,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -5144,12 +5256,12 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, "parameters": [ "Label", @@ -5172,76 +5284,6 @@ ], "objectGroups": [] }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.PropertyBarLeftPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "fullName": "", "functionType": "Expression", @@ -5258,7 +5300,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -5308,9 +5350,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -5320,7 +5361,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -5331,7 +5372,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -5360,10 +5401,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -5396,10 +5439,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -5498,112 +5543,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -5611,8 +5643,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -5621,10 +5651,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -5633,10 +5663,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "FillBar" ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -5645,113 +5675,296 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Label" ], + "choices": [], "hidden": true, "name": "ShowLabel" - } - ], - "objects": [ + }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" + } + ], + "variants": [ + { + "areaMaxX": 215, + "areaMaxY": 18, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", + "assetStoreOriginalName": "Square Blue Slider", + "name": "Square Blue Slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 16, + "color": { + "b": 221, + "g": 221, + "r": 221 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "221;221;221" + } + }, { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 + "assetStoreId": "", + "bottomMargin": 3, + "height": 21, + "leftMargin": 3, + "name": "Thumb", + "rightMargin": 3, + "texture": "Square Blue Slider Thumb.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 21, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 1, + "height": 11, + "leftMargin": 1, + "name": "FillBar", + "rightMargin": 1, + "texture": "Square Blue Slider Fill Bar.png", + "tiled": false, + "topMargin": 1, + "type": "PanelSpriteObject::PanelSprite", + "width": 209, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 4, + "height": 18, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square Blue Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 215, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 + "angle": 0, + "customSize": true, + "depth": 1, + "height": 11, + "keepRatio": true, + "layer": "", + "name": "FillBar", + "persistentUuid": "92813097-aee7-4422-8421-125e3ed61986", + "width": 209, + "x": 3, + "y": 3, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Thumb", + "persistentUuid": "ac167400-9a98-4f22-a0a2-8b28626074a6", + "width": 0, + "x": 194, + "y": -2, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ] + ], + "editionSettings": [] } ] } @@ -5762,6 +5975,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Face Forward", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/extension-faceforward", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNhcnQtYXJyb3ctcmlnaHQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOSwyMEEyLDIgMCAwLDEgNywyMkEyLDIgMCAwLDEgNSwyMEEyLDIgMCAwLDEgNywxOEEyLDIgMCAwLDEgOSwyME0xNywxOEEyLDIgMCAwLDAgMTUsMjBBMiwyIDAgMCwwIDE3LDIyQTIsMiAwIDAsMCAxOSwyMEEyLDIgMCAwLDAgMTcsMThNNy4yLDE0LjYzQzcuMTksMTQuNjcgNy4xOSwxNC43MSA3LjIsMTQuNzVBMC4yNSwwLjI1IDAgMCwwIDcuNDUsMTVIMTlWMTdIN0EyLDIgMCAwLDEgNSwxNUM1LDE0LjY1IDUuMDcsMTQuMzEgNS4yNCwxNEw2LjYsMTEuNTlMMyw0SDFWMkg0LjI3TDUuMjEsNEgyMEExLDEgMCAwLDEgMjEsNUMyMSw1LjE3IDIwLjk1LDUuMzQgMjAuODgsNS41TDE3LjMsMTJDMTYuOTQsMTIuNjIgMTYuMjcsMTMgMTUuNTUsMTNIOC4xTDcuMiwxNC42M005LDkuNUgxM1YxMS41TDE2LDguNUwxMyw1LjVWNy41SDlWOS41WiIgLz48L3N2Zz4=", "name": "FaceForward", @@ -5788,6 +6002,8 @@ "jy7FXnGX0ZZcWfrAI9YuQaeIphi1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -6183,9 +6399,6 @@ "type": "Number", "label": "Rotation speed (degrees per second)", "description": "Use \"0\" for immediate turning.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "RotationSpeed" }, { @@ -6194,9 +6407,6 @@ "unit": "DegreeAngle", "label": "Offset angle", "description": "Can be used when the image of the object is not facing to the right.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "OffsetAngle" }, { @@ -6204,9 +6414,6 @@ "type": "Number", "unit": "Pixel", "label": "Previous X position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousX" }, @@ -6215,9 +6422,6 @@ "type": "Number", "unit": "Pixel", "label": "Previous Y position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousY" }, @@ -6226,9 +6430,6 @@ "type": "Number", "unit": "DegreeAngle", "label": "Direction the object is moving (in degrees)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MovementDirection" } @@ -6243,6 +6444,7 @@ "category": "", "extensionNamespace": "", "fullName": "Bounce", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZvbGxleWJhbGwiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsMkExMCwxMCAwIDAsMSAyMiwxMkExMCwxMCAwIDAsMSAxMiwyMkExMCwxMCAwIDAsMSAyLDEyQTEwLDEwIDAgMCwxIDEyLDJNMTMuNiwyMC4zNUMxNS45NiwxOC4wNCAxNy42OSwxNS4wOCAxOC41LDExLjc2QzE3Ljg0LDExLjYyIDE3LjE4LDExLjU0IDE2LjUsMTEuNUMxNS41NiwxNS4xMSAxMy40MSwxOC4yMiAxMC41LDIwLjM3QzExLDIwLjQ1IDExLjUsMjAuNSAxMiwyMC41QzEyLjU1LDIwLjUgMTMuMDgsMjAuNDUgMTMuNiwyMC4zNU05LjIzLDIwLjA0QzEyLjIzLDE4LjA3IDE0LjUsMTUuMDUgMTUuNDYsMTEuNUMxNC43MSwxMS41NSAxMy45NywxMS42NSAxMy4yNywxMS44MUMxMi4xOCwxNC44OSA5Ljk3LDE3LjQ0IDcuMTMsMTguOTdDNy43NywxOS40MiA4LjUsMTkuNzggOS4yMywyMC4wNE0yMC41LDEyLjM3QzIwLjE2LDEyLjIzIDE5LjgxLDEyLjExIDE5LjQ2LDEyQzE4Ljc2LDE0LjkgMTcuMzksMTcuNTMgMTUuNTQsMTkuNzNDMTguMzYsMTguNDQgMjAuMzUsMTUuNjQgMjAuNSwxMi4zN00zLjU2LDExLjA0QzMuNSwxMS4zNSAzLjUsMTEuNjggMy41LDEyQzMuNSwxNC41IDQuNTcsMTYuNzMgNi4yNywxOC4yOEM2Ljg2LDE4IDcuNDEsMTcuNjYgNy45NCwxNy4yOUM2LjA4LDE1LjU0IDQuNTgsMTMuNDEgMy41NiwxMS4wNE01LjMzLDYuNzRDNC43Myw3LjUgNC4yNiw4LjM1IDMuOTUsOS4yOEM0LjkyLDEyLjEzIDYuNTgsMTQuNjYgOC43NCwxNi42N0M5LjI1LDE2LjI0IDkuNzIsMTUuNzcgMTAuMTUsMTUuMjZDNy43NCwxMy4wMyA2LDEwLjA4IDUuMzMsNi43NE04LjA0LDQuNUM3LjM2LDQuODUgNi43Myw1LjMgNi4xOCw1LjgyQzYuNzEsOS4yMSA4LjM3LDEyLjIzIDEwLjc3LDE0LjQ3QzExLjE3LDEzLjkxIDExLjUsMTMuMzIgMTEuODIsMTIuN0M5LjY4LDEwLjU2IDguMjgsNy42OSA4LjA0LDQuNU0xOS45Niw5LjAzQzE4LjcsOC42OCAxNy4zNyw4LjUgMTYsOC41QzE0LjEsOC41IDEyLjI4LDguODUgMTAuNjEsOS41QzEwLjk2LDEwLjEgMTEuMzUsMTAuNjcgMTEuOCwxMS4yQzEzLjEyLDEwLjc1IDE0LjUzLDEwLjUgMTYsMTAuNUMxNy41NywxMC41IDE5LjA4LDEwLjc4IDIwLjQ3LDExLjI5QzIwLjQsMTAuNSAyMC4yMyw5Ljc0IDE5Ljk2LDkuMDNNMTcuNTQsNS41N0MxNy4wMyw1LjUgMTYuNSw1LjUgMTYsNS41QzEzLjY5LDUuNSAxMS40Nyw1Ljk0IDkuNDQsNi43M0M5LjYyLDcuMzggOS44Niw4IDEwLjE0LDguNjFDMTEuOTYsNy44OSAxMy45Myw3LjUgMTYsNy41QzE3LjE4LDcuNSAxOC4zMiw3LjYzIDE5LjQyLDcuODdDMTguOTMsNyAxOC4yOSw2LjIxIDE3LjU0LDUuNTdNMTYsNC41QzE0Ljc5LDMuODcgMTMuNDQsMy41IDEyLDMuNUMxMC45NSwzLjUgOS45NCwzLjcgOSw0LjA1QzkuMDQsNC42MyA5LjExLDUuMiA5LjIxLDUuNzVDMTEuMzEsNC45NSAxMy42LDQuNSAxNiw0LjVaIiAvPjwvc3ZnPg==", "name": "Bounce", @@ -6260,6 +6462,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -6441,9 +6645,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldX" }, @@ -6451,9 +6652,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldY" }, @@ -6461,9 +6659,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldForceAngle" }, @@ -6471,9 +6666,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldForceLength" }, @@ -6481,9 +6673,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NormalAngle" } @@ -6494,6 +6683,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/fire-bullet/fire-bullet.json b/examples/fire-bullet/fire-bullet.json index 12a309155..b74ab9ec2 100644 --- a/examples/fire-bullet/fire-bullet.json +++ b/examples/fire-bullet/fire-bullet.json @@ -1,9 +1,9 @@ { "firstLayout": "MainGame", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "nearest", "sizeOnStartupMode": "", "templateSlug": "fire-bullet", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Fire bullet", "description": "Test the \"fire bullet\" extension using sliders to modify the rate of fire, accuracy, number of bullets, and firing arc.\n\nNow with ammo management, reloading, overheat mechanic, and collecting stats.", @@ -89,7 +88,9 @@ "shooter" ], "playableDevices": [ - "keyboard" + "keyboard", + "mobile", + "mobile" ], "extensionProperties": [], "platforms": [ @@ -102,7 +103,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Player1.png", "kind": "image", "metadata": "", @@ -111,7 +111,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Player2.png", "kind": "image", "metadata": "", @@ -120,7 +119,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Player3.png", "kind": "image", "metadata": "", @@ -129,7 +127,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Player4.png", "kind": "image", "metadata": "", @@ -138,7 +135,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Ghost1.png", "kind": "image", "metadata": "", @@ -147,7 +143,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Ghost2.png", "kind": "image", "metadata": "", @@ -156,7 +151,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Ghost3.png", "kind": "image", "metadata": "", @@ -165,7 +159,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Ghost4.png", "kind": "image", "metadata": "", @@ -174,7 +167,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/GhostSquint1.png", "kind": "image", "metadata": "", @@ -183,7 +175,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/GhostSquint2.png", "kind": "image", "metadata": "", @@ -192,7 +183,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/GhostSquint3.png", "kind": "image", "metadata": "", @@ -201,7 +191,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/GhostSquint4.png", "kind": "image", "metadata": "", @@ -227,7 +216,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/WesleyDeathParticle.png", "kind": "image", "metadata": "", @@ -236,7 +224,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_Trap53.png", "kind": "image", "metadata": "", @@ -245,7 +232,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_4Way_Walls2.png", "kind": "image", "metadata": "", @@ -254,7 +240,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_Floor2.png", "kind": "image", "metadata": "", @@ -283,7 +268,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Trap54.png", "kind": "image", "metadata": "", @@ -292,7 +276,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Spider1.png", "kind": "image", "metadata": "", @@ -301,7 +284,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Spider2.png", "kind": "image", "metadata": "", @@ -310,7 +292,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Spider3.png", "kind": "image", "metadata": "", @@ -319,7 +300,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Spider4.png", "kind": "image", "metadata": "", @@ -328,7 +308,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/SpiderCharging1.png", "kind": "image", "metadata": "", @@ -337,7 +316,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/SpiderCharging2.png", "kind": "image", "metadata": "", @@ -346,7 +324,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/SpiderHurt.png", "kind": "image", "metadata": "", @@ -355,7 +332,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Bullet.png", "kind": "image", "metadata": "", @@ -364,7 +340,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/GhostOrb.png", "kind": "image", "metadata": "", @@ -373,7 +348,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Imp1.png", "kind": "image", "metadata": "", @@ -382,7 +356,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp2.png", "kind": "image", "metadata": "", @@ -391,7 +364,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp3.png", "kind": "image", "metadata": "", @@ -400,7 +372,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp4.png", "kind": "image", "metadata": "", @@ -409,7 +380,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ImpCharging1.png", "kind": "image", "metadata": "", @@ -418,7 +388,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ImpCharging2.png", "kind": "image", "metadata": "", @@ -427,7 +396,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/ImpCharging3.png", "kind": "image", "metadata": "", @@ -436,7 +404,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ImpCharging4.png", "kind": "image", "metadata": "", @@ -445,7 +412,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_4Way_Doors1.png", "kind": "image", "metadata": "", @@ -454,7 +420,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_4Way_Doors22.png", "kind": "image", "metadata": "", @@ -463,7 +428,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_4Way_Doors3.png", "kind": "image", "metadata": "", @@ -472,7 +436,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_4Way_Doors4.png", "kind": "image", "metadata": "", @@ -521,7 +484,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Walls.png", "kind": "image", "metadata": "", @@ -530,7 +492,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Walls.png", "kind": "image", "metadata": "", @@ -539,7 +500,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_SideTwoWay_Walls.png", "kind": "image", "metadata": "", @@ -548,7 +508,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Doors1.png", "kind": "image", "metadata": "", @@ -557,7 +516,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Doors2.png", "kind": "image", "metadata": "", @@ -566,7 +524,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Doors3.png", "kind": "image", "metadata": "", @@ -575,7 +532,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Doors4.png", "kind": "image", "metadata": "", @@ -584,7 +540,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Doors1.png", "kind": "image", "metadata": "", @@ -593,7 +548,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Doors2.png", "kind": "image", "metadata": "", @@ -602,7 +556,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Doors3.png", "kind": "image", "metadata": "", @@ -611,7 +564,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Doors4.png", "kind": "image", "metadata": "", @@ -620,7 +572,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Side2way_Doors1.png", "kind": "image", "metadata": "", @@ -629,7 +580,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Side2way_Doors2.png", "kind": "image", "metadata": "", @@ -638,7 +588,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Side2way_Doors3.png", "kind": "image", "metadata": "", @@ -647,7 +596,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Side2way_Doors4.png", "kind": "image", "metadata": "", @@ -656,7 +604,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_UpDeadEnd_Floor.png", "kind": "image", "metadata": "", @@ -665,7 +612,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Room_DownDeadEnd_Floor.png", "kind": "image", "metadata": "", @@ -674,7 +620,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Side2Way_Floor.png", "kind": "image", "metadata": "", @@ -683,7 +628,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Trap14.png", "kind": "image", "metadata": "", @@ -692,7 +636,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Trap23.png", "kind": "image", "metadata": "", @@ -701,7 +644,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Room_Trap33.png", "kind": "image", "metadata": "", @@ -710,7 +652,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/desktop-icon-512.png", "kind": "image", "metadata": "", @@ -719,7 +660,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-192.png", "kind": "image", "metadata": "", @@ -728,7 +668,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-144.png", "kind": "image", "metadata": "", @@ -737,7 +676,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-96.png", "kind": "image", "metadata": "", @@ -746,7 +684,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-72.png", "kind": "image", "metadata": "", @@ -755,7 +692,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-48.png", "kind": "image", "metadata": "", @@ -764,7 +700,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/android-icon-36.png", "kind": "image", "metadata": "", @@ -773,7 +708,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-1024.png", "kind": "image", "metadata": "", @@ -782,7 +716,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-180.png", "kind": "image", "metadata": "", @@ -791,7 +724,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-167.png", "kind": "image", "metadata": "", @@ -800,7 +732,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-152.png", "kind": "image", "metadata": "", @@ -809,7 +740,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-144.png", "kind": "image", "metadata": "", @@ -818,7 +748,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-120.png", "kind": "image", "metadata": "", @@ -827,7 +756,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-114.png", "kind": "image", "metadata": "", @@ -836,7 +764,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-100.png", "kind": "image", "metadata": "", @@ -845,7 +772,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-87.png", "kind": "image", "metadata": "", @@ -854,7 +780,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-80.png", "kind": "image", "metadata": "", @@ -863,7 +788,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-76.png", "kind": "image", "metadata": "", @@ -872,7 +796,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-72.png", "kind": "image", "metadata": "", @@ -881,7 +804,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-60.png", "kind": "image", "metadata": "", @@ -890,7 +812,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-58.png", "kind": "image", "metadata": "", @@ -899,7 +820,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-57.png", "kind": "image", "metadata": "", @@ -908,7 +828,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-50.png", "kind": "image", "metadata": "", @@ -917,7 +836,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-40.png", "kind": "image", "metadata": "", @@ -926,7 +844,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-29.png", "kind": "image", "metadata": "", @@ -935,7 +852,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/ios-icon-20.png", "kind": "image", "metadata": "", @@ -944,7 +860,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/thumbnail.png", "kind": "image", "metadata": "", @@ -953,7 +868,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Spider12.png", "kind": "image", "metadata": "", @@ -962,7 +876,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Spider22.png", "kind": "image", "metadata": "", @@ -971,7 +884,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Spider32.png", "kind": "image", "metadata": "", @@ -980,7 +892,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Spider42.png", "kind": "image", "metadata": "", @@ -989,7 +900,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp12.png", "kind": "image", "metadata": "", @@ -998,7 +908,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp22.png", "kind": "image", "metadata": "", @@ -1007,7 +916,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp32.png", "kind": "image", "metadata": "", @@ -1016,7 +924,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Imp42.png", "kind": "image", "metadata": "", @@ -1025,7 +932,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Gun1.png", "kind": "image", "metadata": "", @@ -1034,7 +940,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Gun2.png", "kind": "image", "metadata": "", @@ -1043,7 +948,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Bullet-1.png", "kind": "image", "metadata": "", @@ -1052,7 +956,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Treasure Chest_Closed.png", "kind": "image", "metadata": "", @@ -1065,7 +968,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Treasure Chest_Opening_1.png", "kind": "image", "metadata": "", @@ -1078,7 +980,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Treasure Chest_Opening_2.png", "kind": "image", "metadata": "", @@ -1111,7 +1012,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Flat Bar Green Fill Bar.png", "kind": "image", "metadata": "{\"localFilePath\":\"assets/Flat Bar Green Fill Bar.png\",\"extension\":\".png\",\"pskl\":{}}", @@ -1124,7 +1024,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Flat Bar White Border.png", "kind": "image", "metadata": "{\"localFilePath\":\"assets/Flat Bar White Border.png\",\"extension\":\".png\",\"pskl\":{}}", @@ -1136,8 +1035,7 @@ "name": "Flat Bar White Border.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -1161,13 +1059,16 @@ "gridType": "rectangular", "gridWidth": 16, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, - "zoomFactor": 0.8007631524066825, - "windowMask": false + "zoomFactor": 0.6784046134949462, + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -8970,7 +8871,9 @@ "text": "Text", "font": "PTSans-Bold.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 10, + "lineHeight": 0, "color": "56;255;4" } }, @@ -8996,6 +8899,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 33, "particleBlue2": 255, + "particleColor1": "126;211;33", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": -10, "particleGreen1": 211, @@ -9041,6 +8946,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 211, "particleBlue2": 255, + "particleColor1": "143;174;211", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": -10, "particleGreen1": 174, @@ -9086,6 +8993,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 255, "particleBlue2": 255, + "particleColor1": "255;255;255", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": -10, "particleGreen1": 255, @@ -9146,7 +9055,9 @@ "text": "Cooldown: 0.10 seconds", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9187,7 +9098,9 @@ "text": "Ammo: 1234", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -9228,7 +9141,9 @@ "text": "Shots fired: 0", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "189;16;224" } }, @@ -9269,7 +9184,9 @@ "text": "Bullets created: 0", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "189;16;224" } }, @@ -9310,7 +9227,9 @@ "text": "Reloads compelted: 0", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "189;16;224" } }, @@ -9351,7 +9270,9 @@ "text": "Max ammo: 100 shots", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9392,7 +9313,9 @@ "text": "Reload Duration: 1 seconds", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9433,7 +9356,9 @@ "text": "Overheat Duration: 1 seconds", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9474,7 +9399,9 @@ "text": "Heat per shot: 0.12", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9515,7 +9442,9 @@ "text": "Linear Cooling rate: 0.12", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9556,7 +9485,9 @@ "text": "Shots per reload: 4", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9597,7 +9528,9 @@ "text": "Shots until reload: 4", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -9638,7 +9571,9 @@ "text": "Heat level: 0.12", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "208;2;27" } }, @@ -9679,7 +9614,9 @@ "text": "Overheated!", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -9720,7 +9657,9 @@ "text": "Use right-click to reload", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -9761,7 +9700,9 @@ "text": "Firing Arc: 360 degrees", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9802,7 +9743,9 @@ "text": "Angle Variance: 360 degrees", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9843,7 +9786,9 @@ "text": "Speed Variance: 100 pixels/second", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9884,7 +9829,9 @@ "text": "Rotate bullets", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9925,7 +9872,9 @@ "text": "Unlimited ammo", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9966,7 +9915,9 @@ "text": "Automatic reloading", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10007,7 +9958,9 @@ "text": "Exponential cooling rate", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10048,7 +10001,9 @@ "text": "Linear cooling", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10089,7 +10044,9 @@ "text": "Bullets per shot: 10", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -10130,7 +10087,9 @@ "text": "Reloading...", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "4;255;62" } }, @@ -10171,7 +10130,9 @@ "text": "Ready to shoot!", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "4;255;62" } }, @@ -10212,7 +10173,9 @@ "text": "Out of ammo!", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -10253,7 +10216,9 @@ "text": "Reload needed", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "248;231;28" } }, @@ -10294,7 +10259,9 @@ "text": "Waiting for firing cooldown...", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "4;255;62" } }, @@ -10335,7 +10302,9 @@ "text": "Firing shots", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "74;144;226" } }, @@ -10376,7 +10345,9 @@ "text": "Ammo", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "74;144;226" } }, @@ -10417,7 +10388,9 @@ "text": "Overheat", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "74;144;226" } }, @@ -10465,19 +10438,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -10523,23 +10496,139 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "ShotsPerReload_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 10, + "TickSpacing": 1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "ReloadDuration_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 3, + "TickSpacing": 0.1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, "absoluteCoordinates": false, "clearBetweenFrames": true, - "antialiasing": "none" + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } }, { "assetStoreId": "", - "name": "ShotsPerReload_Slider", + "name": "OverheatDuration_Slider", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -10548,7 +10637,239 @@ "name": "DraggableSliderControl", "type": "DraggableSliderControl::DraggableSliderControl", "ValueMin": 0, - "ValueMax": 10, + "ValueMax": 5, + "TickSpacing": 0.1, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "LinearCoolingPerSecond_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 1, + "TickSpacing": 0.01, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "ExponentialCoolingPerSecond_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 1, + "TickSpacing": 0.01, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "HeatPerShot_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 0.5, + "TickSpacing": 0.01, + "ThumbShape": "circle", + "ThumbWidth": 20, + "ThumbHeight": 20, + "ThumbColor": "255;255;255", + "ThumbOpacity": 255, + "TrackLength": 200, + "TrackThickness": 4, + "InactiveTrackColor": "", + "InactiveTrackOpacity": 96, + "ActiveTrackColor": " ", + "ActiveTrackOpacity": 255, + "HaloRadius": 24, + "HaloOpacityHover": 32, + "HaloOpacityClick": 64, + "RoundedTrack": true, + "Enabled": true, + "IsBeingDragged": false, + "Value": 0, + "ThumbOffset": 0, + "NeedRedraw": true, + "IsHovered": false, + "MouseX": 0, + "MouseY": 0, + "CurrentHaloRadius": 0, + "HaloGrowSpeed": 0.2, + "TargetHaloRadius": 0 + } + ], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 255, + "g": 255, + "b": 255 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "assetStoreId": "", + "name": "FireArc_Slider", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DraggableSliderControl", + "type": "DraggableSliderControl::DraggableSliderControl", + "ValueMin": 0, + "ValueMax": 360, "TickSpacing": 1, "ThumbShape": "circle", "ThumbWidth": 20, @@ -10581,367 +10902,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, "absoluteCoordinates": false, "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "ReloadDuration_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 3, - "TickSpacing": 0.1, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "OverheatDuration_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 5, - "TickSpacing": 0.1, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "LinearCoolingPerSecond_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 1, - "TickSpacing": 0.01, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "ExponentialCoolingPerSecond_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 1, - "TickSpacing": 0.01, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "HeatPerShot_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 0.5, - "TickSpacing": 0.01, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" - }, - { - "assetStoreId": "", - "name": "FireArc_Slider", - "type": "PrimitiveDrawing::Drawer", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "DraggableSliderControl", - "type": "DraggableSliderControl::DraggableSliderControl", - "ValueMin": 0, - "ValueMax": 360, - "TickSpacing": 1, - "ThumbShape": "circle", - "ThumbWidth": 20, - "ThumbHeight": 20, - "ThumbColor": "255;255;255", - "ThumbOpacity": 255, - "TrackLength": 200, - "TrackThickness": 4, - "InactiveTrackColor": "", - "InactiveTrackOpacity": 96, - "ActiveTrackColor": " ", - "ActiveTrackOpacity": 255, - "HaloRadius": 24, - "HaloOpacityHover": 32, - "HaloOpacityClick": 64, - "RoundedTrack": true, - "Enabled": true, - "IsBeingDragged": false, - "Value": 0, - "ThumbOffset": 0, - "NeedRedraw": true, - "IsHovered": false, - "MouseX": 0, - "MouseY": 0, - "CurrentHaloRadius": 0, - "HaloGrowSpeed": 0.2, - "TargetHaloRadius": 0 - } - ], - "fillOpacity": 255, - "outlineSize": 1, - "outlineOpacity": 255, - "fillColor": { - "b": 255, - "g": 255, - "r": 255 - }, - "outlineColor": { - "b": 0, - "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -10987,19 +10960,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -11045,19 +11018,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -11103,19 +11076,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -11161,19 +11134,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -11219,19 +11192,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 28, + "r": 248, "g": 231, - "r": 248 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 28 + } }, { "assetStoreId": "", @@ -11277,19 +11250,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 28, + "r": 248, "g": 231, - "r": 248 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 28 + } }, { "assetStoreId": "", @@ -11335,19 +11308,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -11359,19 +11332,19 @@ "fillOpacity": 255, "outlineSize": 4, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 224, + "r": 189, "g": 16, - "r": 189 + "b": 224 }, "outlineColor": { - "b": 224, + "r": 189, "g": 16, - "r": 189 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 224 + } }, { "assetStoreId": "", @@ -11406,19 +11379,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -11453,19 +11426,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -11500,19 +11473,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "adaptCollisionMaskAutomatically": false, @@ -11610,6 +11583,7 @@ "assetStoreId": "5c37cb58ddc519829264b5ff95dd80416c82e89b60bfa67c6c3852154ec2b632", "name": "Reloading_Bar", "type": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", + "variant": "Green bar", "variables": [], "effects": [], "behaviors": [], @@ -11622,73 +11596,6 @@ "BarRightPadding": 4, "MaxValue": 16, "InitialValue": 8 - }, - "childrenContent": { - "Background": { - "bottomMargin": 6, - "height": 34, - "leftMargin": 4, - "rightMargin": 4, - "texture": "Flat Bar White Border.png", - "tiled": true, - "topMargin": 6, - "width": 224 - }, - "Buffer": { - "bottomMargin": 0, - "height": 24, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Flat Bar Green Fill Bar.png", - "tiled": true, - "topMargin": 0, - "width": 24 - }, - "FillBar": { - "bottomMargin": 0, - "height": 24, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Flat Bar Green Fill Bar.png", - "tiled": true, - "topMargin": 0, - "width": 24 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "8 / 16", - "font": "", - "textAlignment": "center", - "characterSize": 16, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "8 / 16", - "font": "", - "textAlignment": "center", - "characterSize": 16, - "color": "255;255;255" - } - } } } ], @@ -15944,6 +15851,7 @@ "ambientLightColorB": 0, "ambientLightColorG": 6059824, "ambientLightColorR": 9369496, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -15961,6 +15869,7 @@ "ambientLightColorB": 32, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -15989,6 +15898,7 @@ "ambientLightColorB": 9768528, "ambientLightColorG": 6034944, "ambientLightColorR": 7581144, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -16074,12 +15984,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Resource bar (continuous)", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/resource-bar", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjgsMTJIMTRINGMtMi4yLDAtNCwxLjgtNCw0czEuOCw0LDQsNGgxMGgxNGMyLjIsMCw0LTEuOCw0LTRTMzAuMiwxMiwyOCwxMnogTTQsMThjLTEuMSwwLTItMC45LTItMnMwLjktMiwyLTJoMTANCgljMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJINHoiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteContinuousBar", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Interface Elements/ea06363a57846caab544f536b78a952234b68d4941d41c1577852a1d61aefec3_Interface Elements_interface_ui_loading_progress_bar.svg", "shortDescription": "A bar that represents a resource in the game (health, mana, ammo, etc).", - "version": "1.1.1", + "version": "2.0.0", "description": [ "A bar that represents a resource in the game (health, mana, ammo, etc).", "", @@ -16104,7 +16015,15 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1", "q8ubdigLvIRXLxsJDDTaokO41mc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Resource bars now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing resource bars in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -16144,7 +16063,7 @@ "Object", "\"__ResourceBar.LastValueChange\"", "<=", - "Object.Behavior::PropertyPreviousHighValueDuration()" + "PreviousHighValueDuration" ] } ], @@ -16193,7 +16112,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyValue()" + "CurrentValue" ] } ] @@ -16230,13 +16149,12 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), 0, Object.Behavior::MaxValue())" + "clamp(Value, 0, Object.Behavior::MaxValue())" ] } ] @@ -16246,11 +16164,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Value", "<", "Object.Behavior::PreviousHighValue()" ] @@ -16273,13 +16190,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Value", ">=", - "Object.Behavior::PropertyPreviousHighValue()" + "PreviousHighValue" ] } ], @@ -16329,7 +16245,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxValue()" + "MaxValue" ] } ] @@ -16366,13 +16282,12 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16405,11 +16320,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", "0" ] @@ -16454,13 +16368,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PropertyValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "Object.Behavior::PropertyMaxValue()" + "MaxValue" ] } ], @@ -16507,7 +16420,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPreviousHighValue()" + "PreviousHighValue" ] } ] @@ -16544,13 +16457,12 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyPreviousHighValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValue", "=", - "Object.Behavior::PropertyValue()" + "CurrentValue" ] } ] @@ -16588,7 +16500,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPreviousHighValueDuration()" + "PreviousHighValueDuration" ] } ] @@ -16625,13 +16537,12 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::SetPropertyPreviousHighValueDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValueDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16664,14 +16575,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::ResourceBar::PreviousHighValue" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousHighValue", "!=", - "Object.Behavior::PropertyValue()", - "" + "CurrentValue" ] }, { @@ -16682,7 +16591,7 @@ "Object", "\"__ResourceBar.LastValueChange\"", "<=", - "Object.Behavior::PropertyPreviousHighValueDuration()" + "PreviousHighValueDuration" ] } ], @@ -16719,27 +16628,18 @@ "value": "1", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "name": "Value" + "name": "CurrentValue" }, { "value": "3", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxValue" }, { "value": "", "type": "Number", "label": "Previous high value", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousHighValue" }, @@ -16747,9 +16647,7 @@ "value": "1", "type": "Number", "label": "Previous high value conservation duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], + "hidden": true, "name": "PreviousHighValueDuration" } ], @@ -16758,10 +16656,287 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "ResourceBar", "description": "A bar that represents a resource in the game (health, mana, ammo, etc).", "fullName": "Resource bar (continuous)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteContinuousBar", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 4, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "2 / 3", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "2 / 3", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ResourceBar", + "type": "PanelSpriteContinuousBar::ResourceBar", + "Value": 1, + "MaxValue": 3, + "PreviousValue": 0, + "CurrentValue": 1 + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Buffer", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Buffer" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "fa2b0c42-1baa-489d-9c47-87ec233cbe8c", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "Buffer", + "persistentUuid": "6e01eec9-ca43-4a5c-b4e1-4d9d384473e2", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "4833affb-a8d1-4a2b-9019-a20cf5fdc68e", + "width": 196, + "x": 10, + "y": 10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "0e63f21c-2071-4765-8254-e9021fa84ec4", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 4, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -16779,7 +16954,7 @@ "textG": 0, "textR": 0 }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -16787,12 +16962,100 @@ "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "FillBar", + "Anchor", + "" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Buffer", + "Anchor", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Buffer", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - (max(FillBar.BoundingBoxRight(), Buffer.BoundingBoxRight()) - min(FillBar.BoundingBoxLeft(), Buffer.BoundingBoxLeft()))" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - (max(FillBar.BoundingBoxBottom(), Buffer.BoundingBoxBottom()) - min(FillBar.BoundingBoxTop(), Buffer.BoundingBoxTop()))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneInstancesCount" + }, + "parameters": [ + "", + "Buffer", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - (FillBar.BoundingBoxRight() - FillBar.BoundingBoxLeft())" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - (FillBar.BoundingBoxBottom() - FillBar.BoundingBoxTop())" + ] + } ] } ] @@ -16807,7 +17070,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances." + "comment": "This allows to detect a change of \"intial value\" on hot reload." }, { "type": "BuiltinCommonInstructions::Standard", @@ -16815,60 +17078,38 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Background", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "FillBar", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Background", + "PreviousInitialValue", "=", - "1" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "FillBar", - "=", - "3" + "InitialValue" ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create the child-object instances." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyPreviousHighValueDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - ">", + "PreviousHighValueDuration", + "=", "0" ] } @@ -16876,25 +17117,12 @@ "actions": [ { "type": { - "value": "Create" + "value": "Delete" }, "parameters": [ - "", "Buffer", - "0", - "0", "" ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Buffer", - "=", - "2" - ] } ] }, @@ -16910,62 +17138,18 @@ }, "comment": "Create the label over the bar." }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Label", - "=", - "4" - ] - }, - { - "type": { - "value": "TextObject::SetTextAlignment" - }, - "parameters": [ - "Label", - "\"center\"" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyShowLabel" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabel", + "True", + "" ] } ], @@ -17003,50 +17187,62 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetValue" + "value": "PanelSpriteContinuousBar::ResourceBar::SetValue" }, "parameters": [ - "Object", + "FillBar", + "ResourceBar", "=", - "Object.PropertyInitialValue()", - "Object.PropertyInitialValue()" + "InitialValue", + "" ] }, { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPreviousValueDuration" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ - "Object", + "FillBar", + "Resizable", "=", - "Object.PropertyPreviousHighValueDuration()", - "" + "Object.WidthForValue()" ] }, { "type": { - "value": "Tween::RemoveTween" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ - "FillBar", - "Tween", - "\"ChangeValue\"" + "Buffer", + "Resizable", + "=", + "FillBar.Width()" ] }, { "type": { - "value": "PanelSpriteObject::Width" + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPreviousValueDuration" }, "parameters": [ - "FillBar", + "Object", "=", - "Object.WidthForValue()" + "PreviousHighValueDuration", + "" + ] + }, + { + "type": { + "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLabel" + }, + "parameters": [ + "Object", + "" ] } ] @@ -17088,7 +17284,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] } @@ -17099,24 +17295,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -17126,7 +17322,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] }, @@ -17137,7 +17333,7 @@ "parameters": [ "Object", "=", - "Object.PropertyPreviousHighValueDuration()", + "PreviousHighValueDuration", "" ] }, @@ -17159,10 +17355,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] @@ -17187,124 +17384,101 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "NumberVariable" }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the bar size is refreshed according to the value\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Background.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Background.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - } + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.WidthForValue()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetWidth" + }, + "parameters": [ + "Buffer", + "Resizable", + "=", + "FillBar.Width()" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "FillBar", + "Tween", + "\"ChangeValue\"" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Buffer", + "Tween", + "\"ChangeValue\"" ] } - ], - "parameters": [] + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "Buffer", + "Resizable", + "=", + "FillBar.Height()" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", @@ -17329,7 +17503,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectWidthTween" + "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ "Buffer", @@ -17337,7 +17511,7 @@ "\"ChangeValue\"", "Object.WidthForValue()", "\"linear\"", - "Object.PropertyEasingDuration() * 1000", + "EasingDuration", "" ] } @@ -17348,10 +17522,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::Width" }, "parameters": [ "FillBar", + "Resizable", "<", "Buffer.Width()" ] @@ -17374,10 +17549,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::Width" }, "parameters": [ "FillBar", + "Resizable", ">=", "Buffer.Width()" ] @@ -17419,121 +17595,25 @@ "actions": [ { "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] }, { "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Buffer", - "=", - "FillBar.X()", - "=", - "FillBar.Y()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "Buffer", + "Resizable", "=", "FillBar.Width()" ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Buffer", - "=", - "FillBar.Height()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Object.FullBarWidth()" - ] - }, - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "FillBar.CenterY()" - ] - }, - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()) / 2" - ] } ] } @@ -17603,7 +17683,7 @@ "FillBar", "ResourceBar", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -17614,10 +17694,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "EasingDuration", ">", "0" ] @@ -17626,7 +17706,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectWidthTween" + "value": "Tween::TweenBehavior::AddObjectWidthTween2" }, "parameters": [ "FillBar", @@ -17634,7 +17714,7 @@ "\"ChangeValue\"", "Object.WidthForValue()", "\"linear\"", - "Object.PropertyEasingDuration() * 1000", + "EasingDuration", "" ] } @@ -17645,10 +17725,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "EasingDuration", "<=", "0" ] @@ -17657,10 +17737,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.WidthForValue()" ] @@ -17699,10 +17780,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "Buffer", + "Resizable", "=", "round(Object.FullBarWidth() * FillBar.ResourceBar::PreviousHighValue() / FillBar.ResourceBar::MaxValue())" ] @@ -17743,7 +17825,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "FillBar.ResourceBar::PropertyMaxValue()" + "FillBar.ResourceBar::MaxValue()" ] } ] @@ -17781,7 +17863,7 @@ "FillBar", "ResourceBar", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -17927,7 +18009,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "FillBar.ResourceBar::PropertyPreviousHighValueDuration()" + "FillBar.ResourceBar::PreviousHighValueDuration()" ] } ] @@ -17965,7 +18047,7 @@ "FillBar", "ResourceBar", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -18135,7 +18217,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -18167,10 +18249,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyShowLabel" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabel", + "True", + "" ] } ], @@ -18210,21 +18294,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyShowLabel" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "ShowLabel", + "False", + "" ] }, { @@ -18242,21 +18329,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::SetPropertyShowLabel" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShowLabel", + "True", + "" ] }, { @@ -18300,10 +18390,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(round(Object.Value())) + \" / \" + ToString(Object.MaxValue())" ] @@ -18323,74 +18414,16 @@ } ], "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarLeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarTopPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarRightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "Bar", - "extraInformation": [ - "Label", - "FillBar", - "Buffer" - ], - "name": "BarBottomPadding" - }, { "value": "3", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxValue" }, { "value": "3", "type": "Number", "label": "Initial value", - "description": "", - "group": "", - "extraInformation": [], "name": "InitialValue" }, { @@ -18398,202 +18431,320 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, { "value": "1", "type": "Number", + "unit": "Second", "label": "Previous high value conservation duration (in seconds)", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PreviousHighValueDuration" }, { "value": "0.25", "type": "Number", + "unit": "Second", "label": "Easing duration", - "description": "", "group": "Animation", - "extraInformation": [], "name": "EasingDuration" }, { "value": "true", "type": "Boolean", "label": "Show the label", - "description": "", - "group": "", "extraInformation": [ "Label" ], + "choices": [], "name": "ShowLabel" }, { - "value": "", - "type": "Boolean", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "Buffer" - ], "hidden": true, - "name": "ShowBuffer" + "name": "BarLeftPlusRightMargin" }, { - "value": "Center", - "type": "String", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "Label" - ], "hidden": true, - "name": "LabelVerticalAnchorOrigin" + "name": "BarTopPlusBottomMargin" }, { - "value": "Center", - "type": "String", + "value": "0", + "type": "Number", "label": "", - "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [ - "FillBar" - ], "hidden": true, - "name": "LabelVerticalAnchorTarget" + "name": "OldParentWidth" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "2 / 3", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "2 / 3", - "font": "", - "textAlignment": "center", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ResourceBar", - "type": "PanelSpriteContinuousBar::ResourceBar", - "Value": 1, - "MaxValue": 3, - "PreviousValue": 0 + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 1, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Green bar", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 4, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "8 / 16", + "font": "", + "textAlignment": "center", + "characterSize": 16, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "8 / 16", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 24, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "Flat Bar Green Fill Bar.png", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 24, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ResourceBar", + "type": "PanelSpriteContinuousBar::ResourceBar", + "Value": 1, + "MaxValue": 3, + "PreviousValue": 0, + "CurrentValue": 1 + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 24, + "leftMargin": 0, + "name": "Buffer", + "rightMargin": 0, + "texture": "Flat Bar Green Fill Bar.png", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 24, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] }, { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Buffer", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Tween", - "type": "Tween::TweenBehavior" + "assetStoreId": "", + "bottomMargin": 6, + "height": 34, + "leftMargin": 4, + "name": "Background", + "rightMargin": 4, + "texture": "Flat Bar White Border.png", + "tiled": true, + "topMargin": 6, + "type": "PanelSpriteObject::PanelSprite", + "width": 224, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "FillBar" - }, - { - "objectName": "Buffer" + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Buffer" + }, + { + "objectName": "Background" + } + ] }, - { - "objectName": "Background" + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "fa2b0c42-1baa-489d-9c47-87ec233cbe8c", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "4833affb-a8d1-4a2b-9019-a20cf5fdc68e", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "" } - ] - } + } + ] } ] }, @@ -18602,6 +18753,7 @@ "category": "", "extensionNamespace": "", "fullName": "Checkbox", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNoZWNrYm94LW1hcmtlZCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMCwxN0w1LDEyTDYuNDEsMTAuNThMMTAsMTQuMTdMMTcuNTksNi41OEwxOSw4TTE5LDNINUMzLjg5LDMgMywzLjg5IDMsNVYxOUEyLDIgMCAwLDAgNSwyMUgxOUEyLDIgMCAwLDAgMjEsMTlWNUMyMSwzLjg5IDIwLjEsMyAxOSwzWiIgLz48L3N2Zz4=", "name": "Checkbox", @@ -18637,6 +18789,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -21578,54 +21732,41 @@ "value": "0", "type": "Boolean", "label": "Checked", - "description": "", "group": "Checkbox state", - "extraInformation": [], "name": "Checked" }, { "value": "", "type": "Number", "label": "Halo size (hover). If blank, this is set to \"SideLength\".", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "HaloRadiusHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "HaloOpacityHover" }, { "value": "128", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", "group": "Checkbox state", - "extraInformation": [], "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingPressed" }, @@ -21633,9 +21774,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -21643,9 +21781,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -21653,9 +21788,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -21663,9 +21795,6 @@ "value": "0.3", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -21673,9 +21802,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" }, @@ -21683,9 +21809,6 @@ "value": "", "type": "Boolean", "label": "State of the checkbox has changed. (Used in \"ToggleChecked\" function)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ToggleChanged" }, @@ -21693,54 +21816,42 @@ "value": " 24;119;211", "type": "Color", "label": "Primary color of checkbox. (Example: 24;119;211) Fill color when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "PrimaryColor" }, { "value": "255;255;255", "type": "Color", "label": "Secondary color of checkbox. (Example: 255;255;255) Color of checkmark when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "SecondaryColor" }, { "value": "24", "type": "Number", "label": "Length of each side (px) Minimum: 10", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "SideLength" }, { "value": "5", "type": "Number", "label": "Line width of checkmark (px) (Min: 1, Max: 1/4 * SideLength)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "LineWidth" }, { "value": "2", "type": "Number", "label": "Border thickness (px) This border is only visible when the checkbox is unchecked. ", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "BorderThickness" }, { "value": "", "type": "Number", "label": "Halo size (pressed). If blank, this is set to \"HaloRadiusHover * 1.1\"", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], "name": "HaloRadiusPressed" } ], @@ -21754,6 +21865,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Draggable slider", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "DraggableSliderControl", @@ -21796,6 +21908,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -25413,38 +25527,34 @@ "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], "name": "ValueMin" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "ValueMax" }, { "value": "0", "type": "Number", "label": "Tick spacing", - "description": "", - "group": "", - "extraInformation": [], "name": "TickSpacing" }, { "value": "circle", "type": "Choice", "label": "Thumb shape", - "description": "", "group": "Thumb", - "extraInformation": [ - "circle", - "rectangle" + "choices": [ + { + "label": "circle", + "value": "circle" + }, + { + "label": "rectangle", + "value": "rectangle" + } ], "name": "ThumbShape" }, @@ -25452,144 +25562,110 @@ "value": "20", "type": "Number", "label": "Thumb width", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "ThumbWidth" }, { "value": "20", "type": "Number", "label": "Thumb height", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "ThumbHeight" }, { "value": " 24;119;211", "type": "Color", "label": "Thumb Color", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "ThumbColor" }, { "value": "255", "type": "Number", "label": "Thumb opacity", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "ThumbOpacity" }, { "value": "200", "type": "Number", "label": "Track length", - "description": "", "group": "Track", - "extraInformation": [], "name": "TrackLength" }, { "value": "4", "type": "Number", "label": "Track thickness", - "description": "", "group": "Track", - "extraInformation": [], "name": "TrackThickness" }, { "value": "", "type": "String", "label": "Inactive track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], "name": "InactiveTrackColor" }, { "value": "96", "type": "Number", "label": "Inactive track opacity", - "description": "", "group": "Track", - "extraInformation": [], "name": "InactiveTrackOpacity" }, { "value": " ", "type": "String", "label": "Active track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], "name": "ActiveTrackColor" }, { "value": "255", "type": "Number", "label": "Active track opacity", - "description": "", "group": "Track", - "extraInformation": [], "name": "ActiveTrackOpacity" }, { "value": "24", "type": "Number", "label": "Halo size (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "HaloRadius" }, { "value": "32", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "HaloOpacityHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Thumb", - "extraInformation": [], "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Rounded track ends", - "description": "", "group": "Track", - "extraInformation": [], "name": "RoundedTrack" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", - "group": "", - "extraInformation": [], "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingDragged" }, @@ -25597,9 +25673,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Value" }, @@ -25607,9 +25680,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbOffset" }, @@ -25617,9 +25687,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -25627,9 +25694,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -25637,9 +25701,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseX" }, @@ -25647,9 +25708,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseY" }, @@ -25657,9 +25715,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -25667,9 +25722,6 @@ "value": "0.2", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -25677,9 +25729,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" } @@ -25694,21 +25743,25 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Fire bullets", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/fire-bullet/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", - "version": "0.7.0", + "version": "0.9.1", "description": [ - "This extension allows objects to fire bullets.", + "This extension allows objects to fire bullets. To use it, add the behavior to the object that will shoot, then use the provided action to launch another object as the bullet.", "", - "It handles:", + "The properties of the behavior can be used to customize:", "- Cooldown between shots", "- Firing multiple bullets at a time ([open the project online](https://editor.gdevelop.io/?project=example://fire-bullet))", "- Ammo management", "- Overheat", "", + "The speed can be specified when using the actions to fire the bullets.", + "The bullets are automatically given a permanent force to make them move (no need to use a linear movement or move them with another behavior).", + "", "It can be used for:", "- Twin-stick shooters ([open the project online](https://editor.gdevelop.io/?project=example://conviction-of-gun-dude-desktop))", "- Shoot'em up ([open the project online](https://editor.gdevelop.io/?project=example://space-shooter))", @@ -25737,10 +25790,12 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "Fire bullets, manage ammo, reloading, and overheating.", + "description": "Fire bullets, manage ammo, reloading, and overheating. Once added to your object that must shoot, use the behavior action in your events to fire another object as a bullet. This action will also make the bullet move (using a permanent force) at the speed specified in the action.", "fullName": "Fire bullets", "name": "FireBullet", "objectType": "", @@ -25766,24 +25821,22 @@ }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "Object.Behavior::PropertyStartingAmmo()" + "StartingAmmo" ] }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -25836,114 +25889,93 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "HasJustFired", + "True", + "" ] } ], - "actions": [], - "events": [ + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Reset firing cooldown", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Object", - "\"__FireBullet.FiringCooldown\"" - ] - } - ] - } - ], - "parameters": [] + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "False", + "" + ] }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.FiringCooldown\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TotalShotsFired", + "+", + "1" + ] + } + ], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Update ammo", + "name": "Ammo", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Subtract 1 from ammo (if not unlimited ammo)" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, - "value": "FireBullet::FireBullet::PropertyUnlimitedAmmo" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "UnlimitedAmmo", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "max(0,Object.Behavior::AmmoQuantity() - 1)" + "max(0, AmmoQuantity - 1)" ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update reloading counter", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsPerReload" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsPerReload", ">", "0" ] @@ -25952,39 +25984,27 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "-", "1" ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Automatically reload gun when needed", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "AutomaticReloading", + "True", + "" ] }, { @@ -26030,32 +26050,19 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Update Overheat", + "name": "Overheat", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Increase heat (if needed)" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHeatIncreasePerShot" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatIncreasePerShot", ">", "0" ] @@ -26064,39 +26071,25 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "+", - "Object.Behavior::PropertyHeatIncreasePerShot()" + "HeatIncreasePerShot" ] } ], "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if this caused overheat" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyOverheatDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OverheatDuration", ">", "0" ] @@ -26128,63 +26121,6 @@ } ], "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update statistics", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalShotsFired" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Reset firing detection", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::SetPropertyHasJustFired" - }, - "parameters": [ - "Object", - "Behavior", - "=" - ] - } - ] - } - ], - "parameters": [] } ] } @@ -26196,7 +26132,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Reload gun when needed", + "name": "Reload", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -26233,30 +26169,29 @@ "Object", "\"__FireBullet.ReloadingTimer\"", ">=", - "Object.Behavior::PropertyReloadDuration()" + "ReloadDuration" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalReloadsCompleted" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TotalReloadsCompleted", "+", "1" ] }, { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadInProgress" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "ReloadInProgress", + "False", + "" ] } ], @@ -26278,13 +26213,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -26319,13 +26253,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "min(Object.Behavior::PropertyShotsPerReload(), Object.Behavior::PropertyAmmoQuantity())" + "min(ShotsPerReload, AmmoQuantity)" ] } ] @@ -26340,7 +26273,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Reduce heat level (based on cooling rate)", + "name": "Cooling", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -26352,7 +26285,7 @@ "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object.Behavior::HeatLevel()", + "HeatLevel", ">", "0" ] @@ -26365,11 +26298,10 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyExponentialCoolingRate" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ExponentialCoolingRate", ">", "0" ] @@ -26378,13 +26310,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "=", - "max(0, Object.Behavior::PropertyHeatLevel() - TimeDelta() * Object.Behavior::PropertyExponentialCoolingRate() * Object.Behavior::PropertyHeatLevel())" + "max(0, HeatLevel - TimeDelta() * ExponentialCoolingRate * HeatLevel)" ] } ] @@ -26394,11 +26325,10 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyLinearCoolingRate" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LinearCoolingRate", ">", "0" ] @@ -26407,13 +26337,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", "=", - "max(0, Object.Behavior::PropertyHeatLevel() - TimeDelta() * Object.Behavior::PropertyLinearCoolingRate())" + "max(0, HeatLevel - TimeDelta() * LinearCoolingRate)" ] } ] @@ -26440,44 +26369,32 @@ "objectGroups": [] }, { - "description": "Fire bullets toward an object.", + "description": "Fire bullets toward an object at a specified speed.", "fullName": "Fire bullets toward an object", "functionType": "Action", "name": "FireTowardObject", "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward _PARAM5_ with speed _PARAM6_ px/s", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Calculate the trajectory angle and use the \"Fire bullets\" action", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::Fire" - }, - "parameters": [ - "Object", - "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "Object.AngleToObject(TargetObject)", - "GetArgumentAsNumber(\"Speed\")", - "" - ] - } + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "Object.AngleToObject(TargetObject)", + "Speed", + "" ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -26521,44 +26438,32 @@ "objectGroups": [] }, { - "description": "Fire bullets toward a position.", + "description": "Fire bullets toward a position at a specified speed.", "fullName": "Fire bullets toward a position", "functionType": "Action", "name": "FireTowardPosition", "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward position _PARAM5_;_PARAM6_ with speed _PARAM7_ px/s", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Calculate the trajectory angle and use the \"Fire bullets\" action", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::Fire" - }, - "parameters": [ - "Object", - "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "Object.AngleToPosition(GetArgumentAsNumber(\"TargetXPosition\"), GetArgumentAsNumber(\"TargetYPosition\"))", - "GetArgumentAsNumber(\"Speed\")", - "" - ] - } + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "Object.AngleToPosition(TargetXPosition, TargetYPosition)", + "Speed", + "" ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -26607,249 +26512,195 @@ "objectGroups": [] }, { - "description": "Fire bullets in the direction of a given angle.", + "description": "Fire bullets in the direction of a given angle at a specified speed.", "fullName": "Fire bullets toward an angle", "functionType": "Action", "name": "Fire", "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward angle _PARAM5_ and speed _PARAM6_ px/s", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check if ready to shoot", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::IsReadyToShoot" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Object", - "Behavior", - "" + "BulletQuantity", + "=", + "1" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHasJustFired" + "value": "FireBullet::FireBullet::FireSingleBullet" }, "parameters": [ "Object", "Behavior", - "yes" + "XPosition", + "YPosition", + "Bullet", + "Angle", + "Speed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "BulletQuantity", + ">", + "1" ] } ], + "actions": [], "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Single bullet", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PropertyBulletQuantity()", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::FireSingleBullet" - }, - "parameters": [ - "Object", - "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "GetArgumentAsNumber(\"Angle\")", - "GetArgumentAsNumber(\"Speed\")", - "" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Multiple bullets", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PropertyBulletQuantity()", - ">", - "1" - ] - } - ], - "actions": [ + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "BulletQuantity", + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.BatchOrderID", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::FiringArc" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "360", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "MultiShotAngle", + "=", + "Angle + lerp(-FiringArc / 2, FiringArc / 2, BulletIndex / (BulletQuantity - 1)) " + ] + } ] }, { - "type": { - "value": "ModVarObjet" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "__FireBullet.CurrentBulletAngle", - "=", - "GetArgumentAsNumber(\"Angle\") - Object.Behavior::PropertyFiringArc()/2" - ] - } - ], - "events": [ + "comment": "When firing in a full circle, prevent first and last bullet from using the same angle" + }, { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Object.Behavior::PropertyBulletQuantity()", - "conditions": [], - "actions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "FireBullet::FireBullet::FireSingleBullet" + "value": "FireBullet::FireBullet::FiringArc" }, "parameters": [ "Object", "Behavior", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Bullet", - "Object.Variable(__FireBullet.CurrentBulletAngle) + RandomInRange(-Object.Behavior::PropertyAngleVariance(),Object.Behavior::PropertyAngleVariance())", - "GetArgumentAsNumber(\"Speed\")", + "=", + "360", "" ] } ], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetNumberVariable" }, - "comment": "When firing in a full circle, prevent first and last bullet from using the same angle" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "FireBullet::FireBullet::FiringArc" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "360", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.CurrentBulletAngle", - "+", - "Object.Behavior::PropertyFiringArc() / (Object.Behavior::PropertyBulletQuantity())" - ] - } + "parameters": [ + "MultiShotAngle", + "=", + "Angle + lerp(-FiringArc / 2, FiringArc / 2, BulletIndex / BulletQuantity) " ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "FireBullet::FireBullet::FiringArc" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "360", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.CurrentBulletAngle", - "+", - "Object.Behavior::PropertyFiringArc() / (Object.Behavior::PropertyBulletQuantity() - 1)" - ] - } + "type": { + "value": "FireBullet::FireBullet::FireSingleBullet" + }, + "parameters": [ + "Object", + "Behavior", + "XPosition", + "YPosition", + "Bullet", + "MultiShotAngle", + "Speed", + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__FireBullet.BatchOrderID", - "+", - "1" - ] - } + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BulletIndex", + "+", + "1" ] } ] @@ -26857,12 +26708,23 @@ ] } ], - "parameters": [] + "variables": [ + { + "folded": true, + "name": "MultiShotAngle", + "type": "number", + "value": 0 + }, + { + "name": "BulletIndex", + "type": "number", + "value": 0 + } + ] } ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -26946,9 +26808,9 @@ "parameters": [ "", "Bullet", - "GetArgumentAsNumber(\"XPosition\")", - "GetArgumentAsNumber(\"YPosition\")", - "Object.Behavior::PropertyBulletLayer()" + "XPosition", + "YPosition", + "BulletLayer" ] } ], @@ -26971,13 +26833,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRandomizedAngle" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "RandomizedAngle", "=", - "GetArgumentAsNumber(\"Angle\") + RandomInRange(-Object.Behavior::PropertyAngleVariance(), Object.Behavior::PropertyAngleVariance())" + "Angle + RandomInRange(-AngleVariance, AngleVariance)" ] }, { @@ -26986,64 +26847,13 @@ }, "parameters": [ "Bullet", - "Object.Behavior::PropertyRandomizedAngle()", - "GetArgumentAsNumber(\"Speed\") + RandomInRange(-Object.Behavior::PropertyBulletSpeedVariance(), Object.Behavior::PropertyBulletSpeedVariance())", + "RandomizedAngle", + "Speed + RandomInRange(-BulletSpeedVariance, BulletSpeedVariance)", "1" ] } ] }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Add identifier variables (to enable advanced picking by users)" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Bullet", - "__FireBullet.BulletID", - "=", - "Object.Behavior::PropertyTotalBulletsCreated()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Bullet", - "__FireBullet.BatchID", - "=", - "Object.Behavior::PropertyTotalShotsFired()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Bullet", - "__FireBullet.BatchOrderID", - "=", - "0" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -27061,11 +26871,12 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyRotateBullet" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "RotateBullet", + "True", + "" ] } ], @@ -27077,7 +26888,7 @@ "parameters": [ "Bullet", "=", - "Object.Behavior::PropertyRandomizedAngle()" + "RandomizedAngle" ] } ] @@ -27102,11 +26913,10 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalBulletsCreated" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TotalBulletsCreated", "+", "1" ] @@ -27182,12 +26992,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadInProgress" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "ReloadInProgress", + "True", + "" ] }, { @@ -27225,30 +27035,17 @@ "name": "HasJustFired", "sentence": "_PARAM0_ has just fired", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "HasJustFired", + "True", + "" ] } ], @@ -27292,11 +27089,12 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyRotateBullet" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "RotateBullet", + "True", + "" ] } ], @@ -27344,7 +27142,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFiringArc()" + "FiringArc" ] } ] @@ -27381,13 +27179,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyFiringArc" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FiringArc", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -27434,7 +27231,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -27478,7 +27275,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAngleVariance()" + "AngleVariance" ] } ] @@ -27515,13 +27312,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAngleVariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AngleVariance", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -27568,7 +27364,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -27612,7 +27408,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyBulletSpeedVariance()" + "BulletSpeedVariance" ] } ] @@ -27649,13 +27445,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletSpeedVariance" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletSpeedVariance", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -27702,7 +27497,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -27746,7 +27541,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyBulletQuantity()" + "BulletQuantity" ] } ] @@ -27783,13 +27578,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletQuantity", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -27836,7 +27630,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -27877,13 +27671,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyBulletLayer" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "BulletLayer", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -27923,22 +27716,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"RotateBullet\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRotateBullet" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "RotateBullet", + "False", + "" ] } ] @@ -27948,22 +27743,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"RotateBullet\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyRotateBullet" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "RotateBullet", + "True", + "" ] } ] @@ -27984,7 +27781,7 @@ { "defaultValue": "yes", "description": "Rotate bullet to match trajetory", - "name": "RotateBullet", + "name": "Value", "optional": true, "type": "yesorno" } @@ -28005,22 +27802,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"UnlimitedAmmo\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyUnlimitedAmmo" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "UnlimitedAmmo", + "False", + "" ] } ] @@ -28030,22 +27829,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"UnlimitedAmmo\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyUnlimitedAmmo" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "UnlimitedAmmo", + "True", + "" ] } ] @@ -28066,7 +27867,7 @@ { "defaultValue": "yes", "description": "Unlimited ammo", - "name": "UnlimitedAmmo", + "name": "Value", "optional": true, "type": "yesorno" } @@ -28090,7 +27891,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFireCooldown()" + "FireCooldown" ] } ] @@ -28127,13 +27928,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyFireCooldown" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FireCooldown", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -28180,7 +27980,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"NewCooldown\")", + "Value", "" ] } @@ -28201,7 +28001,7 @@ }, { "description": "Cooldown in seconds", - "name": "NewCooldown", + "name": "Value", "type": "expression" } ], @@ -28224,7 +28024,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyReloadDuration()" + "ReloadDuration" ] } ] @@ -28261,13 +28061,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyReloadDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ReloadDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -28314,7 +28113,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -28358,7 +28157,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyOverheatDuration()" + "OverheatDuration" ] } ] @@ -28395,13 +28194,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyOverheatDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "OverheatDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -28448,7 +28246,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -28492,7 +28290,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAmmoQuantity()" + "AmmoQuantity" ] } ] @@ -28529,13 +28327,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "max(0,Value)" + "max(0, Value)" ] } ] @@ -28582,7 +28379,7 @@ "Object", "Behavior", "=", - "max(0,Value)", + "max(0, Value)", "" ] } @@ -28626,7 +28423,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyHeatIncreasePerShot()" + "HeatIncreasePerShot" ] } ] @@ -28663,13 +28460,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyHeatIncreasePerShot" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatIncreasePerShot", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -28716,7 +28512,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -28760,7 +28556,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxAmmo()" + "MaxAmmo" ] } ] @@ -28797,13 +28593,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyMaxAmmo" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxAmmo", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -28813,11 +28608,10 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyMaxAmmo" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxAmmo", ">", "0" ] @@ -28826,13 +28620,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "min(Object.Behavior::MaxAmmo(),Object.Behavior::AmmoQuantity())" + "min(MaxAmmo, AmmoQuantity)" ] } ] @@ -28879,7 +28672,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -28920,11 +28713,10 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalShotsFired" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TotalShotsFired", "=", "0" ] @@ -28961,11 +28753,10 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalBulletsCreated" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TotalBulletsCreated", "=", "0" ] @@ -29002,11 +28793,10 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyTotalReloadsCompleted" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TotalReloadsCompleted", "=", "0" ] @@ -29046,7 +28836,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -29083,13 +28873,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsPerReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsPerReload", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -29099,26 +28888,24 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsBeforeNextReload" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", ">", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", - "Object.Behavior::PropertyShotsPerReload()" + "ShotsPerReload" ] } ] @@ -29165,7 +28952,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -29206,12 +28993,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAutomaticReloading" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=" + "AutomaticReloading", + "False", + "" ] } ] @@ -29221,22 +29008,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAutomaticReloading" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "AutomaticReloading", + "True", + "" ] } ] @@ -29281,7 +29070,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyLinearCoolingRate()" + "LinearCoolingRate" ] } ] @@ -29318,13 +29107,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyLinearCoolingRate" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "LinearCoolingRate", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -29371,7 +29159,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -29415,7 +29203,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyExponentialCoolingRate()" + "ExponentialCoolingRate" ] } ] @@ -29452,13 +29240,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyExponentialCoolingRate" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ExponentialCoolingRate", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -29506,7 +29293,7 @@ "Object", "Behavior", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -29547,13 +29334,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "+", - "GetArgumentAsNumber(\"AmmoGained\")" + "AmmoGained" ] } ] @@ -29575,11 +29361,10 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyMaxAmmo" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxAmmo", ">", "0" ] @@ -29588,13 +29373,12 @@ "actions": [ { "type": { - "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AmmoQuantity", "=", - "min(Object.Behavior::MaxAmmo(),Object.Behavior::AmmoQuantity())" + "min(MaxAmmo, AmmoQuantity)" ] } ] @@ -29614,11 +29398,12 @@ }, { "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "AutomaticReloading", + "True", + "" ] } ], @@ -29673,7 +29458,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyBulletLayer()" + "BulletLayer" ] } ] @@ -29714,7 +29499,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "min(1,Object.Behavior::PropertyHeatLevel())" + "min(1, HeatLevel)" ] } ] @@ -29755,7 +29540,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalShotsFired()" + "TotalShotsFired" ] } ] @@ -29796,7 +29581,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalBulletsCreated()" + "TotalBulletsCreated" ] } ] @@ -29837,7 +29622,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTotalReloadsCompleted()" + "TotalReloadsCompleted" ] } ] @@ -29878,7 +29663,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyShotsBeforeNextReload()" + "ShotsBeforeNextReload" ] } ] @@ -29919,7 +29704,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "max(0,Object.Behavior::Cooldown() - Object.ObjectTimerElapsedTime(\"__FireBullet.FiringCooldown\"))" + "max(0, FireCooldown - Object.ObjectTimerElapsedTime(\"__FireBullet.FiringCooldown\"))" ] } ] @@ -29972,7 +29757,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "max(0, Object.Behavior::PropertyOverheatDuration() - Object.ObjectTimerElapsedTime(\"__FireBullet.OverheatDuration\"))" + "max(0, OverheatDuration - Object.ObjectTimerElapsedTime(\"__FireBullet.OverheatDuration\"))" ] } ] @@ -30025,7 +29810,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "max(0, Object.Behavior::PropertyReloadDuration() - Object.ObjectTimerElapsedTime(\"__FireBullet.ReloadingTimer\"))" + "max(0, ReloadDuration - Object.ObjectTimerElapsedTime(\"__FireBullet.ReloadingTimer\"))" ] } ] @@ -30076,352 +29861,355 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyReloadInProgress" + "value": "BooleanVariable" + }, + "parameters": [ + "ReloadInProgress", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if object is ready to shoot.", + "fullName": "Is ready to shoot", + "functionType": "Condition", + "group": "Firing", + "name": "IsReadyToShoot", + "sentence": "_PARAM0_ is ready to shoot", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasJustFired", + "True", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsOutOfAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsReloadNeeded" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsReloadInProgress" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsFiringCooldownActive" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsOverheated" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if automatic reloading is enabled.", + "fullName": "Is automatic reloading enabled", + "functionType": "Condition", + "group": "Reload", + "name": "IsAutomaticReloadingEnabled", + "sentence": "Automatic reloading is enabled on_PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "AutomaticReloading", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if ammo is unlimited.", + "fullName": "Is ammo unlimited", + "functionType": "Condition", + "group": "Ammo", + "name": "IsUnlimitedAmmo", + "sentence": "_PARAM0_ has unlimited ammo", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "UnlimitedAmmo", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if object has no ammo available.", + "fullName": "Is out of ammo", + "functionType": "Condition", + "group": "Ammo", + "name": "IsOutOfAmmo", + "sentence": "_PARAM0_ is out of ammo", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsUnlimitedAmmo" }, "parameters": [ "Object", - "Behavior" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "FireBullet::FireBullet", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if object is ready to shoot.", - "fullName": "Is ready to shoot", - "functionType": "Condition", - "group": "Firing", - "name": "IsReadyToShoot", - "sentence": "_PARAM0_ is ready to shoot", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "FireBullet::FireBullet::PropertyHasJustFired" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsOutOfAmmo" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsReloadNeeded" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsReloadInProgress" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsFiringCooldownActive" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsOverheated" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "FireBullet::FireBullet", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if automatic reloading is enabled.", - "fullName": "Is automatic reloading enabled", - "functionType": "Condition", - "group": "Reload", - "name": "IsAutomaticReloadingEnabled", - "sentence": "Automatic reloading is enabled on_PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "FireBullet::FireBullet::PropertyAutomaticReloading" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "FireBullet::FireBullet", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if ammo is unlimited.", - "fullName": "Is ammo unlimited", - "functionType": "Condition", - "group": "Ammo", - "name": "IsUnlimitedAmmo", - "sentence": "_PARAM0_ has unlimited ammo", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "FireBullet::FireBullet::PropertyUnlimitedAmmo" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "FireBullet::FireBullet", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if object has no ammo available.", - "fullName": "Is out of ammo", - "functionType": "Condition", - "group": "Ammo", - "name": "IsOutOfAmmo", - "sentence": "_PARAM0_ is out of ammo", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "FireBullet::FireBullet::IsUnlimitedAmmo" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "value": "FireBullet::FireBullet::PropertyAmmoQuantity" - }, - "parameters": [ - "Object", - "Behavior", - "<=", - "0" + "Behavior", + "" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AmmoQuantity", + "<=", + "0" ] } ], @@ -30491,22 +30279,20 @@ "conditions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyShotsPerReload" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsPerReload", ">", "0" ] }, { "type": { - "value": "FireBullet::FireBullet::PropertyShotsBeforeNextReload" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "ShotsBeforeNextReload", "=", "0" ] @@ -30572,11 +30358,10 @@ "subInstructions": [ { "type": { - "value": "FireBullet::FireBullet::PropertyHeatLevel" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HeatLevel", ">=", "1" ] @@ -30692,17 +30477,12 @@ "unit": "Second", "label": "Firing cooldown", "description": "Objects cannot shoot while firing cooldown is active.", - "group": "", - "extraInformation": [], "name": "FireCooldown" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustFired" }, @@ -30710,9 +30490,6 @@ "value": "true", "type": "Boolean", "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], "name": "RotateBullet" }, { @@ -30722,7 +30499,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "FiringArc" }, { @@ -30731,7 +30507,6 @@ "label": "Number of bullets created at once", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], "name": "BulletQuantity" }, { @@ -30741,7 +30516,6 @@ "label": "Angle variance", "description": "Make imperfect aim (between 0 and 180 degrees).", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "AngleVariance" }, @@ -30752,7 +30526,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range.", "group": "Firing variance", - "extraInformation": [], "advanced": true, "name": "BulletSpeedVariance" }, @@ -30760,9 +30533,6 @@ "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -30772,7 +30542,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ShotsPerReload" }, @@ -30783,7 +30552,6 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress.", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "ReloadDuration" }, @@ -30791,9 +30559,7 @@ "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "MaxAmmo" }, @@ -30801,9 +30567,6 @@ "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -30812,8 +30575,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -30821,9 +30582,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -30831,9 +30589,7 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "StartingAmmo" }, @@ -30841,9 +30597,6 @@ "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, @@ -30851,9 +30604,7 @@ "value": "true", "type": "Boolean", "label": "Unlimited ammo", - "description": "", "group": "Ammo", - "extraInformation": [], "advanced": true, "name": "UnlimitedAmmo" }, @@ -30861,9 +30612,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ReloadInProgress" }, @@ -30873,7 +30621,6 @@ "label": "Heat increase per shot (between 0 and 1)", "description": " Object is overheated when Heat reaches 1.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "HeatIncreasePerShot" }, @@ -30881,9 +30628,6 @@ "value": "0", "type": "Number", "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeatLevel" }, @@ -30891,9 +30635,7 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], "advanced": true, "name": "AutomaticReloading" }, @@ -30904,7 +30646,6 @@ "label": "Overheat duration", "description": "Object cannot shoot while overheat duration is active.", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "OverheatDuration" }, @@ -30912,9 +30653,7 @@ "value": "0.1", "type": "Number", "label": "Linear cooling rate (per second)", - "description": "", "group": "Overheat", - "extraInformation": [], "advanced": true, "name": "LinearCoolingRate" }, @@ -30928,6 +30667,7 @@ "Linear", "Exponential" ], + "choices": [], "advanced": true, "name": "ExponentialCoolingRate" }, @@ -30937,7 +30677,6 @@ "label": "Layer the bullets are created on", "description": "Base layer by default.", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -30945,9 +30684,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" } @@ -30962,6 +30698,7 @@ "category": "", "extensionNamespace": "", "fullName": "Flash layer", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", "name": "FlashLayer", @@ -30989,6 +30726,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Make a layer visible for a specified duration, and then hide the layer.", @@ -31221,6 +30960,7 @@ "category": "", "extensionNamespace": "", "fullName": "Health (life points and damages for objects)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWhlYXJ0LWhhbGYtZnVsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDVDMTUsNSAxMy41OCw1LjkxIDEzLDcuMlYxNy43NEMxNy4yNSwxMy44NyAyMCwxMS4yIDIwLDguNUMyMCw2LjUgMTguNSw1IDE2LjUsNU0xNi41LDNDMTkuNTgsMyAyMiw1LjQxIDIyLDguNUMyMiwxMi4yNyAxOC42LDE1LjM2IDEzLjQ1LDIwLjAzTDEyLDIxLjM1TDEwLjU1LDIwLjAzQzUuNCwxNS4zNiAyLDEyLjI3IDIsOC41QzIsNS40MSA0LjQyLDMgNy41LDNDOS4yNCwzIDEwLjkxLDMuODEgMTIsNS4wOEMxMy4wOSwzLjgxIDE0Ljc2LDMgMTYuNSwzWiIgLz48L3N2Zz4=", "name": "Health", @@ -31243,6 +30983,8 @@ "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -31710,36 +31452,24 @@ "value": "100", "type": "Number", "label": "Health", - "description": "", - "group": "", - "extraInformation": [], "name": "Health" }, { "value": "0", "type": "Number", "label": "Damage cooldown (in seconds) (0 for no cooldown)", - "description": "", - "group": "", - "extraInformation": [], "name": "DamageCooldown" }, { "value": "100", "type": "Number", "label": "Maximum health (0 for no maximum)", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxHealth" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsJustDamaged" }, @@ -31747,9 +31477,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CooldownActive" } @@ -31764,6 +31491,7 @@ "category": "", "extensionNamespace": "", "fullName": "Flash (blink)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", "name": "Flash", @@ -31790,6 +31518,8 @@ "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -32226,18 +31956,12 @@ "value": "0.1", "type": "Number", "label": "Half period (time during which object is invisible), in seconds", - "description": "", - "group": "", - "extraInformation": [], "name": "HalfPeriodTime" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsFlashing" }, @@ -32245,9 +31969,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "FlashDuration" } @@ -32262,6 +31983,7 @@ "category": "", "extensionNamespace": "", "fullName": "Shake Object (position, angle, scale)", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", @@ -32306,6 +32028,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -36667,37 +36391,29 @@ }, { "author": "westboy31, Tristan Rhodes (https://victrisgames.itch.io/)", - "category": "", + "category": "Camera", "extensionNamespace": "", - "fullName": "Camera Shake", - "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", + "fullName": "Camera shake", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZlY3Rvci1kaWZmZXJlbmNlLWFiIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTMsMUMxLjg5LDEgMSwxLjg5IDEsM1Y1SDNWM0g1VjFIM003LDFWM0gxMFYxSDdNMTIsMVYzSDE0VjVIMTZWM0MxNiwxLjg5IDE1LjExLDEgMTQsMUgxMk0xLDdWMTBIM1Y3SDFNMTQsN0MxNCw3IDE0LDExLjY3IDE0LDE0QzExLjY3LDE0IDcsMTQgNywxNEM3LDE0IDcsMTggNywyMEM3LDIxLjExIDcuODksMjIgOSwyMkgyMEMyMS4xMSwyMiAyMiwyMS4xMSAyMiwyMFY5QzIyLDcuODkgMjEuMTEsNyAyMCw3QzE4LDcgMTQsNyAxNCw3TTE2LDlIMjBWMjBIOVYxNkgxNEMxNS4xMSwxNiAxNiwxNS4xMSAxNiwxNFY5TTEsMTJWMTRDMSwxNS4xMSAxLjg5LDE2IDMsMTZINVYxNEgzVjEySDFaIiAvPjwvc3ZnPg==", "name": "CameraShake", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/vector-difference-ab.svg", - "shortDescription": "Shake the camera on the specified layer using one or more methods of shaking (position, angle, zoom).", - "version": "2.6.5", + "shortDescription": "Shake layer cameras.", + "version": "3.2.0", "description": [ - "Ideal for explosions, hit/impacts, earthquake, etc.", - "", - "Select one or more methods of shaking:", - "- Position: Shake the X and/or Y position of the camera ", - "- Angle: Shake the rotation of the camera ", - "- Zoom: Shake the zoom level of the camera ", + "Shake layer cameras with translation, rotation and zoom.", "", - "Control how the camera shakes:", - "- Amplitude: How far the camera moves during each shake", - "- Duration: Amount of time to shake the camera", - "- Time between shakes: Amount of time between each change of the movement of the camera", - "- Keep shaking until stopped (boolean)", + "- Short shaking can be used to give impact (explosion, hit)", + "- Shaking can go indefinitely to set an ambiance (engine vibration, earthquake, pulsing)", + "- Low frequency shaking allows to simulate slow moving objects (ship rocking back and forth)", "", - "Tips:", - "- For a single-shake effect, set the \"Time between shakes\" to be equal to \"Duration\" (great for a hit or impact)", - "- To make the single-shake move in the opposite direction, use negative numbers ", - "- To repeat a single-shake effect in a loop, add a condition \"Camera is not shaking\" ", - "- Use a long \"Time between shakes\" to simulate a slow moving object (like a ship rocking back and forth)", - "- Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. ", - "- Use \"Shake until stopped\" to simulate engine vibration, earthquake, or pulsing", - "" + "Release notes:", + "- Version 3.0.0", + " - No adaptation of the game events is needed.", + " - It fixes an issue when used with scrolling, the amplitude will feel bigger in this case.", + " - The shaking relies on noise which could feel a bit different.", + " - This extension can no longer do impulses. For this, another extension \"Camera impulse\" can be used." ], "origin": { "identifier": "CameraShake", @@ -36708,432 +36424,163 @@ "camera", "effect", "screen", - "shake", - "zoom", - "position", - "rotate" + "shake" ], "authorIds": [ - "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "m4hBMBTUilft4s1V4FQQPakVDGx1" ], "dependencies": [], - "eventsFunctions": [ + "globalVariables": [], + "sceneVariables": [ { - "description": "Shake the camera on the specified layer, using one or more ways to shake (position, angle, zoom).", - "fullName": "Camera Shake", - "functionType": "Action", - "name": "CameraShake", - "sentence": "Shake camera on _PARAM3_ layer for _PARAM5_ seconds. Use an amplitude of _PARAM1_px on X axis and _PARAM2_px on Y axis, angle rotation amplitude _PARAM6_ degrees, and zoom amplitude _PARAM7_ percent. Wait _PARAM8_ seconds between shakes. Keep shaking until stopped: _PARAM9_", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Camera Shake", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Start/Reset duration timer" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"__CameraShake_DurationTimer\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "=", - "GetArgumentAsNumber(\"PowerX\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "=", - "GetArgumentAsNumber(\"PowerY\")" - ] - }, - { - "type": { - "value": "ModVarGlobalTxt" - }, - "parameters": [ - "__CameraShake_Layer", - "=", - "GetArgumentAsString(\"Layer\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_Camera", - "=", - "GetArgumentAsNumber(\"Camera\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_Duration", - "=", - "GetArgumentAsNumber(\"Duration\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_PowerAngle", - "=", - "GetArgumentAsNumber(\"PowerAngle\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_PowerZoom", - "=", - "GetArgumentAsNumber(\"PowerZoom\")" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_TimeBetweenShakes", - "=", - "GetArgumentAsNumber(\"TimeBetweenShakes\")" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Determine if the shake should keep going until stopped" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetGlobalVariableAsBoolean" - }, - "parameters": [ - "__CameraShake_ShakeForever", - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShakeForever\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetGlobalVariableAsBoolean" - }, - "parameters": [ - "__CameraShake_ShakeForever", - "True" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Add default values if none were provided" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_Duration", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_Duration", - "=", - "0.5" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_TimeBetweenShakes", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_TimeBetweenShakes", - "=", - "0.08" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "If duration is less than a single shake, increase duration to make 1 full shake" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_Duration", - "<", - "GlobalVariable(__CameraShake_TimeBetweenShakes)" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_Duration", - "=", - "GlobalVariable(__CameraShake_TimeBetweenShakes)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect initial shake" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_ShakeInProgress", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_InitialShake", - "=", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Initiate the onScenePostEvents function" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ShakeInProgress", - "=", - "1" - ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [ + "folded": true, + "name": "DefaultFrequency", + "type": "number", + "value": 12 + }, + { + "folded": true, + "name": "DefaultAmplitudeX", + "type": "number", + "value": 4 + }, + { + "folded": true, + "name": "DefaultAmplitudeY", + "type": "number", + "value": 4 + }, + { + "folded": true, + "name": "DefaultAmplitudeAngle", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "DefaultAmplitudeZoom", + "type": "number", + "value": 1 + }, + { + "folded": true, + "name": "Duration", + "type": "number", + "value": 0 + }, + { + "name": "Layers", + "type": "structure", + "children": [] + }, + { + "name": "Layer", + "type": "structure", + "children": [ { - "description": "Amplitude of shaking on the X axis (pixels) (For example: 5)", - "name": "PowerX", - "type": "expression" + "name": "AmplitudeAngle", + "type": "number", + "value": 0 }, { - "description": "Amplitude of shaking on the Y axis (pixels) (For example: 5)", - "name": "PowerY", - "type": "expression" + "name": "AmplitudeX", + "type": "number", + "value": 0 }, { - "description": "Layer (base layer if empty)", - "name": "Layer", - "type": "layer" + "name": "AmplitudeY", + "type": "number", + "value": 0 }, { - "description": "Camera index (Default: 0)", - "name": "Camera", - "type": "expression" + "folded": true, + "name": "AmplitudeZoom", + "type": "number", + "value": 0 }, { - "description": "Duration (seconds) (Default: 0.5)", - "name": "Duration", - "type": "expression" + "folded": true, + "name": "CameraDeltaAngle", + "type": "number", + "value": 0 }, { - "description": "Angle rotation amplitude (degrees) (For example: 2)", - "name": "PowerAngle", - "type": "expression" + "name": "CameraDeltaX", + "type": "number", + "value": 0 }, { - "description": "Zoom amplitude (percent change) (For example: 3)", - "name": "PowerZoom", - "type": "expression" + "name": "CameraDeltaY", + "type": "number", + "value": 0 }, { - "description": "Amount of time between shakes (seconds) (Default: 0.08)", - "name": "TimeBetweenShakes", - "type": "expression" + "folded": true, + "name": "CameraDeltaZoom", + "type": "number", + "value": 0 }, { - "description": "Keep shaking until stopped", - "longDescription": "Duration value will be ignored", - "name": "ShakeForever", - "type": "yesorno" + "folded": true, + "name": "Frequency", + "type": "number", + "value": 0 + } + ] + }, + { + "folded": true, + "name": "LayerName", + "type": "string", + "value": "" + }, + { + "folded": true, + "name": "Time", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "StartEaseDuration", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "StopEaseDuration", + "type": "number", + "value": 0 + } + ], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CameraShake::SetLayerShakable" + }, + "parameters": [ + "", + "", + "\"\"", + "" + ] + } + ] } ], + "parameters": [], "objectGroups": [] }, { @@ -37143,95 +36590,420 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Camera Shake", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Step time counters." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Time", + "+", + "TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraShake::IsShaking" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Start shaking", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarGlobal" + "value": "NumberVariable" + }, + "parameters": [ + "Time", + "<", + "StartEaseDuration" + ] + }, + { + "type": { + "inverted": true, + "value": "NumberVariable" + }, + "parameters": [ + "Time", + ">", + "Duration - StopEaseDuration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake_ShakeInProgress", + "EaseFactor", "=", - "1" + "clamp(Time / StartEaseDuration, 0, 1)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Time", + ">", + "Duration - StopEaseDuration" ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetNumberVariable" }, - "comment": "Keep shaking forever (if desired)" - }, + "parameters": [ + "EaseFactor", + "=", + "clamp((Duration - Time) / StopEaseDuration, 0, 1)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "Layers", + "valueIteratorVariableName": "Layer", + "keyIteratorVariableName": "LayerName", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Layer.Shakable", + "True", + "" + ] + } + ], + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { + "conditions": [], + "actions": [ + { "type": { - "value": "GlobalVariableAsBoolean" + "value": "SetStringVariable" }, "parameters": [ - "__CameraShake_ShakeForever", - "True" + "ActualLayerName", + "=", + "LayerName" ] } - ], - "actions": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ModVarGlobal" + "value": "StringVariable" }, "parameters": [ - "__CameraShake_Duration", + "LayerName", "=", - "100" + "\"__BaseLayer\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "ResetTimer" + "value": "SetStringVariable" }, "parameters": [ - "", - "\"__CameraShake_DurationTimer\"" + "ActualLayerName", + "=", + "\"\"" ] } ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Calculate movement of the shake", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use user defined default values when there is no layer specific value set." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CameraShake::SetFrequency" + }, + "parameters": [ + "", + "DefaultFrequency", + "\"\"", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeX", + "=", + "DefaultAmplitudeX" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeY", + "=", + "DefaultAmplitudeY" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeAngle", + "=", + "DefaultAmplitudeAngle" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeZoom", + "=", + "DefaultAmplitudeZoom" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaX", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaY", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaAngle", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaZoom", + "=", + "0" + ] + } + ], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"Frequency\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CameraShake::SetFrequency" + }, + "parameters": [ + "", + "Layer.Frequency", + "\"\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"AmplitudeX\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeX", + "=", + "Layer.AmplitudeX" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"AmplitudeY\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeY", + "=", + "Layer.AmplitudeY" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"AmplitudeAngle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeAngle", + "=", + "Layer.AmplitudeAngle" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists2" + }, + "parameters": [ + "Layer", + "\"AmplitudeZoom\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AmplitudeZoom", + "=", + "Layer.AmplitudeZoom" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -37242,1778 +37014,2962 @@ "textG": 0, "textR": 0 }, - "comment": "Run once before every shake movement" + "comment": "Shake the layer camera.\nSave the camera displacement to revert it in onScenePostEvents." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "NumberVariable" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_InitialShake", - "=", - "1" - ] - }, - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "GlobalVariable(__CameraShake_TimeBetweenShakes)", - "\"__CameraShake_ShakeTimer\"" - ] - } + "parameters": [ + "AmplitudeX", + "!=", + "0" ] } ], "actions": [ { "type": { - "value": "ResetTimer" + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaX", + "=", + "CameraShake::Noise2d(\"\", TimeFromStart(), 1000) * AmplitudeX * EaseFactor" + ] + }, + { + "type": { + "value": "SetCameraCenterX" }, "parameters": [ "", - "\"__CameraShake_ShakeTimer\"" + "+", + "Layers[LayerName].CameraDeltaX", + "ActualLayerName", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AmplitudeY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaY", + "=", + "CameraShake::Noise2d(\"\", TimeFromStart(), 2000) * AmplitudeY * EaseFactor" ] }, { "type": { - "value": "ModVarGlobal" + "value": "SetCameraCenterY" }, "parameters": [ - "__CameraShake_ShakeCounter", + "", "+", - "1" + "Layers[LayerName].CameraDeltaY", + "ActualLayerName", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AmplitudeAngle", + "!=", + "0" ] } ], - "events": [ + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "folded": true, - "name": "Correct for drift and reset drift tracking variables", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move to correct any drift from previous shake" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerAngle", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "RotateCamera" - }, - "parameters": [ - "", - "-", - "GlobalVariable(__CameraShake_AngleTravelled)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerZoom", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ZoomCamera" - }, - "parameters": [ - "", - "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - GlobalVariable(__CameraShake_ZoomTravelled)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SetCameraX" - }, - "parameters": [ - "Object", - "-", - "GlobalVariable(__CameraShake_DisplacementTravelledX)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - }, - { - "type": { - "value": "SetCameraY" - }, - "parameters": [ - "Object", - "-", - "GlobalVariable(__CameraShake_DisplacementTravelledY)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset drift detection variables" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledX", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledY", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_AngleTravelled", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ZoomTravelled", - "=", - "0" - ] - } - ] - } - ], - "parameters": [] + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].CameraDeltaAngle", + "=", + "CameraShake::Noise2d(\"\", TimeFromStart(), 3000) * AmplitudeAngle * EaseFactor" + ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetCameraAngle" + }, + "parameters": [ + "", + "+", + "Layers[LayerName].CameraDeltaAngle", + "ActualLayerName", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "AmplitudeZoom", + "!=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" }, - "comment": "Calculate Position Shake" + "parameters": [ + "Layers[LayerName].CameraDeltaZoom", + "=", + "pow(AmplitudeZoom, CameraShake::Noise2d(\"\", TimeFromStart(), 4000) * EaseFactor)" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_InitialShake", - "=", - "1" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementX", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerX)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementY", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerY)" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "After initial shake pick a random direction" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_InitialShake", - "=", - "0" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementX", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerX) * RandomWithStep(-1, 1, 2)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementY", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerY) * RandomWithStep(-1, 1, 2)" - ] - } - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Calculate Rotation (angle) shake " - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerAngle", - "!=", - "0" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Every \"even\" shake, rotate counter-clockwise" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "DisplacementAngle = ((DesiredDuration - RunningTimer) / DesiredDuration) * Amplitude" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementAngle", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerAngle)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Every \"odd\" shake, rotate clockwise (this includes the initial shake and can be used for a one shake effect)" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "DisplacementAngle = -1 * ((DesiredDuration - RunningTimer) / DesiredDuration) * Amplitude" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementAngle", - "=", - "-1 * (GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerAngle)" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Calculate Zoom shake" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerZoom", - "!=", - "0" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Calculate camera zoom displacement, with linear decay over time" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "ZoomDisplacement = ((DesiredDuration - RunningTimer) / DesiredDuration) * Amplitude * 1/100" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Every even shake, increase zoom" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementZoom", - "=", - "-1 * (GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerZoom) * (1/100)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Every \"odd\" shake, decrease scale" - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "ZoomDisplacement = -1 * ((DesiredDuration - RunningTimer) / DesiredDuration) * Amplitude * 1/100" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "mod(GlobalVariable(__CameraShake_ShakeCounter),2)", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementZoom", - "=", - "(GlobalVariable(__CameraShake_Duration) - TimerElapsedTime(\"__CameraShake_DurationTimer\")) / GlobalVariable(__CameraShake_Duration) * GlobalVariable(__CameraShake_PowerZoom) * (1/100)" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "ZoomCamera" }, - "comment": "Save that initial shake has been processed" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_InitialShake", - "=", - "0" - ] - } + "parameters": [ + "", + "CameraZoom(ActualLayerName, 0) * Layers[LayerName].CameraDeltaZoom", + "ActualLayerName", + "0" ] } ] } - ], - "parameters": [] + ] + } + ] + } + ], + "variables": [ + { + "folded": true, + "name": "AmplitudeX", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "AmplitudeY", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "AmplitudeAngle", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "AmplitudeZoom", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "EaseFactor", + "type": "number", + "value": 1 + }, + { + "folded": true, + "name": "ActualLayerName", + "type": "string", + "value": "" + } + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Revert the shaking." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraShake::IsShaking" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "Layers", + "valueIteratorVariableName": "Layer", + "keyIteratorVariableName": "LayerName", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Layer.Shakable", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraDeltaX", + "=", + "Layer.CameraDeltaX" + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Move camera", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraDeltaY", + "=", + "Layer.CameraDeltaY" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraDeltaAngle", + "=", + "Layer.CameraDeltaAngle" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CameraDeltaZoom", + "=", + "Layer.CameraDeltaZoom" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ActualLayerName", + "=", + "LayerName" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" }, - "comment": "Calculate the fraction of shake that occured during this frame" - }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__CameraShake_PercentTimeElapsedThisFrame", - "=", - "min(1,TimeDelta()/GlobalVariable(__CameraShake_TimeBetweenShakes))" - ] - } + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ActualLayerName", + "=", + "\"\"" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "NumberVariable" }, - "comment": "Increase change for the first half of the shake (move away from original values)" - }, + "parameters": [ + "CameraDeltaX", + "!=", + "0" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Timer" - }, - "parameters": [ - "", - "GlobalVariable(__CameraShake_TimeBetweenShakes)/2", - "\"__CameraShake_ShakeTimer\"" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change position" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "CameraX" - }, - "parameters": [ - "", - "-", - "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - }, - { - "type": { - "value": "CameraY" - }, - "parameters": [ - "", - "-", - "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save movement to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledX", - "-", - "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledY", - "-", - "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change angle" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "GlobalVariable(__CameraShake_PowerAngle)", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "RotateCamera" - }, - "parameters": [ - "", - "+", - "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024", - "", - "" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save movement to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_AngleTravelled", - "+", - "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change zoom" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "GlobalVariable(__CameraShake_PowerZoom)", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ZoomCamera" - }, - "parameters": [ - "", - "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) + round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save movement to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ZoomTravelled", - "+", - "round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - } - ] - } - ] - } + "type": { + "value": "SetCameraCenterX" + }, + "parameters": [ + "", + "-", + "CameraDeltaX", + "ActualLayerName", + "0" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "NumberVariable" }, - "comment": "Decrease change the second half of the shake (return to original position)" - }, + "parameters": [ + "CameraDeltaY", + "!=", + "0" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "GlobalVariable(__CameraShake_TimeBetweenShakes)/2", - "\"__CameraShake_ShakeTimer\"" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change position" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "CameraX" - }, - "parameters": [ - "", - "+", - "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - }, - { - "type": { - "value": "CameraY" - }, - "parameters": [ - "", - "+", - "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save the amount of change to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledX", - "+", - "round(1024 * GlobalVariable(__CameraShake_DisplacementX) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledY", - "+", - "round(1024 * GlobalVariable(__CameraShake_DisplacementY) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change angle" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "GlobalVariable(__CameraShake_PowerAngle)", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "RotateCamera" - }, - "parameters": [ - "", - "-", - "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024", - "", - "" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save the amount of change to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_AngleTravelled", - "-", - "round(1024 * (GlobalVariable(__CameraShake_DisplacementAngle) * Variable(__CameraShake_PercentTimeElapsedThisFrame))) / 1024" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change zoom" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "GlobalVariable(__CameraShake_PowerZoom)", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ZoomCamera" - }, - "parameters": [ - "", - "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Save the amount of change to calculate drift" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ZoomTravelled", - "-", - "round(1024 * GlobalVariable(__CameraShake_DisplacementZoom) * Variable(__CameraShake_PercentTimeElapsedThisFrame)) / 1024" - ] - } - ] - } - ] - } + "type": { + "value": "SetCameraCenterY" + }, + "parameters": [ + "", + "-", + "CameraDeltaY", + "ActualLayerName", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CameraDeltaAngle", + "!=", + "0" ] } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetCameraAngle" + }, + "parameters": [ + "", + "-", + "CameraDeltaAngle", + "ActualLayerName", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CameraDeltaZoom", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "CameraZoom(ActualLayerName) / CameraDeltaZoom", + "ActualLayerName", + "0" + ] + } + ] } ] } ], - "parameters": [] + "variables": [ + { + "folded": true, + "name": "ActualLayerName", + "type": "string", + "value": "" + }, + { + "folded": true, + "name": "CameraDeltaX", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "CameraDeltaY", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "CameraDeltaAngle", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "CameraDeltaZoom", + "type": "number", + "value": 0 + } + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Shake the camera on layers chosen with configuration actions.", + "fullName": "Shake camera", + "functionType": "Action", + "name": "ShakeCamera", + "sentence": "Shake camera for _PARAM1_ seconds with _PARAM2_ seconds of easing to start and _PARAM3_ seconds to stop", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Time", + "=", + "0" + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Stop shaking", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "NewDuration" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StartEaseDuration", + "=", + "NewStartEaseDuration" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StopEaseDuration", + "=", + "NewStopEaseDuration" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Duration", + "<", + "StartEaseDuration + StopEaseDuration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StartEaseDuration", + "=", + "StartEaseDuration * Duration / (StartEaseDuration + StopEaseDuration)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StopEaseDuration", + "=", + "StopEaseDuration * Duration / (StartEaseDuration + StopEaseDuration)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Duration (in seconds)", + "name": "NewDuration", + "type": "expression" + }, + { + "description": "Ease duration to start (in seconds)", + "name": "NewStartEaseDuration", + "type": "expression" + }, + { + "description": "Ease duration to stop (in seconds)", + "name": "NewStopEaseDuration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Shake the camera on the specified layer, using one or more ways to shake (position, angle, zoom). This action is deprecated. Please use the other one with the same name.", + "fullName": "Shake camera (deprecated)", + "functionType": "Action", + "name": "CameraShake", + "private": true, + "sentence": "Shake camera on _PARAM3_ layer for _PARAM5_ seconds. Use an amplitude of _PARAM1_px on X axis and _PARAM2_px on Y axis, angle rotation amplitude _PARAM6_ degrees, and zoom amplitude _PARAM7_ percent. Wait _PARAM8_ seconds between shakes. Keep shaking until stopped: _PARAM9_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Camera Shake", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "ClearVariableChildren" + }, + "parameters": [ + "Layers" + ] + }, + { + "type": { + "value": "CameraShake::SetLayerShakable" + }, + "parameters": [ + "", + "", + "NewLayer", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Time", + "=", + "0" + ] + }, + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Layer", + "=", + "NewLayer" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "NewDuration" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StartEaseDuration", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StopEaseDuration", + "=", + "NewDuration" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeX", + "=", + "abs(AmplitudeX)" + ] + }, + { + "type": { + "value": "SetNumberVariable" }, - "comment": "Stop shaking when the duration has been reached or if stop shaking has been requested" + "parameters": [ + "DefaultAmplitudeY", + "=", + "abs(AmplitudeY)" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeAngle", + "=", + "AmplitudeAngle" + ] }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeZoom", + "=", + "1 + AmplitudeZoom / 100" + ] + } + ], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "BuiltinCommonInstructions::CompareNumbers" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "GlobalVariable(__CameraShake_Duration)", - "\"__CameraShake_DurationTimer\"" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_ShakeInProgress", - "=", - "-1" - ] - } + "parameters": [ + "ShakePeriod", + "!=", + "0" ] - }, + } + ], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::Once" + "value": "SetNumberVariable" }, - "parameters": [] + "parameters": [ + "DefaultFrequency", + "=", + "1 / ShakePeriod" + ] } - ], - "actions": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ModVarGlobal" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "__CameraShake_ShakeInProgress", + "ShakePeriod", "=", "0" ] } ], - "events": [ + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Correct for drift and reset drift tracking variables", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move to correct drift from previous shake" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerAngle", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "RotateCamera" - }, - "parameters": [ - "", - "-", - "GlobalVariable(__CameraShake_AngleTravelled)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerZoom", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ZoomCamera" - }, - "parameters": [ - "", - "CameraZoom(GlobalVariableString(__CameraShake_Layer),GlobalVariable(__CameraShake_Camera)) - GlobalVariable(__CameraShake_ZoomTravelled)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarGlobal" - }, - "parameters": [ - "__CameraShake_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SetCameraX" - }, - "parameters": [ - "Object", - "-", - "GlobalVariable(__CameraShake_DisplacementTravelledX)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - }, - { - "type": { - "value": "SetCameraY" - }, - "parameters": [ - "Object", - "-", - "GlobalVariable(__CameraShake_DisplacementTravelledY)", - "GlobalVariableString(__CameraShake_Layer)", - "GlobalVariable(__CameraShake_Camera)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset drift detection variables" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledX", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_DisplacementTravelledY", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_AngleTravelled", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ZoomTravelled", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "__CameraShake_ShakeCounter", - "=", - "0" - ] - } - ] - } - ], - "parameters": [] + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultFrequency", + "=", + "1 / 0.08" + ] } ] } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Determine if the shake should keep going until stopped" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShakeForever", + "True", + "" + ] + } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "1234567890" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add default values if none were provided" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "NewDuration", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "0.5" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Amplitude of shaking on the X axis (in pixels)", + "name": "AmplitudeX", + "type": "expression" + }, + { + "description": "Amplitude of shaking on the Y axis (in pixels)", + "name": "AmplitudeY", + "type": "expression" + }, + { + "description": "Layer (base layer if empty)", + "name": "NewLayer", + "type": "layer" + }, + { + "description": "Camera index (Default: 0)", + "name": "Camera", + "type": "expression" + }, + { + "description": "Duration (in seconds) (Default: 0.5)", + "name": "NewDuration", + "type": "expression" + }, + { + "description": "Angle rotation amplitude (in degrees) (For example: 2)", + "name": "AmplitudeAngle", + "type": "expression" + }, + { + "description": "Zoom factor amplitude", + "name": "AmplitudeZoom", + "type": "expression" + }, + { + "description": "Period between shakes (in seconds) (Default: 0.08)", + "name": "ShakePeriod", + "type": "expression" + }, + { + "description": "Keep shaking until stopped", + "longDescription": "Duration value will be ignored", + "name": "ShakeForever", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Start shaking the camera indefinitely.", + "fullName": "Start camera shaking", + "functionType": "Action", + "name": "StartShaking", + "sentence": "Start shaking the camera with _PARAM1_ seconds of easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Time", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "1234567890" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StartEaseDuration", + "=", + "EaseDuration" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Ease duration (in seconds)", + "name": "EaseDuration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Stop shaking the camera.", + "fullName": "Stop camera shaking", + "functionType": "Action", + "name": "StopShaking", + "sentence": "Stop shaking the camera with _PARAM1_ seconds of easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Time", + "=", + "0" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Duration", + "=", + "EaseDuration" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "StopEaseDuration", + "=", + "EaseDuration" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Ease duration (in seconds)", + "name": "EaseDuration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Mark a layer as shakable.", + "fullName": "Shakable layer", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetLayerShakable", + "sentence": "Mark the layer: _PARAM2_ as shakable: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "NewLayerName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "NewLayerName", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "Shakable", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "Layers[LayerName].Shakable", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Shakable", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "Layers[LayerName].Shakable", + "True", + "" + ] + } + ] + } + ], + "parameters": [ + { + "defaultValue": "yes", + "description": "Shakable", + "name": "Shakable", + "optional": true, + "type": "yesorno" + }, + { + "description": "Layer", + "name": "NewLayerName", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the camera is shaking.", + "fullName": "Camera is shaking", + "functionType": "Condition", + "name": "IsShaking", + "sentence": "Camera is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Time", + "<", + "Duration" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Change the translation amplitude of the shaking (in pixels).", + "fullName": "Layer translation amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetLayerTranslationAmplitude", + "sentence": "Change the translation amplitude of the shaking to _PARAM1_; _PARAM2_ (layer: _PARAM3_)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "NewLayerName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "NewLayerName", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].AmplitudeX", + "=", + "AmplitudeX" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].AmplitudeY", + "=", + "AmplitudeY" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Amplitude of shaking on the X axis (in pixels)", + "name": "AmplitudeX", + "type": "expression" + }, + { + "description": "Amplitude of shaking on the Y axis (in pixels)", + "name": "AmplitudeY", + "type": "expression" + }, + { + "description": "Layer", + "name": "NewLayerName", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Change the rotation amplitude of the shaking (in degrees).", + "fullName": "Layer rotation amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetLayerRotationAmplitude", + "sentence": "Change the rotation amplitude of the shaking to _PARAM1_ degrees (layer: _PARAM2_)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "NewLayerName" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "NewLayerName", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].AmplitudeAngle", + "=", + "AmplitudeAngle" + ] } - ], - "parameters": [] + ] + } + ], + "parameters": [ + { + "description": "Angle (in degree)", + "name": "AmplitudeAngle", + "type": "expression" + }, + { + "description": "NewLayerName", + "name": "NewLayerName", + "type": "layer" } ], - "parameters": [], "objectGroups": [] }, { - "description": "Check if camera is shaking.", - "fullName": "Check if camera is shaking", - "functionType": "Condition", - "name": "IsShaking", - "sentence": " Camera is shaking", + "description": "Change the zoom factor amplitude of the shaking. The shaking will zoom and unzoom by this factor (for instance 1.0625 is a valid value).", + "fullName": "Layer zoom amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetLayerZoomAmplitude", + "sentence": "Change the zoom factor amplitude of the shaking to _PARAM1_ (layer: _PARAM2_)", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "NewLayerName" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarGlobal" + "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "__CameraShake_ShakeInProgress", + "NewLayerName", "=", - "1" + "\"\"" ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetStringVariable" }, "parameters": [ - "True" + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].AmplitudeZoom", + "=", + "AmplitudeZoom" ] } ] } ], - "parameters": [], + "parameters": [ + { + "description": "Zoom factor", + "name": "AmplitudeZoom", + "type": "expression" + }, + { + "description": "NewLayerName", + "name": "NewLayerName", + "type": "layer" + } + ], "objectGroups": [] }, { - "description": "Stop shaking the camera.", - "fullName": "Stop shaking the camera", + "description": "Change the number of back and forth per seconds.", + "fullName": "Layer shaking frequency", "functionType": "Action", - "name": "StopShaking", - "sentence": "Stop shaking the camera", + "group": "Camera shake configuration", + "name": "SetLayerShakingFrequency", + "sentence": "Change the shaking frequency to _PARAM1_ (layer: _PARAM2_)", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "NewLayerName" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "CameraShake::IsShaking" + "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ - "", - "" + "NewLayerName", + "=", + "\"\"" ] } ], "actions": [ { "type": { - "value": "ModVarGlobal" + "value": "SetStringVariable" + }, + "parameters": [ + "LayerName", + "=", + "\"__BaseLayer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Layers[LayerName].Frequency", + "=", + "Frequency" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Frequency", + "name": "Frequency", + "type": "expression" + }, + { + "description": "NewLayerName", + "name": "NewLayerName", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Change the default translation amplitude of the shaking (in pixels).", + "fullName": "Default translation amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetDefaultTranslationAmplitude", + "sentence": "Change the default translation amplitude of the shaking to _PARAM1_; _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeX", + "=", + "AmplitudeX" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeY", + "=", + "AmplitudeY" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Amplitude of shaking on the X axis (in pixels)", + "name": "AmplitudeX", + "type": "expression" + }, + { + "description": "Amplitude of shaking on the Y axis (in pixels)", + "name": "AmplitudeY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the default rotation amplitude of the shaking (in degrees).", + "fullName": "Default rotation amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetDefaultRotationAmplitude", + "sentence": "Change the default rotation amplitude of the shaking to _PARAM1_ degrees", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeAngle", + "=", + "AmplitudeAngle" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle (in degree)", + "name": "AmplitudeAngle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the default zoom factor amplitude of the shaking. The shaking will zoom and unzoom by this factor (for instance 1.0625 is a valid value).", + "fullName": "Default zoom amplitude", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetDefaultZoomAmplitude", + "sentence": "Change the default zoom factor amplitude of the shaking to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DefaultAmplitudeZoom", + "=", + "AmplitudeZoom" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Zoom factor", + "name": "AmplitudeZoom", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the default number of back and forth per seconds.", + "fullName": "Default shaking frequency", + "functionType": "Action", + "group": "Camera shake configuration", + "name": "SetDefaultShakingFrequency", + "sentence": "Change the default shaking frequency to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" }, "parameters": [ - "__CameraShake_ShakeInProgress", + "DefaultFrequency", "=", - "-1" + "Frequency" ] } ] } ], + "parameters": [ + { + "description": "Frequency", + "name": "Frequency", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "if (gdjs._cameraShakeExtension) {", + " return;", + "}", + "", + "/** Noise generator manager. */", + "class NoiseManager {", + " /**", + " * Create the manager of noise generators.", + " */", + " constructor() {", + " this.seed = gdjs.randomInRange(1, Number.MAX_SAFE_INTEGER);", + " /** @type {Map} */", + " this.generators = new Map();", + " }", + "", + " /**", + " * @param name {string}", + " * @return {NoiseGenerator}", + " */", + " getGenerator(name) {", + " let generator = this.generators.get(name);", + " if (!generator) {", + " generator = new NoiseGenerator(name + this.seed);", + " this.generators.set(name, generator);", + " }", + " return generator;", + " }", + "", + " /**", + " * @param seed {number}", + " */", + " setSeed(seed) {", + " this.seed = seed;", + " this.generators.forEach(generator => generator.setSeed(name + this.seed));", + " }", + "", + " /**", + " * @param name {string}", + " */", + " deleteGenerator(name) {", + " this.generators.delete(name);", + " }", + "", + " /**", + " */", + " deleteAllGenerators() {", + " this.generators.clear();", + " }", + "}", + "", + "/** Noise generator with octaves. */", + "class NoiseGenerator {", + " /**", + " * Create a noise generator with a seed.", + " * @param seed {string}", + " */", + " constructor(seed) {", + " this.simplexNoise = new SimplexNoise(seed);", + " this.frequency = 1;", + " this.octaves = 1;", + " this.persistence = 0.5;", + " this.lacunarity = 2;", + " this.xLoopPeriod = 0;", + " this.yLoopPeriod = 0;", + " }", + "", + " /**", + " * @param seed {string}", + " */", + " setSeed(seed) {", + " this.simplexNoise = new SimplexNoise(seed);", + " }", + "", + " /**", + " * @param x {float}", + " * @param y {float}", + " * @param z {float} optionnal", + " * @param w {float} optionnal", + " * @return {float}", + " */", + " noise(x, y, z, w) {", + " if (this.xLoopPeriod && this.yLoopPeriod) {", + " const circleRatioX = 2 * Math.PI / this.xLoopPeriod;", + " const circleRatioY = 2 * Math.PI / this.yLoopPeriod;", + " const angleX = circleRatioX * x;", + " const angleY = circleRatioY * y;", + " x = Math.cos(angleX) / circleRatioX;", + " y = Math.sin(angleX) / circleRatioX;", + " z = Math.cos(angleY) / circleRatioY;", + " w = Math.sin(angleY) / circleRatioY;", + " }", + " else if (this.xLoopPeriod) {", + " const circleRatio = 2 * Math.PI / this.xLoopPeriod;", + " const angleX = circleRatio * x;", + " w = z;", + " z = y;", + " x = Math.cos(angleX) / circleRatio;", + " y = Math.sin(angleX) / circleRatio;", + " }", + " else if (this.yLoopPeriod) {", + " const circleRatio = 2 * Math.PI / this.xLoopPeriod;", + " const angleX = circleRatio * x;", + " w = z;", + " // Make the circle perimeter equals to the looping period", + " // to keep the same perceived frequency with or without looping.", + " y = Math.cos(angleX) / circleRatio;", + " z = Math.sin(angleX) / circleRatio;", + " }", + " let noiseFunction = this.simplexNoise.noise4D.bind(this.simplexNoise);", + " if (z === undefined) {", + " noiseFunction = this.simplexNoise.noise2D.bind(this.simplexNoise);", + " }", + " else if (w === undefined) {", + " noiseFunction = this.simplexNoise.noise3D.bind(this.simplexNoise);", + " }", + " let frequency = this.frequency;", + " let noiseSum = 0;", + " let amplitudeSum = 0;", + " let amplitude = 1;", + " for (let i = 0; i < this.octaves; i++) {", + " noiseSum += noiseFunction(x * frequency, y * frequency, z * frequency, w * frequency) * amplitude;", + " amplitudeSum += Math.abs(amplitude);", + " amplitude *= this.persistence;", + " frequency *= this.lacunarity;", + " }", + " return noiseSum / amplitudeSum;", + " }", + "}", + "", + "/*", + "A fast javascript implementation of simplex noise by Jonas Wagner", + "https://github.com/jwagner/simplex-noise.js", + "", + "Based on a speed-improved simplex noise algorithm for 2D, 3D and 4D in Java.", + "Which is based on example code by Stefan Gustavson (stegu@itn.liu.se).", + "With Optimisations by Peter Eastman (peastman@drizzle.stanford.edu).", + "Better rank ordering method by Stefan Gustavson in 2012.", + "", + " Copyright (c) 2021 Jonas Wagner", + "", + " Permission is hereby granted, free of charge, to any person obtaining a copy", + " of this software and associated documentation files (the \"Software\"), to deal", + " in the Software without restriction, including without limitation the rights", + " to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", + " copies of the Software, and to permit persons to whom the Software is", + " furnished to do so, subject to the following conditions:", + "", + " The above copyright notice and this permission notice shall be included in all", + " copies or substantial portions of the Software.", + "", + " THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", + " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", + " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", + " OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", + " SOFTWARE.", + " */", + "", + "const F2 = 0.5 * (Math.sqrt(3.0) - 1.0);", + "const G2 = (3.0 - Math.sqrt(3.0)) / 6.0;", + "const F3 = 1.0 / 3.0;", + "const G3 = 1.0 / 6.0;", + "const F4 = (Math.sqrt(5.0) - 1.0) / 4.0;", + "const G4 = (5.0 - Math.sqrt(5.0)) / 20.0;", + "const grad3 = new Float32Array([1, 1, 0,", + " -1, 1, 0,", + " 1, -1, 0,", + " -1, -1, 0,", + " 1, 0, 1,", + " -1, 0, 1,", + " 1, 0, -1,", + " -1, 0, -1,", + " 0, 1, 1,", + " 0, -1, 1,", + " 0, 1, -1,", + " 0, -1, -1]);", + "const grad4 = new Float32Array([0, 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1,", + " 0, -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1,", + " 1, 0, 1, 1, 1, 0, 1, -1, 1, 0, -1, 1, 1, 0, -1, -1,", + " -1, 0, 1, 1, -1, 0, 1, -1, -1, 0, -1, 1, -1, 0, -1, -1,", + " 1, 1, 0, 1, 1, 1, 0, -1, 1, -1, 0, 1, 1, -1, 0, -1,", + " -1, 1, 0, 1, -1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, -1,", + " 1, 1, 1, 0, 1, 1, -1, 0, 1, -1, 1, 0, 1, -1, -1, 0,", + " -1, 1, 1, 0, -1, 1, -1, 0, -1, -1, 1, 0, -1, -1, -1, 0]);", + "", + "", + "/**", + " * Builds a random permutation table.", + " * This is exported only for (internal) testing purposes.", + " * Do not rely on this export.", + " * @param {() => number} random", + " * @private", + " */", + "function buildPermutationTable(random) {", + " const p = new Uint8Array(256);", + " for (let i = 0; i < 256; i++) {", + " p[i] = i;", + " }", + " for (let i = 0; i < 255; i++) {", + " const r = i + ~~(random() * (256 - i));", + " const aux = p[i];", + " p[i] = p[r];", + " p[r] = aux;", + " }", + " return p;", + "}", + "", + "/*", + "The ALEA PRNG and masher code used by simplex-noise.js", + "is based on code by Johannes Baagøe, modified by Jonas Wagner.", + "See alea.md for the full license.", + "@param {string|number} seed", + "*/", + "function alea(seed) {", + " let s0 = 0;", + " let s1 = 0;", + " let s2 = 0;", + " let c = 1;", + " const mash = masher();", + " s0 = mash(' ');", + " s1 = mash(' ');", + " s2 = mash(' ');", + " s0 -= mash(seed);", + " if (s0 < 0) {", + " s0 += 1;", + " }", + " s1 -= mash(seed);", + " if (s1 < 0) {", + " s1 += 1;", + " }", + " s2 -= mash(seed);", + " if (s2 < 0) {", + " s2 += 1;", + " }", + " return function () {", + " const t = 2091639 * s0 + c * 2.3283064365386963e-10; // 2^-32", + " s0 = s1;", + " s1 = s2;", + " return s2 = t - (c = t | 0);", + " };", + "}", + "", + "function masher() {", + " let n = 0xefc8249d;", + " return function (data) {", + " data = data.toString();", + " for (let i = 0; i < data.length; i++) {", + " n += data.charCodeAt(i);", + " let h = 0.02519603282416938 * n;", + " n = h >>> 0;", + " h -= n;", + " h *= n;", + " n = h >>> 0;", + " h -= n;", + " n += h * 0x100000000; // 2^32", + " }", + " return (n >>> 0) * 2.3283064365386963e-10; // 2^-32", + " };", + "}", + "", + "/** Deterministic simplex noise generator suitable for 2D, 3D and 4D spaces. */", + "class SimplexNoise {", + " /**", + " * Creates a new `SimplexNoise` instance.", + " * This involves some setup. You can save a few cpu cycles by reusing the same instance.", + " * @param {(() => number)|string|number} randomOrSeed A random number generator or a seed (string|number).", + " * Defaults to Math.random (random irreproducible initialization).", + " */", + " constructor(randomOrSeed) {", + " if (randomOrSeed === void 0) { randomOrSeed = Math.random; }", + " const random = typeof randomOrSeed == 'function' ? randomOrSeed : alea(randomOrSeed);", + " this.p = buildPermutationTable(random);", + " this.perm = new Uint8Array(512);", + " this.permMod12 = new Uint8Array(512);", + " for (let i = 0; i < 512; i++) {", + " this.perm[i] = this.p[i & 255];", + " this.permMod12[i] = this.perm[i] % 12;", + " }", + " }", + "", + " /**", + " * Samples the noise field in 2 dimensions", + " * @param {number} x", + " * @param {number} y", + " * @returns a number in the interval [-1, 1]", + " */", + " noise2D(x, y) {", + " const permMod12 = this.permMod12;", + " const perm = this.perm;", + " let n0 = 0; // Noise contributions from the three corners", + " let n1 = 0;", + " let n2 = 0;", + " // Skew the input space to determine which simplex cell we're in", + " const s = (x + y) * F2; // Hairy factor for 2D", + " const i = Math.floor(x + s);", + " const j = Math.floor(y + s);", + " const t = (i + j) * G2;", + " const X0 = i - t; // Unskew the cell origin back to (x,y) space", + " const Y0 = j - t;", + " const x0 = x - X0; // The x,y distances from the cell origin", + " const y0 = y - Y0;", + " // For the 2D case, the simplex shape is an equilateral triangle.", + " // Determine which simplex we are in.", + " let i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords", + " if (x0 > y0) {", + " i1 = 1;", + " j1 = 0;", + " } // lower triangle, XY order: (0,0)->(1,0)->(1,1)", + " else {", + " i1 = 0;", + " j1 = 1;", + " } // upper triangle, YX order: (0,0)->(0,1)->(1,1)", + " // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and", + " // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where", + " // c = (3-sqrt(3))/6", + " const x1 = x0 - i1 + G2; // Offsets for middle corner in (x,y) unskewed coords", + " const y1 = y0 - j1 + G2;", + " const x2 = x0 - 1.0 + 2.0 * G2; // Offsets for last corner in (x,y) unskewed coords", + " const y2 = y0 - 1.0 + 2.0 * G2;", + " // Work out the hashed gradient indices of the three simplex corners", + " const ii = i & 255;", + " const jj = j & 255;", + " // Calculate the contribution from the three corners", + " let t0 = 0.5 - x0 * x0 - y0 * y0;", + " if (t0 >= 0) {", + " const gi0 = permMod12[ii + perm[jj]] * 3;", + " t0 *= t0;", + " n0 = t0 * t0 * (grad3[gi0] * x0 + grad3[gi0 + 1] * y0); // (x,y) of grad3 used for 2D gradient", + " }", + " let t1 = 0.5 - x1 * x1 - y1 * y1;", + " if (t1 >= 0) {", + " const gi1 = permMod12[ii + i1 + perm[jj + j1]] * 3;", + " t1 *= t1;", + " n1 = t1 * t1 * (grad3[gi1] * x1 + grad3[gi1 + 1] * y1);", + " }", + " let t2 = 0.5 - x2 * x2 - y2 * y2;", + " if (t2 >= 0) {", + " const gi2 = permMod12[ii + 1 + perm[jj + 1]] * 3;", + " t2 *= t2;", + " n2 = t2 * t2 * (grad3[gi2] * x2 + grad3[gi2 + 1] * y2);", + " }", + " // Add contributions from each corner to get the final noise value.", + " // The result is scaled to return values in the interval [-1,1].", + " return 70.0 * (n0 + n1 + n2);", + " }", + "", + " /**", + " * Samples the noise field in 3 dimensions", + " * @param {number} x", + " * @param {number} y", + " * @param {number} z", + " * @returns a number in the interval [-1, 1]", + " */", + " noise3D(x, y, z) {", + " const permMod12 = this.permMod12;", + " const perm = this.perm;", + " let n0, n1, n2, n3; // Noise contributions from the four corners", + " // Skew the input space to determine which simplex cell we're in", + " const s = (x + y + z) * F3; // Very nice and simple skew factor for 3D", + " const i = Math.floor(x + s);", + " const j = Math.floor(y + s);", + " const k = Math.floor(z + s);", + " const t = (i + j + k) * G3;", + " const X0 = i - t; // Unskew the cell origin back to (x,y,z) space", + " const Y0 = j - t;", + " const Z0 = k - t;", + " const x0 = x - X0; // The x,y,z distances from the cell origin", + " const y0 = y - Y0;", + " const z0 = z - Z0;", + " // For the 3D case, the simplex shape is a slightly irregular tetrahedron.", + " // Determine which simplex we are in.", + " let i1, j1, k1; // Offsets for second corner of simplex in (i,j,k) coords", + " let i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords", + " if (x0 >= y0) {", + " if (y0 >= z0) {", + " i1 = 1;", + " j1 = 0;", + " k1 = 0;", + " i2 = 1;", + " j2 = 1;", + " k2 = 0;", + " } // X Y Z order", + " else if (x0 >= z0) {", + " i1 = 1;", + " j1 = 0;", + " k1 = 0;", + " i2 = 1;", + " j2 = 0;", + " k2 = 1;", + " } // X Z Y order", + " else {", + " i1 = 0;", + " j1 = 0;", + " k1 = 1;", + " i2 = 1;", + " j2 = 0;", + " k2 = 1;", + " } // Z X Y order", + " }", + " else { // x0 y0)", + " rankx++;", + " else", + " ranky++;", + " if (x0 > z0)", + " rankx++;", + " else", + " rankz++;", + " if (x0 > w0)", + " rankx++;", + " else", + " rankw++;", + " if (y0 > z0)", + " ranky++;", + " else", + " rankz++;", + " if (y0 > w0)", + " ranky++;", + " else", + " rankw++;", + " if (z0 > w0)", + " rankz++;", + " else", + " rankw++;", + " // simplex[c] is a 4-vector with the numbers 0, 1, 2 and 3 in some order.", + " // Many values of c will never occur, since e.g. x>y>z>w makes x= 3 ? 1 : 0;", + " const j1 = ranky >= 3 ? 1 : 0;", + " const k1 = rankz >= 3 ? 1 : 0;", + " const l1 = rankw >= 3 ? 1 : 0;", + " // The integer offsets for the third simplex corner", + " const i2 = rankx >= 2 ? 1 : 0;", + " const j2 = ranky >= 2 ? 1 : 0;", + " const k2 = rankz >= 2 ? 1 : 0;", + " const l2 = rankw >= 2 ? 1 : 0;", + " // The integer offsets for the fourth simplex corner", + " const i3 = rankx >= 1 ? 1 : 0;", + " const j3 = ranky >= 1 ? 1 : 0;", + " const k3 = rankz >= 1 ? 1 : 0;", + " const l3 = rankw >= 1 ? 1 : 0;", + " // The fifth corner has all coordinate offsets = 1, so no need to compute that.", + " const x1 = x0 - i1 + G4; // Offsets for second corner in (x,y,z,w) coords", + " const y1 = y0 - j1 + G4;", + " const z1 = z0 - k1 + G4;", + " const w1 = w0 - l1 + G4;", + " const x2 = x0 - i2 + 2.0 * G4; // Offsets for third corner in (x,y,z,w) coords", + " const y2 = y0 - j2 + 2.0 * G4;", + " const z2 = z0 - k2 + 2.0 * G4;", + " const w2 = w0 - l2 + 2.0 * G4;", + " const x3 = x0 - i3 + 3.0 * G4; // Offsets for fourth corner in (x,y,z,w) coords", + " const y3 = y0 - j3 + 3.0 * G4;", + " const z3 = z0 - k3 + 3.0 * G4;", + " const w3 = w0 - l3 + 3.0 * G4;", + " const x4 = x0 - 1.0 + 4.0 * G4; // Offsets for last corner in (x,y,z,w) coords", + " const y4 = y0 - 1.0 + 4.0 * G4;", + " const z4 = z0 - 1.0 + 4.0 * G4;", + " const w4 = w0 - 1.0 + 4.0 * G4;", + " // Work out the hashed gradient indices of the five simplex corners", + " const ii = i & 255;", + " const jj = j & 255;", + " const kk = k & 255;", + " const ll = l & 255;", + " // Calculate the contribution from the five corners", + " let t0 = 0.6 - x0 * x0 - y0 * y0 - z0 * z0 - w0 * w0;", + " if (t0 < 0)", + " n0 = 0.0;", + " else {", + " const gi0 = (perm[ii + perm[jj + perm[kk + perm[ll]]]] % 32) * 4;", + " t0 *= t0;", + " n0 = t0 * t0 * (grad4[gi0] * x0 + grad4[gi0 + 1] * y0 + grad4[gi0 + 2] * z0 + grad4[gi0 + 3] * w0);", + " }", + " let t1 = 0.6 - x1 * x1 - y1 * y1 - z1 * z1 - w1 * w1;", + " if (t1 < 0)", + " n1 = 0.0;", + " else {", + " const gi1 = (perm[ii + i1 + perm[jj + j1 + perm[kk + k1 + perm[ll + l1]]]] % 32) * 4;", + " t1 *= t1;", + " n1 = t1 * t1 * (grad4[gi1] * x1 + grad4[gi1 + 1] * y1 + grad4[gi1 + 2] * z1 + grad4[gi1 + 3] * w1);", + " }", + " let t2 = 0.6 - x2 * x2 - y2 * y2 - z2 * z2 - w2 * w2;", + " if (t2 < 0)", + " n2 = 0.0;", + " else {", + " const gi2 = (perm[ii + i2 + perm[jj + j2 + perm[kk + k2 + perm[ll + l2]]]] % 32) * 4;", + " t2 *= t2;", + " n2 = t2 * t2 * (grad4[gi2] * x2 + grad4[gi2 + 1] * y2 + grad4[gi2 + 2] * z2 + grad4[gi2 + 3] * w2);", + " }", + " let t3 = 0.6 - x3 * x3 - y3 * y3 - z3 * z3 - w3 * w3;", + " if (t3 < 0)", + " n3 = 0.0;", + " else {", + " const gi3 = (perm[ii + i3 + perm[jj + j3 + perm[kk + k3 + perm[ll + l3]]]] % 32) * 4;", + " t3 *= t3;", + " n3 = t3 * t3 * (grad4[gi3] * x3 + grad4[gi3 + 1] * y3 + grad4[gi3 + 2] * z3 + grad4[gi3 + 3] * w3);", + " }", + " let t4 = 0.6 - x4 * x4 - y4 * y4 - z4 * z4 - w4 * w4;", + " if (t4 < 0)", + " n4 = 0.0;", + " else {", + " const gi4 = (perm[ii + 1 + perm[jj + 1 + perm[kk + 1 + perm[ll + 1]]]] % 32) * 4;", + " t4 *= t4;", + " n4 = t4 * t4 * (grad4[gi4] * x4 + grad4[gi4 + 1] * y4 + grad4[gi4 + 2] * z4 + grad4[gi4 + 3] * w4);", + " }", + " // Sum up and scale the result to cover the range [-1,1]", + " return 27.0 * (n0 + n1 + n2 + n3 + n4);", + " };", + "}", + "", + "gdjs._cameraShakeExtension = {", + " noiseManager: new NoiseManager(),", + "};", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Generate a number from 2 dimensional simplex noise.", + "fullName": "2D noise", + "functionType": "Expression", + "name": "Noise2d", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "const x = eventsFunctionContext.getArgument(\"X\");\r", + "const y = eventsFunctionContext.getArgument(\"Y\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).noise(x, y);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + }, + { + "description": "X coordinate", + "name": "X", + "type": "expression" + }, + { + "description": "Y coordinate", + "name": "Y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate a number from 3 dimensional simplex noise.", + "fullName": "3D noise", + "functionType": "Expression", + "name": "Noise3d", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "const x = eventsFunctionContext.getArgument(\"X\");\r", + "const y = eventsFunctionContext.getArgument(\"Y\");\r", + "const z = eventsFunctionContext.getArgument(\"Z\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).noise(x, y, z);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + }, + { + "description": "X coordinate", + "name": "X", + "type": "expression" + }, + { + "description": "Y coordinate", + "name": "Y", + "type": "expression" + }, + { + "description": "Z coordinate", + "name": "Z", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate a number from 4 dimensional simplex noise.", + "fullName": "4D noise", + "functionType": "Expression", + "name": "Noise4d", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "const x = eventsFunctionContext.getArgument(\"X\");\r", + "const y = eventsFunctionContext.getArgument(\"Y\");\r", + "const z = eventsFunctionContext.getArgument(\"Z\");\r", + "const w = eventsFunctionContext.getArgument(\"W\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).noise(x, y, z, w);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + }, + { + "description": "X coordinate", + "name": "X", + "type": "expression" + }, + { + "description": "Y coordinate", + "name": "Y", + "type": "expression" + }, + { + "description": "Z coordinate", + "name": "Z", + "type": "expression" + }, + { + "description": "W coordinate", + "name": "W", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Create a noise generator with default settings (frequency = 1, octaves = 1, persistence = 0.5, lacunarity = 2).", + "fullName": "Create a noise generator", + "functionType": "Action", + "name": "Create", + "private": true, + "sentence": "Create a noise generator named _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Delete a noise generator and loose its settings.", + "fullName": "Delete a noise generator", + "functionType": "Action", + "name": "Delete", + "private": true, + "sentence": "Delete _PARAM1_ noise generator", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.deleteGenerator(name);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Delete all noise generators and loose their settings.", + "fullName": "Delete all noise generators", + "functionType": "Action", + "name": "DeleteAll", + "private": true, + "sentence": "Delete all noise generators", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "gdjs._cameraShakeExtension.noiseManager.deleteAllGenerators();", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "The seed is a number used to generate the random noise. Setting the same seed will result in the same random noise generation. It's for example useful to generate the same world, by saving this seed value and reusing it later to generate again a world.", + "fullName": "Noise seed", + "functionType": "Action", + "name": "SetSeed", + "private": true, + "sentence": "Change the noise seed to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "gdjs._cameraShakeExtension.noiseManager.setSeed(eventsFunctionContext.getArgument(\"Seed\"));", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Seed", + "longDescription": "15 digits numbers maximum", + "name": "Seed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the looping period on X used for noise generation. The noise will wrap-around on X.", + "fullName": "Noise looping period on X", + "functionType": "Action", + "name": "SetLoopPeriodX", + "private": true, + "sentence": "Change the looping period on X of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).xLoopPeriod = eventsFunctionContext.getArgument(\"LoopPeriod\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Looping period on X", + "name": "LoopPeriod", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change the looping period on Y used for noise generation. The noise will wrap-around on Y.", + "fullName": "Noise looping period on Y", + "functionType": "Action", + "name": "SetLoopPeriodY", + "private": true, + "sentence": "Change the looping period on Y of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).yLoopPeriod = eventsFunctionContext.getArgument(\"LoopPeriod\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Looping period on Y", + "name": "LoopPeriod", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change the base frequency used for noise generation. A lower frequency will zoom in the noise.", + "fullName": "Noise base frequency", + "functionType": "Action", + "name": "SetFrequency", + "private": true, + "sentence": "Change the noise frequency of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).frequency = eventsFunctionContext.getArgument(\"Frequency\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Frequency", + "name": "Frequency", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change the number of octaves used for noise generation. It can be seen as layers of noise with different zoom.", + "fullName": "Noise octaves", + "functionType": "Action", + "name": "SetOctaves", + "private": true, + "sentence": "Change the number of noise octaves of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).octaves = eventsFunctionContext.getArgument(\"Octaves\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Octaves", + "name": "Octaves", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change the persistence used for noise generation. At its default value \"0.5\", it halves the noise amplitude at each octave.", + "fullName": "Noise persistence", + "functionType": "Action", + "name": "SetPersistence", + "private": true, + "sentence": "Change the noise persistence of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).persistence = eventsFunctionContext.getArgument(\"Persistence\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Persistence", + "name": "Persistence", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change the lacunarity used for noise generation. At its default value \"2\", it doubles the frequency at each octave.", + "fullName": "Noise lacunarity", + "functionType": "Action", + "name": "SetLacunarity", + "private": true, + "sentence": "Change the noise lacunarity of _PARAM2_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "gdjs._cameraShakeExtension.noiseManager.getGenerator(name).lacunarity = eventsFunctionContext.getArgument(\"Lacunarity\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Lacunarity", + "name": "Lacunarity", + "type": "expression" + }, + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "The seed used for noise generation.", + "fullName": "Noise seed", + "functionType": "Expression", + "name": "Seed", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.seed;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, "parameters": [], "objectGroups": [] + }, + { + "description": "The base frequency used for noise generation.", + "fullName": "Noise base frequency", + "functionType": "Expression", + "name": "Frequency", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).frequency;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "The number of octaves used for noise generation.", + "fullName": "Noise octaves number", + "functionType": "Expression", + "name": "Octaves", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).octaves;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "The persistence used for noise generation.", + "fullName": "Noise persistence", + "functionType": "Expression", + "name": "Persistence", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).persistence;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "The lacunarity used for noise generation.", + "fullName": "Noise lacunarity", + "functionType": "Expression", + "name": "Lacunarity", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const name = eventsFunctionContext.getArgument(\"Name\");\r", + "\r", + "eventsFunctionContext.returnValue = gdjs._cameraShakeExtension.noiseManager.getGenerator(name).lacunarity;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Generator name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] } ], "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/firing-patterns/firing-patterns.json b/examples/firing-patterns/firing-patterns.json index 3b6ea4306..8d1b4e9e2 100644 --- a/examples/firing-patterns/firing-patterns.json +++ b/examples/firing-patterns/firing-patterns.json @@ -1,13 +1,15 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "landscape", "packageName": "com.example.gamename", @@ -16,7 +18,6 @@ "scaleMode": "nearest", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Firing Patterns", "description": "Show how to fire bullets with different patterns.", @@ -55,7 +56,9 @@ "D8H" ], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -67,7 +70,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Background 1.png", "kind": "image", "metadata": "", @@ -80,7 +82,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Ship 4.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -89,7 +90,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Projectile 1.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -98,7 +98,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Yellow Button_Hovered.png", "kind": "image", "metadata": "", @@ -111,7 +110,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Yellow Button_Idle.png", "kind": "image", "metadata": "", @@ -124,7 +122,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Yellow Button_Pressed.png", "kind": "image", "metadata": "", @@ -136,10 +133,12 @@ "name": "Yellow Button_Pressed.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -158,13 +157,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.9296874999999998, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -201,12 +203,13 @@ }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "depth": 64, + "height": 106, "layer": "", "name": "YellowButton", "persistentUuid": "a82d6f45-b5cc-488a-912f-eb8749775971", - "width": 0, + "width": 106, "x": 515, "y": 358, "zOrder": 1, @@ -232,9 +235,9 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "d3ff83eed21b7cc4b17a214bba10f3a52913426ce586987c3ec3e791a250740c", "name": "Background", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -273,9 +276,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "d4275ec52e2a2bf5544d5777551420db4f9663f1cea00bdc8151b307c5cfdca1", "name": "Ship", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -378,18 +381,18 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "3af1a3fd809de5edf1fd2ffd33e37229c815197717f76d4174b128fa066b011b", "name": "Projectile", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [ { - "extraBorder": 32, "name": "DestroyOutside", - "type": "DestroyOutsideBehavior::DestroyOutside" + "type": "DestroyOutsideBehavior::DestroyOutside", + "extraBorder": 32 } ], "animations": [ @@ -428,8 +431,8 @@ { "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", "name": "YellowButton", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button", "variables": [], "effects": [], "behaviors": [], @@ -439,54 +442,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 16, "TopPadding": 0, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 96, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 96 - }, - "Idle": { - "bottomMargin": 32, - "height": 96, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 96 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "➔", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 42, - "g": 87, - "r": 139 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 96, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 96 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "➔" } }, { @@ -495,7 +452,6 @@ "italic": false, "name": "NewText", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -509,9 +465,51 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Pattern", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Background" + }, + { + "objectName": "Ship" + }, + { + "objectName": "Projectile" + }, + { + "objectName": "YellowButton" + }, + { + "objectName": "NewText" + } + ] + }, "events": [ { "colorB": 228, @@ -1128,9 +1126,16 @@ "ambientLightColorB": 7719808, "ambientLightColorG": 6068784, "ambientLightColorR": 7418304, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Background", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -1139,9 +1144,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 8064376, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -1159,10 +1171,38 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, { "name": "FireBullet", "type": "FireBullet::FireBullet" }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + }, { "name": "TopDownMovement", "type": "TopDownMovementBehavior::TopDownMovementBehavior" @@ -1181,14 +1221,15 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", "shortDescription": "A button that can be customized.", - "version": "1.4.3", + "version": "2.1.1", "description": [ - "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." ], @@ -1203,8 +1244,39 @@ "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -1220,62 +1292,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -1289,496 +1326,430 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -1787,13 +1758,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -1803,50 +1773,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -1916,22 +1987,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -1966,11 +2035,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -2015,11 +2083,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -2064,11 +2131,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -2113,11 +2179,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -2139,11 +2204,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2188,11 +2252,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -2237,11 +2300,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -2290,7 +2352,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -2321,8 +2383,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -2330,14 +2390,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -2346,9 +2419,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -2356,9 +2426,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -2366,9 +2433,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -2376,9 +2440,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -2388,10 +2449,314 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -2409,8 +2774,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown.", - "comment2": "" + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -2422,7 +2786,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -2434,7 +2798,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -2442,14 +2806,24 @@ }, { "type": { - "value": "Create" + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "", "Pressed", - "0", - "0", - "" + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { @@ -2477,64 +2851,26 @@ "=", "1" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Pressed", "=", - "2" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -2573,18 +2909,47 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ "Object", + "=", + "PressedLabelOffsetY", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -2622,8 +2987,7 @@ "textG": 0, "textR": 0 }, - "comment": "Show the right background accordingly to the new state.", - "comment2": "" + "comment": "Show the right background accordingly to the new state." }, { "type": "BuiltinCommonInstructions::Standard", @@ -2647,12 +3011,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -2687,10 +3052,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -2699,7 +3064,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -2707,7 +3072,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -2718,10 +3083,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -2745,10 +3110,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -2765,10 +3131,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -2797,12 +3164,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -2842,10 +3210,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -2874,12 +3243,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -2931,12 +3301,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -2968,127 +3339,6 @@ } ], "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -3099,22 +3349,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -3336,6 +3571,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -3344,21 +3580,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -3372,54 +3600,18 @@ "type": "object" }, { - "description": "", - "name": "LabelText", + "description": "Text", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "Label.String()" - ] - } - ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", "fullName": "", - "functionType": "Expression", - "name": "CenterWithPaddingY", - "private": true, + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -3428,18 +3620,18 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -3451,12 +3643,11 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", - "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3464,107 +3655,27 @@ "actions": [ { "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, - { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" - ] - }, - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreY" + "value": "SetReturnString" }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" + "parameters": [ + "Labels.Text::Value()" + ] } ] } - ] + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { "description": "De/activate interactions with the button.", @@ -3578,10 +3689,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -3604,10 +3717,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -3681,169 +3796,445 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "PressedLabelOffsetY" }, { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "LabelOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "LeftPadding" + "objectGroups": [] }, { - "value": "0", - "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "RightPadding" + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "TopPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "BottomPadding" + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { - "value": "0.25", + "value": "0", "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "value": "", + "type": "Choice", + "label": "", + "choices": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" } ], - "effects": [], - "behaviors": [ + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "assetStoreOriginalName": "Yellow button", + "name": "Yellow button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "lineHeight": 0, + "color": "139;87;42" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true - } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 106, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 81, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -3854,6 +4245,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Fire bullets", + "gdevelopVersion": "", "helpPath": "https://gdevelop.io/game-example/fire-bullet", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", "name": "FireBullet", @@ -3910,6 +4302,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -4002,8 +4396,7 @@ "textG": 0, "textR": 0 }, - "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\".", - "comment2": "" + "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\"." }, { "type": "BuiltinCommonInstructions::Standard", @@ -4066,8 +4459,7 @@ "textG": 0, "textR": 0 }, - "comment": "Subtract 1 from ammo (if not unlimited ammo)", - "comment2": "" + "comment": "Subtract 1 from ammo (if not unlimited ammo)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4219,8 +4611,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase heat (if needed)", - "comment2": "" + "comment": "Increase heat (if needed)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4261,8 +4652,7 @@ "textG": 0, "textR": 0 }, - "comment": "Check if this caused overheat", - "comment2": "" + "comment": "Check if this caused overheat" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4387,8 +4777,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect when reload is completed", - "comment2": "" + "comment": "Detect when reload is completed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4477,8 +4866,7 @@ "textG": 0, "textR": 0 }, - "comment": "Only reload the amount of ammo available", - "comment2": "" + "comment": "Only reload the amount of ammo available" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4871,8 +5259,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move temp variable to the next angle a bullet will be sent", - "comment2": "" + "comment": "Move temp variable to the next angle a bullet will be sent" }, { "type": "BuiltinCommonInstructions::Standard", @@ -4983,8 +5370,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create bullet", - "comment2": "" + "comment": "Create bullet" }, { "type": "BuiltinCommonInstructions::Standard", @@ -5014,8 +5400,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move bullet (apply angle and bullet speed variances)", - "comment2": "" + "comment": "Move bullet (apply angle and bullet speed variances)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -5055,8 +5440,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add identifier variables (to enable advanced picking by users)", - "comment2": "" + "comment": "Add identifier variables (to enable advanced picking by users)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -5107,8 +5491,7 @@ "textG": 0, "textR": 0 }, - "comment": "Rotate newly created bullet, if needed", - "comment2": "" + "comment": "Rotate newly created bullet, if needed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -5148,8 +5531,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update statistics", - "comment2": "" + "comment": "Update statistics" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7623,8 +8005,7 @@ "textG": 0, "textR": 0 }, - "comment": "If Max Ammo is set, do not exceed the value", - "comment2": "" + "comment": "If Max Ammo is set, do not exceed the value" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8487,8 +8868,7 @@ "textG": 0, "textR": 0 }, - "comment": "Shots per reload must not be \"0\"", - "comment2": "" + "comment": "Shots per reload must not be \"0\"" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8696,18 +9076,12 @@ "unit": "Second", "label": "Firing cooldown", "description": "Objects cannot shoot while firing cooldown is active", - "group": "", - "extraInformation": [], - "hidden": false, "name": "FireCooldown" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HasJustFired" }, @@ -8718,8 +9092,6 @@ "label": "Firing arc", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], - "hidden": false, "name": "FiringArc" }, { @@ -8728,8 +9100,6 @@ "label": "Number of bullets created at once (Multi-Fire)", "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", "group": "Multi-Fire", - "extraInformation": [], - "hidden": false, "name": "BulletQuantity" }, { @@ -8739,27 +9109,18 @@ "label": "Angle variance", "description": "Make imperfect aim (Range: 0 to 180 degrees)", "group": "Firing variance", - "extraInformation": [], - "hidden": false, "name": "AngleVariance" }, { "value": "true", "type": "Boolean", "label": "Rotate bullets to match their trajectory", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "RotateBullet" }, { "value": "0", "type": "Number", "label": "Ammo quantity (current)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "AmmoQuantity" }, @@ -8769,8 +9130,6 @@ "label": "Shots per reload ", "description": "Use 0 to disable reloading", "group": "Reload", - "extraInformation": [], - "hidden": false, "name": "ShotsPerReload" }, { @@ -8780,27 +9139,19 @@ "label": "Reloading duration", "description": "Objects cannot shoot while reloading is in progress", "group": "Reload", - "extraInformation": [], - "hidden": false, "name": "ReloadDuration" }, { "value": "0", "type": "Number", "label": "Max ammo ", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, "name": "MaxAmmo" }, { "value": "0", "type": "Number", "label": "Shots before next reload", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShotsBeforeNextReload" }, @@ -8809,8 +9160,6 @@ "type": "Number", "label": "Total shots fired", "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalShotsFired" }, @@ -8818,9 +9167,6 @@ "value": "0", "type": "Number", "label": "Total bullets created", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalBulletsCreated" }, @@ -8828,19 +9174,13 @@ "value": "0", "type": "Number", "label": "Starting ammo", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, "name": "StartingAmmo" }, { "value": "0", "type": "Number", "label": "Total reloads completed", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TotalReloadsCompleted" }, @@ -8848,19 +9188,13 @@ "value": "true", "type": "Boolean", "label": "Unlimited ammo", - "description": "", "group": "Ammo", - "extraInformation": [], - "hidden": false, "name": "UnlimitedAmmo" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ReloadInProgress" }, @@ -8870,17 +9204,12 @@ "label": "Heat increase per shot (Range: 0 to 1)", "description": " Object is overheated when Heat reaches 1", "group": "Overheat", - "extraInformation": [], - "hidden": false, "name": "HeatIncreasePerShot" }, { "value": "0", "type": "Number", "label": "Heat level (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HeatLevel" }, @@ -8888,10 +9217,7 @@ "value": "true", "type": "Boolean", "label": "Reload automatically", - "description": "", "group": "Reload", - "extraInformation": [], - "hidden": false, "name": "AutomaticReloading" }, { @@ -8901,18 +9227,13 @@ "label": "Overheat duration", "description": "Object cannot shoot while overheat duration is active", "group": "Overheat", - "extraInformation": [], - "hidden": false, "name": "OverheatDuration" }, { "value": "0.1", "type": "Number", "label": "Linear cooling rate (per second)", - "description": "", "group": "Overheat", - "extraInformation": [], - "hidden": false, "name": "LinearCoolingRate" }, { @@ -8925,7 +9246,7 @@ "Linear", "Exponential" ], - "hidden": false, + "choices": [], "name": "ExponentialCoolingRate" }, { @@ -8934,7 +9255,6 @@ "label": "Layer the bullets are created on", "description": "Base layer by default", "group": "Shooting configuration", - "extraInformation": [], "hidden": true, "name": "BulletLayer" }, @@ -8942,9 +9262,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "RandomizedAngle" }, @@ -8955,8 +9272,6 @@ "label": "Bullet speed variance", "description": "Bullet speed will be adjusted by a random value within this range", "group": "Firing variance", - "extraInformation": [], - "hidden": false, "name": "BulletSpeedVariance" } ], @@ -8970,6 +9285,7 @@ "category": "", "extensionNamespace": "", "fullName": "", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "TopDownMovementWithTouch", @@ -8980,6 +9296,8 @@ "tags": [], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -9137,12 +9455,10 @@ "value": "", "type": "Behavior", "label": "Top-down movement", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], - "hidden": false, + "choices": [], "name": "TopDownMovement" }, { @@ -9150,10 +9466,6 @@ "type": "Number", "unit": "Pixel", "label": "Margin", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Margin" } ], @@ -9163,6 +9475,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/in-app-purchase/in-app-purchase.json b/examples/in-app-purchase/in-app-purchase.json index b108ebeb7..1c66dafc4 100644 --- a/examples/in-app-purchase/in-app-purchase.json +++ b/examples/in-app-purchase/in-app-purchase.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "adaptWidth", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.6", "name": "In-App Purchase example", "description": "", @@ -84,7 +83,9 @@ ], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -96,7 +97,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Coin_Spin_1.png", "kind": "image", "metadata": "", @@ -109,7 +109,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Coin_Spin_2.png", "kind": "image", "metadata": "", @@ -122,7 +121,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Coin_Spin_3.png", "kind": "image", "metadata": "", @@ -135,7 +133,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Coin_Spin_4.png", "kind": "image", "metadata": "", @@ -148,7 +145,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/NoAds-1.png", "kind": "image", "metadata": "", @@ -157,7 +153,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/NoAds-2.png", "kind": "image", "metadata": "", @@ -166,7 +161,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Premium-1.png", "kind": "image", "metadata": "", @@ -175,7 +169,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Brown Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -188,7 +181,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Brown Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -201,7 +193,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Brown Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -224,8 +215,7 @@ "name": "CantoraOne-Regular.ttf" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -249,13 +239,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.8199999999999998, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [ @@ -582,7 +575,9 @@ "text": " Premium\nsubscription", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "218;212;212" } }, @@ -623,7 +618,9 @@ "text": "Remove ads", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "218;212;212" } }, @@ -664,7 +661,9 @@ "text": "Buy coins", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "218;212;212" } }, @@ -705,7 +704,9 @@ "text": "00.00$", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 50, + "lineHeight": 0, "color": "218;212;212" } }, @@ -746,7 +747,9 @@ "text": "00.00$", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 50, + "lineHeight": 0, "color": "218;212;212" } }, @@ -787,7 +790,9 @@ "text": "00.00$", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 50, + "lineHeight": 0, "color": "218;212;212" } }, @@ -828,7 +833,9 @@ "text": "Premium: off", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 45, + "lineHeight": 0, "color": "245;166;35" } }, @@ -869,7 +876,9 @@ "text": "Ads: on", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 45, + "lineHeight": 0, "color": "245;166;35" } }, @@ -910,7 +919,9 @@ "text": "Coin: 44", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 45, + "lineHeight": 0, "color": "245;166;35" } }, @@ -1109,6 +1120,7 @@ "assetStoreId": "d7de738069817891a6c233618dc4fe00463738543c80009e9ef75684d5f6e8fd", "name": "BuyCoinButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Brown Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1118,80 +1130,15 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Buy Coins", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Buy Coins", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Buy Coins" } }, { "assetStoreId": "d7de738069817891a6c233618dc4fe00463738543c80009e9ef75684d5f6e8fd", "name": "BuySubscriptionButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Brown Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1201,80 +1148,15 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Buy Subscription", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Buy Subscription", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Buy Subscription" } }, { "assetStoreId": "d7de738069817891a6c233618dc4fe00463738543c80009e9ef75684d5f6e8fd", "name": "RemoveAdsButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Brown Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1284,80 +1166,15 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Remove Ads", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Remove Ads", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Remove Ads" } }, { "assetStoreId": "d7de738069817891a6c233618dc4fe00463738543c80009e9ef75684d5f6e8fd", "name": "UseCoinButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Brown Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1367,74 +1184,8 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Use Coins", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Use Coins", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Brown Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Use Coins" } } ], @@ -2445,6 +2196,7 @@ "ambientLightColorB": 0, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -2509,6 +2261,7 @@ "category": "Ads", "extensionNamespace": "", "fullName": "Mobile In-App Purchase (experimental)", + "gdevelopVersion": "", "helpPath": "/extensions/in-app-purchase/setup", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBkPSJNMjcsMTBINmMtMS4xLDAtMi0wLjktMi0yczAuOS0yLDItMmg0YzAuNiwwLDEtMC40LDEtMXMtMC40LTEtMS0xSDZDMy44LDQsMiw1LjgsMiw4djE2YzAsMi4yLDEuOCw0LDQsNGgyMQ0KCQljMS43LDAsMy0xLjMsMy0zVjEzQzMwLDExLjMsMjguNywxMCwyNywxMHogTTI4LDE1Ljh2Ni40Yy0wLjMtMC4xLTAuNi0wLjItMS0wLjJoLTRjLTEuNywwLTMtMS4zLTMtM3MxLjMtMywzLTNoNA0KCQlDMjcuNCwxNiwyNy43LDE1LjksMjgsMTUuOHoiLz4NCgk8cGF0aCBkPSJNNyw3QzYuNCw3LDYsNy40LDYsOHMwLjQsMSwxLDFoNGMwLDAsMCwwLDAsMHMwLDAsMCwwaDE1YzAuMywwLDAuNi0wLjIsMC44LTAuNGMwLjItMC4zLDAuMi0wLjYsMC4xLTAuOWwtMi01DQoJCWMtMC4yLTAuNS0wLjgtMC44LTEuMy0wLjZMMTAuOCw3SDd6Ii8+DQoJPHBhdGggZD0iTTI1LDE4aC0yYy0wLjYsMC0xLDAuNC0xLDFzMC40LDEsMSwxaDJjMC42LDAsMS0wLjQsMS0xUzI1LjYsMTgsMjUsMTh6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==", "name": "InAppPurchase", @@ -2851,14 +2604,15 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", "shortDescription": "A button that can be customized.", - "version": "1.4.4", + "version": "2.1.1", "description": [ - "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." ], @@ -2873,10 +2627,39 @@ "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -2892,61 +2675,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -2960,509 +2709,406 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } + ] + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "\"PressedInside\"" + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" ] } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } ] } ], - "actions": [ + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ] @@ -3473,49 +3119,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -3585,22 +3370,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -3635,11 +3418,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3684,11 +3466,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -3733,13 +3514,85 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"PressedOutside\"" ] } ], @@ -3771,24 +3624,23 @@ "objectGroups": [] }, { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"PressedInside\"" ] } ], @@ -3802,17 +3654,39 @@ ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3846,39 +3720,30 @@ "objectGroups": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "TouchId" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -3886,181 +3751,395 @@ "type": "object" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Button", + "description": "A button that can be customized.", + "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } - ], - "objectGroups": [] + ] }, { - "description": "Check if the button is currently being pressed outside with mouse or touch.", - "fullName": "Is held outside", - "functionType": "Condition", - "name": "IsPressedOutside", - "sentence": "_PARAM0_ is held outside", - "events": [ + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false } ], - "parameters": [ + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ { - "description": "Object", - "name": "Object", - "type": "object" + "name": "Idle" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "name": "Hovered" + }, + { + "name": "Pressed" } - ], - "objectGroups": [] + ] }, { - "description": "the touch id that is using the button or 0 if none.", - "fullName": "Touch id", - "functionType": "ExpressionAndCondition", - "name": "TouchId", - "sentence": "the touch id", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyTouchId()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + "name": "Labels", + "objects": [ { - "description": "Object", - "name": "Object", - "type": "object" + "name": "Label" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "name": "BitmapLabel" } - ], - "objectGroups": [] + ] } ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" - }, + "layers": [ { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } ], - "hidden": true, - "name": "State" - }, - { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" - }, - { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" - }, + "effects": [] + } + ], + "instances": [ { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", - "name": "PanelSpriteButton", + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -4090,7 +4169,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -4102,7 +4181,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -4110,14 +4189,24 @@ }, { "type": { - "value": "Create" + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "", "Pressed", - "0", - "0", - "" + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { @@ -4145,63 +4234,26 @@ "=", "1" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Pressed", "=", - "2" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -4238,17 +4290,46 @@ "name": "onHotReloading", "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "PressedLabelOffsetY", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -4313,12 +4394,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -4353,10 +4435,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -4365,7 +4447,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -4373,7 +4455,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -4384,10 +4466,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -4411,10 +4493,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -4431,10 +4514,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -4463,12 +4547,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -4508,10 +4593,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -4540,12 +4626,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -4597,12 +4684,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -4634,126 +4722,6 @@ } ], "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -4764,22 +4732,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -5001,6 +4954,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -5009,21 +4963,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -5038,17 +4984,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -5057,18 +5003,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -5080,12 +5026,11 @@ "objectGroups": [] }, { - "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", - "fullName": "", - "functionType": "Expression", - "name": "CenterWithPaddingY", - "private": true, - "sentence": "", + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5093,17 +5038,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -5116,65 +5061,35 @@ "objectGroups": [] }, { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, + "conditions": [ { "type": { - "value": "TextObject::WrappingWidth" + "value": "BooleanVariable" }, "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + "ShouldActivate", + "True", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SetCenterY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Idle", + "ButtonFSM", + "yes" ] } ] @@ -5184,10 +5099,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", + "ShouldActivate", + "True", "" ] } @@ -5195,12 +5112,12 @@ "actions": [ { "type": { - "value": "MettreY" + "value": "ActivateBehavior" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Idle", + "ButtonFSM", + "no" ] } ] @@ -5212,126 +5129,123 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - } - ], - "objectGroups": [ + }, { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" } - ] + ], + "objectGroups": [] }, { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BehaviorActivated" }, "parameters": [ - "\"ShouldActivate\"" + "Idle", + "ButtonFSM" ] } ], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnBoolean" }, "parameters": [ - "Idle", - "ButtonFSM", - "yes" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"ShouldActivate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ActivateBehavior" + "value": "SetReturnNumber" }, "parameters": [ - "Idle", - "ButtonFSM", - "no" + "LabelOffset" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" } ], "objectGroups": [] }, { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorActivated" + "value": "SetCenterY" }, "parameters": [ - "Idle", - "ButtonFSM" + "Labels", + "+", + "Value - LabelOffset" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetReturnBoolean" + "value": "SetNumberVariable" }, "parameters": [ - "True" + "LabelOffset", + "=", + "Value" ] } ] @@ -5350,198 +5264,374 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "name": "PressedLabelOffsetY" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "LeftPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "RightPadding" + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { "value": "0", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "name": "TopPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" + } ], - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "name": "HoveredFadeOutDuration" + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ + "variants": [ { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "d7de738069817891a6c233618dc4fe00463738543c80009e9ef75684d5f6e8fd", + "assetStoreOriginalName": "Brown Button With Shadow", + "name": "Brown Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Brown Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Brown Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Brown Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": "0;0;0" - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "objectsGroups": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [], - "behaviors": [ + "layers": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "instances": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "e070ac21-1a34-4e10-a4d6-8c986ee6235a", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + ], + "editionSettings": [] } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - } + ] } ] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/load-testing/load-testing.json b/examples/load-testing/load-testing.json index 78c312a0c..ed48efcc4 100644 --- a/examples/load-testing/load-testing.json +++ b/examples/load-testing/load-testing.json @@ -1,9 +1,9 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Load Testing GDevelop", "description": "Create thousands of objects to see how they impact the performance of the game.\nIn real games, consider staying under these limits:\n\nSprites:\n \nDesktop < 10,000\nDesktop (with physics collisions) < 1,000\nDesktop (with collisions) < 500\n\nMobile < 5,000\nMobile (with physics collisions) < 500\nMobile (with collisions) < 250\n\nTiled Sprites:\n\nDesktop < 1000\nDesktop (with physics collisions) < 1000\nDesktop (with collisions) < 1000\n\nMobile < 100\n\nParticles: \n\nDesktop < 15,000\nMobile < 5,000", @@ -90,6 +89,7 @@ ], "playableDevices": [ "keyboard", + "mobile", "mobile" ], "extensionProperties": [], @@ -103,7 +103,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Sprite.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -112,7 +111,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Blue Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -125,7 +123,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Blue Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -138,7 +135,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Blue Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -162,7 +158,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -175,7 +170,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -188,7 +182,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -201,7 +194,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -214,7 +206,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -227,7 +218,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -240,7 +230,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -253,7 +242,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -266,7 +254,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -279,7 +266,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Grey Button With Shadow_Hovered.png", "kind": "image", "metadata": "", @@ -292,7 +278,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Grey Button With Shadow_Idle.png", "kind": "image", "metadata": "", @@ -305,7 +290,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Grey Button With Shadow_Pressed.png", "kind": "image", "metadata": "", @@ -318,46 +302,6 @@ } }, { - "alwaysLoaded": false, - "file": "assets/Square White Slider Border.png", - "kind": "image", - "metadata": "", - "name": "Square White Slider Border.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/324e5f522f6242e9f93090e75ddc38427c3a6c42e8236dbf0ed541bd85cf7221_Square White Slider Border.png", - "name": "Square White Slider Border.png" - } - }, - { - "alwaysLoaded": false, - "file": "assets/Square White Slider Fill Bar.png", - "kind": "image", - "metadata": "", - "name": "Square White Slider Fill Bar.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/47bc684198cd25b3ec74b0e72c2e2c7abb1b6736bd9f4b78a943c663e83118bf_Square White Slider Fill Bar.png", - "name": "Square White Slider Fill Bar.png" - } - }, - { - "alwaysLoaded": false, - "file": "assets/Square White Slider Thumb.png", - "kind": "image", - "metadata": "", - "name": "Square White Slider Thumb.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/848f861767e7ce4581dba9e122ee7bafeaca57987655cebe1f78ab31d1300f0f_Square White Slider Thumb.png", - "name": "Square White Slider Thumb.png" - } - }, - { - "alwaysLoaded": false, "file": "thumbnail.png", "kind": "image", "metadata": "", @@ -366,7 +310,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_1.png", "kind": "image", "metadata": "", @@ -379,7 +322,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_10.png", "kind": "image", "metadata": "", @@ -392,7 +334,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_11.png", "kind": "image", "metadata": "", @@ -405,7 +346,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_12.png", "kind": "image", "metadata": "", @@ -418,7 +358,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_2.png", "kind": "image", "metadata": "", @@ -431,7 +370,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_3.png", "kind": "image", "metadata": "", @@ -444,7 +382,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_4.png", "kind": "image", "metadata": "", @@ -457,7 +394,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_5.png", "kind": "image", "metadata": "", @@ -470,7 +406,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_6.png", "kind": "image", "metadata": "", @@ -483,7 +418,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_7.png", "kind": "image", "metadata": "", @@ -496,7 +430,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_8.png", "kind": "image", "metadata": "", @@ -509,7 +442,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Climb_9.png", "kind": "image", "metadata": "", @@ -522,7 +454,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Fall.png", "kind": "image", "metadata": "", @@ -535,7 +466,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Idle_1.png", "kind": "image", "metadata": "", @@ -548,7 +478,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Idle_2.png", "kind": "image", "metadata": "", @@ -561,7 +490,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Idle_3.png", "kind": "image", "metadata": "", @@ -574,7 +502,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Idle_4.png", "kind": "image", "metadata": "", @@ -587,7 +514,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Jump.png", "kind": "image", "metadata": "", @@ -600,7 +526,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_1.png", "kind": "image", "metadata": "", @@ -613,7 +538,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_10.png", "kind": "image", "metadata": "", @@ -626,7 +550,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_11.png", "kind": "image", "metadata": "", @@ -639,7 +562,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_12.png", "kind": "image", "metadata": "", @@ -652,7 +574,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_13.png", "kind": "image", "metadata": "", @@ -665,7 +586,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_14.png", "kind": "image", "metadata": "", @@ -678,7 +598,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_15.png", "kind": "image", "metadata": "", @@ -691,7 +610,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_16.png", "kind": "image", "metadata": "", @@ -704,7 +622,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_17.png", "kind": "image", "metadata": "", @@ -717,7 +634,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_18.png", "kind": "image", "metadata": "", @@ -730,7 +646,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_19.png", "kind": "image", "metadata": "", @@ -743,7 +658,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_2.png", "kind": "image", "metadata": "", @@ -756,7 +670,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_3.png", "kind": "image", "metadata": "", @@ -769,7 +682,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_4.png", "kind": "image", "metadata": "", @@ -782,7 +694,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_5.png", "kind": "image", "metadata": "", @@ -795,7 +706,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_6.png", "kind": "image", "metadata": "", @@ -808,7 +718,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_7.png", "kind": "image", "metadata": "", @@ -821,7 +730,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_8.png", "kind": "image", "metadata": "", @@ -834,7 +742,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_9.png", "kind": "image", "metadata": "", @@ -847,7 +754,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Toggle_Off.png", "kind": "image", "metadata": "", @@ -860,7 +766,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Toggle_On.png", "kind": "image", "metadata": "", @@ -873,7 +778,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Sprite2.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -882,7 +786,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Sprite3.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", @@ -891,18 +794,55 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Sprite4.png", "kind": "image", "metadata": "{\"extension\":\".png\"}", "name": "Sprite4", "smoothed": true, "userAdded": true + }, + { + "file": "assets/Square White Slider Border.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Border.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/324e5f522f6242e9f93090e75ddc38427c3a6c42e8236dbf0ed541bd85cf7221_Square White Slider Border.png", + "name": "Square White Slider Border.png" + } + }, + { + "file": "assets/Square White Slider Fill Bar.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Fill Bar.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/47bc684198cd25b3ec74b0e72c2e2c7abb1b6736bd9f4b78a943c663e83118bf_Square White Slider Fill Bar.png", + "name": "Square White Slider Fill Bar.png" + } + }, + { + "file": "assets/Square White Slider Thumb.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Thumb.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/848f861767e7ce4581dba9e122ee7bafeaca57987655cebe1f78ab31d1300f0f_Square White Slider Thumb.png", + "name": "Square White Slider Thumb.png" + } } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -921,13 +861,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 0.3645833333333333, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -1000,12 +943,13 @@ }, { "angle": 0, - "customSize": false, - "height": 48, + "customSize": true, + "depth": 64, + "height": 46, "layer": "", "name": "ObjectCount_Slider", "persistentUuid": "e1b31e8e-179b-4141-b609-6b7611c95823", - "width": 1792, + "width": 1782, "x": 64, "y": 208, "zOrder": 6, @@ -1060,12 +1004,13 @@ }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "depth": 64, + "height": 46, "layer": "", "name": "SceneChange_Slider", "persistentUuid": "2e30ddf9-d599-41b6-a506-ec8ea97ad049", - "width": 0, + "width": 1782, "x": 64, "y": 832, "zOrder": 10, @@ -1094,8 +1039,8 @@ { "assetStoreId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", "name": "CreateSprites_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Blue Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1105,61 +1050,15 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Create \nSprites", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Create \nSprites" } }, { "assetStoreId": "569b45d3c7c34f7706563239938d04ca599016ff9857ee38c945c72330d4339e", "name": "CreateTiledSprites_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1169,61 +1068,15 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Create \nTiled Sprites", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Green Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Create \nTiled Sprites" } }, { "assetStoreId": "a48315b9a9c655af87118d7bb8f6be03b4dbb14e066387849b2d2d4c3600573c", "name": "CreateSomething_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Purple Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1233,61 +1086,15 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Purple Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Purple Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Unused\nButton", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Purple Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Unused\nButton" } }, { "assetStoreId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", "name": "CreateParticles_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Red Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1297,61 +1104,15 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Create \nParticles", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Red Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Create \nParticles" } }, { "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "ChangeScenes_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -1361,61 +1122,15 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Start Changing Scenes", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Start Changing Scenes" } }, { "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", "name": "ObjectCount_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square white slider", "variables": [], "effects": [], "behaviors": [], @@ -1429,60 +1144,13 @@ "MaxValue": 500000, "MinValue": 500, "StepSize": 500 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 48, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square White Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 1792 - }, - "FillBar": { - "bottomMargin": 2, - "height": 46, - "leftMargin": 10, - "rightMargin": 0, - "texture": "Square White Slider Fill Bar.png", - "tiled": false, - "topMargin": 0, - "width": 1782 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Quantity", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Thumb": { - "bottomMargin": 2, - "height": 64, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square White Slider Thumb.png", - "tiled": false, - "topMargin": 2, - "width": 32 - } } }, { "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", "name": "SceneChange_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square white slider", "variables": [], "effects": [], "behaviors": [], @@ -1496,53 +1164,6 @@ "MaxValue": 1000, "MinValue": 1, "StepSize": 1 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 48, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square White Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 1792 - }, - "FillBar": { - "bottomMargin": 2, - "height": 46, - "leftMargin": 10, - "rightMargin": 0, - "texture": "Square White Slider Fill Bar.png", - "tiled": false, - "topMargin": 0, - "width": 1782 - }, - "Label": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Quantity", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Thumb": { - "bottomMargin": 2, - "height": 64, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square White Slider Thumb.png", - "tiled": false, - "topMargin": 2, - "width": 32 - } } }, { @@ -1551,7 +1172,6 @@ "italic": false, "name": "Quantity_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1565,6 +1185,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Object Quantity", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1573,7 +1215,6 @@ "italic": false, "name": "ChangeScenes_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1587,6 +1228,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Number of Scene Changes", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1595,7 +1258,6 @@ "italic": false, "name": "TimeToDelete_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1609,9 +1271,66 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Time to return to menu:\n??? seconds", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "CreateSprites_Button" + }, + { + "objectName": "CreateTiledSprites_Button" + }, + { + "objectName": "CreateSomething_Button" + }, + { + "objectName": "CreateParticles_Button" + }, + { + "objectName": "ChangeScenes_Button" + }, + { + "objectName": "ObjectCount_Slider" + }, + { + "objectName": "SceneChange_Slider" + }, + { + "objectName": "Quantity_Text" + }, + { + "objectName": "ChangeScenes_Text" + }, + { + "objectName": "TimeToDelete_Text" + } + ] + }, "events": [ { "colorB": 228, @@ -2020,9 +1739,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -2044,7 +1765,32 @@ "effects": [] } ], - "behaviorsSharedData": [] + "behaviorsSharedData": [ + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] }, { "b": 0, @@ -2061,13 +1807,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 0.444851599888665, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -2527,7 +2276,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Sprite", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2596,7 +2344,6 @@ "italic": false, "name": "FPS_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2630,6 +2377,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "FPS: ???", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2638,7 +2407,6 @@ "italic": false, "name": "ObjectCount_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2665,6 +2433,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Objects: ???", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2673,7 +2463,6 @@ "italic": false, "name": "TimeToDisplay_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2700,6 +2489,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Time to display: ??? seconds", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2708,7 +2519,6 @@ "italic": false, "name": "TimeToDelete_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2735,6 +2545,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Time to delete: ??? seconds", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2743,7 +2575,6 @@ "italic": false, "name": "EnablePhysics_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2770,6 +2601,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Enable physics", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2778,7 +2631,6 @@ "italic": false, "name": "CheckPointInside_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2805,6 +2657,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Check if point inside", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2813,7 +2687,6 @@ "italic": false, "name": "SeparateTwoObjects_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2840,6 +2713,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Separate objects", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2848,7 +2743,6 @@ "italic": false, "name": "CollisionCheck_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2875,6 +2769,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Check collisions", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2883,7 +2799,6 @@ "italic": false, "name": "PhysicsCollisionCheck_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2910,6 +2825,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Show physics collisions", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2918,7 +2855,6 @@ "italic": false, "name": "DisablePhysicsSleep_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2945,6 +2881,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Disable physics sleeping", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2953,7 +2911,6 @@ "italic": false, "name": "ChangeColors_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2980,6 +2937,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Change colors", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2988,7 +2967,6 @@ "italic": false, "name": "MoveParticles_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -3015,6 +2993,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Move Particles", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -3023,7 +3023,6 @@ "italic": false, "name": "ForEach_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -3050,13 +3049,34 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Rotate (For Each)", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { "assetStoreId": "", "height": 6, "name": "TiledSprite", - "tags": "", "texture": "Sprite", "type": "TiledSpriteObject::TiledSprite", "width": 6, @@ -3110,6 +3130,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 27, "particleBlue2": 27, + "particleColor1": "208;2;27", + "particleColor2": "208;2;27", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 2, @@ -3125,7 +3147,6 @@ "rendererParam1": 5, "rendererParam2": 1, "rendererType": "Point", - "tags": "", "tank": -1, "textureParticleName": "", "type": "ParticleSystem::ParticleEmitter", @@ -3137,8 +3158,8 @@ { "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "GoBack_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -3148,61 +3169,15 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Go back", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Go back" } }, { "assetStoreId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", "name": "DeleteObjects_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Grey Button With Shadow", "variables": [], "effects": [], "behaviors": [], @@ -3212,70 +3187,23 @@ "PressedLabelOffsetY": 3, "BottomPadding": 32, "TopPadding": 32, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Idle": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 192 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Delete Objects", - "font": "CantoraOne-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 69, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button With Shadow_Pressed.png", - "tiled": true, - "topMargin": 16, - "width": 192 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Delete Objects" } }, { "adaptCollisionMaskAutomatically": false, "assetStoreId": "0d91b7b0a2a8562a0172b4d5e9bf3d80340f866a030aa7a5f3baf6157840f1c3", "name": "RedHero", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [ { - "checkCollisionMask": true, "name": "Draggable", - "type": "DraggableBehavior::Draggable" + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": true }, { "name": "DraggablePhysics", @@ -4710,706 +4638,201 @@ { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "EnablePhysics_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "SeparateObjects_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "CollisionCheck_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "PhysicsCollisionCheck_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "PhysicsSleep_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "CheckPointInside_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "ChangeColors_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "MoveParticles_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } }, { "assetStoreId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", "name": "ForEach_Toggle", - "tags": "", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Square White Toggle", "variables": [], "effects": [], "behaviors": [], "content": { "IsChecked": false - }, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_Off.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Square White Toggle_On.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Sprite" + }, + { + "objectName": "FPS_Text" + }, + { + "objectName": "ObjectCount_Text" + }, + { + "objectName": "TimeToDisplay_Text" + }, + { + "objectName": "TimeToDelete_Text" + }, + { + "objectName": "EnablePhysics_Text" + }, + { + "objectName": "CheckPointInside_Text" + }, + { + "objectName": "SeparateTwoObjects_Text" + }, + { + "objectName": "CollisionCheck_Text" + }, + { + "objectName": "PhysicsCollisionCheck_Text" + }, + { + "objectName": "DisablePhysicsSleep_Text" + }, + { + "objectName": "ChangeColors_Text" + }, + { + "objectName": "MoveParticles_Text" + }, + { + "objectName": "ForEach_Text" + }, + { + "objectName": "TiledSprite" + }, + { + "objectName": "ParticleEmitter" + }, + { + "objectName": "GoBack_Button" + }, + { + "objectName": "DeleteObjects_Button" + }, + { + "objectName": "RedHero" + }, + { + "objectName": "EnablePhysics_Toggle" + }, + { + "objectName": "SeparateObjects_Toggle" + }, + { + "objectName": "CollisionCheck_Toggle" + }, + { + "objectName": "PhysicsCollisionCheck_Toggle" + }, + { + "objectName": "PhysicsSleep_Toggle" + }, + { + "objectName": "CheckPointInside_Toggle" + }, + { + "objectName": "ChangeColors_Toggle" + }, + { + "objectName": "MoveParticles_Toggle" + }, + { + "objectName": "ForEach_Toggle" + } + ] + }, "events": [ { "colorB": 228, @@ -7054,9 +6477,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -7081,9 +6506,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -7095,14 +6522,30 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, { "name": "DraggablePhysics", "type": "DraggablePhysics::DraggablePhysics" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, { "name": "FPSDisplayer", "type": "FPS::FPSDisplayer" }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, { "name": "Physics2", "type": "Physics2::Physics2Behavior", @@ -7110,6 +6553,18 @@ "gravityY": 9.8, "scaleX": 100, "scaleY": 100 + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] }, @@ -7128,13 +6583,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.3645833333333333, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -7162,7 +6620,6 @@ "italic": false, "name": "SceneChangesRemaining_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -7176,9 +6633,39 @@ "b": 35, "g": 5, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Scene Changes Remaining: 000", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 100, + "lineHeight": 0, + "color": "255;5;35" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "SceneChangesRemaining_Text" + } + ] + }, "events": [ { "colorB": 228, @@ -7278,9 +6765,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -7302,7 +6791,24 @@ "effects": [] } ], - "behaviorsSharedData": [] + "behaviorsSharedData": [ + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] }, { "b": 0, @@ -7319,13 +6825,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.3645833333333333, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -7353,7 +6862,6 @@ "italic": false, "name": "SceneChangesRemaining_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -7367,9 +6875,39 @@ "b": 255, "g": 112, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Scene Changes Remaining: 000", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 100, + "lineHeight": 0, + "color": "0;112;255" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "SceneChangesRemaining_Text" + } + ] + }, "events": [ { "colorB": 228, @@ -7479,9 +7017,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -7503,7 +7043,24 @@ "effects": [] } ], - "behaviorsSharedData": [] + "behaviorsSharedData": [ + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] } ], "externalEvents": [], @@ -7513,6 +7070,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Draggable (for physics objects)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjcsMTFjMC0yLTIuMi0zLjYtNS42LTQuNEMyMC42LDMuMiwxOSwxLDE3LDFzLTMuNiwyLjItNC40LDUuNkM5LjIsNy40LDcsOSw3LDExYzAsMiwyLjIsMy42LDUuNiw0LjQNCgljMC4zLDEuMiwwLjYsMi4yLDEuMSwzLjFjMC4zLDAuNSwwLjksMC43LDEuNCwwLjRjMC41LTAuMywwLjctMC45LDAuNC0xLjRjLTAuMy0wLjUtMC41LTEuMS0wLjctMS44YzAuNywwLjEsMS41LDAuMSwyLjIsMC4xDQoJYzAuOCwwLDEuNSwwLDIuMi0wLjFjLTAuMywxLTAuNywxLjktMS4xLDIuNWMtMC4zLDAuNC0wLjIsMS4xLDAuMiwxLjRjMC4yLDAuMSwwLjQsMC4yLDAuNiwwLjJjMC4zLDAsMC42LTAuMSwwLjgtMC40DQoJYzAuNy0xLDEuMy0yLjQsMS43LTRDMjQuOCwxNC42LDI3LDEzLDI3LDExeiBNMTcsM2MwLjcsMCwxLjYsMS4yLDIuMiwzLjNjLTAuNy0wLjEtMS41LTAuMS0yLjItMC4xcy0xLjUsMC0yLjIsMC4xDQoJQzE1LjQsNC4yLDE2LjMsMywxNywzeiBNOSwxMWMwLTAuNywxLjItMS42LDMuMy0yLjJjLTAuMSwwLjctMC4xLDEuNS0wLjEsMi4yYzAsMC44LDAsMS41LDAuMSwyLjJDMTAuMiwxMi42LDksMTEuNyw5LDExeiBNMTcsMTMuOQ0KCWMtMSwwLTEuOS0wLjEtMi43LTAuMmMtMC4xLTAuOC0wLjItMS43LTAuMi0yLjdjMC0xLDAuMS0xLjksMC4yLTIuN0MxNS4xLDguMiwxNiw4LjEsMTcsOC4xczEuOSwwLjEsMi43LDAuMg0KCWMwLjEsMC44LDAuMiwxLjcsMC4yLDIuN2MwLDAuOS0wLjEsMS44LTAuMiwyLjdDMTguOSwxMy44LDE4LDEzLjksMTcsMTMuOXogTTIxLjcsMTMuMmMwLjEtMC43LDAuMS0xLjUsMC4xLTIuMg0KCWMwLTAuOCwwLTEuNS0wLjEtMi4yQzIzLjgsOS40LDI1LDEwLjMsMjUsMTFDMjUsMTEuNywyMy44LDEyLjYsMjEuNywxMy4yeiIvPg0KPHBhdGggZD0iTTI5LjksMTcuNUMyOS43LDE3LjIsMjkuNCwxNywyOSwxN2MtMi4yLDAtNC4zLDEtNS42LDIuOEwyMi41LDIxYy0xLjEsMS4zLTIuOCwyLTQuNSwyaC0zYy0wLjYsMC0xLTAuNC0xLTFzMC40LTEsMS0xaDEuOQ0KCWMxLjYsMCwzLjEtMS4zLDMuMS0yLjljMCwwLDAtMC4xLDAtMC4xYzAtMC41LTAuNS0xLTEtMWwtNi4xLDBjLTMuNiwwLTYuNSwxLjYtOC4xLDQuMmwtMi43LDQuMmMtMC4yLDAuMy0wLjIsMC43LDAsMWwzLDUNCgljMC4xLDAuMiwwLjQsMC40LDAuNiwwLjVjMC4xLDAsMC4xLDAsMC4yLDBjMC4yLDAsMC40LTAuMSwwLjYtMC4yYzMuOC0yLjUsOC4yLTMuOCwxMi43LTMuOGMzLjMsMCw2LjMtMS44LDcuOS00LjdsMi43LTQuOA0KCUMzMCwxOC4yLDMwLDE3LjgsMjkuOSwxNy41eiIvPg0KPC9zdmc+DQo=", "name": "DraggablePhysics", @@ -7548,6 +7106,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -8498,26 +8058,30 @@ "value": "", "type": "Behavior", "label": "Physics behavior", - "description": "", - "group": "", "extraInformation": [ "Physics2::Physics2Behavior" ], - "hidden": false, + "choices": [], "name": "PhysicsBehavior" }, { "value": "Left", "type": "Choice", "label": "Mouse button", - "description": "", - "group": "", - "extraInformation": [ - "Left", - "Right", - "Middle" + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + }, + { + "label": "Middle", + "value": "Middle" + } ], - "hidden": false, "name": "MouseButton" }, { @@ -8525,39 +8089,24 @@ "type": "Number", "unit": "Newton", "label": "Maximum force", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxForce" }, { "value": "10", "type": "Number", "label": "Frequency (Hz) ", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Frequency" }, { "value": "1", "type": "Number", "label": "Damping ratio (Range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Damping" }, { "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseJointID" }, @@ -8566,9 +8115,6 @@ "type": "Boolean", "label": "Enable automatic dragging", "description": "If automatic dragging is disabled, use the \"Start drag\" and \"Release drag\" actions.", - "group": "", - "extraInformation": [], - "hidden": false, "name": "EnableAutomaticDragging" } ], @@ -8582,12 +8128,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/toggle-switch", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", "name": "SpriteToggleSwitch", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.3.0", + "version": "2.0.2", "description": [ "Toggle switch that users can click or touch. The switch can be customized with sprites.", "", @@ -8608,8 +8155,39 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Toggle switches now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing toggle switches in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the switch object.", @@ -8630,12 +8208,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "WasChecked", + "False", + "" ] } ] @@ -8657,12 +8235,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "WasChecked", + "True", + "" ] } ] @@ -8684,11 +8262,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::TogglePropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "Toggle", + "" ] } ] @@ -8721,11 +8300,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] } ], @@ -8768,21 +8348,23 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -8826,20 +8408,22 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -8871,99 +8455,33 @@ "objectGroups": [] }, { - "description": "Check (or uncheck) the toggle switch.", - "fullName": "Check (or uncheck)", - "functionType": "Action", - "name": "SetChecked", - "sentence": "Check _PARAM0_: _PARAM2_", + "description": "Check if the toggle switch was toggled in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Avoid a started touch to interfere with a state change from events." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenChecked" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - } + "parameters": [ + "Object", + "Behavior", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "ButtonFSM", - "" + "True" ] } ] @@ -8973,48 +8491,170 @@ "conditions": [ { "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenUnchecked" }, "parameters": [ - "\"Value\"" + "Object", + "Behavior", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "no" + "True" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check (or uncheck) the toggle switch.", + "fullName": "Check (or uncheck)", + "functionType": "Action", + "name": "SetChecked", + "sentence": "Check _PARAM0_: _PARAM2_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "False", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsChecked", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Avoid a started touch to interfere with a state change from events." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsChecked", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } ] } ] @@ -9041,6 +8681,129 @@ } ], "objectGroups": [] + }, + { + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "Object", + "Behavior", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "PreviousIsChecked", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "Object", + "Behavior", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -9048,31 +8811,29 @@ "value": "", "type": "Behavior", "label": "Button finite state machine", - "description": "", - "group": "", "extraInformation": [ "SpriteToggleSwitch::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "false", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "IsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], + "hidden": true, + "name": "PreviousIsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", "hidden": true, "name": "WasChecked" } @@ -9093,61 +8854,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -9161,509 +8888,406 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "\"PressedInside\"" + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } ] } ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ] @@ -9674,49 +9298,188 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedInside\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedOutside\"" ] } ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ] } ], "parameters": [ @@ -9785,22 +9548,20 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -9835,11 +9596,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9884,11 +9644,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9933,11 +9692,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9982,11 +9740,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -10008,11 +9765,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10057,11 +9813,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -10106,11 +9861,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10159,7 +9913,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -10190,8 +9944,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -10199,14 +9951,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -10215,9 +9980,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -10225,9 +9987,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -10235,9 +9994,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -10245,9 +10001,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -10257,47 +10010,137 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "ToggleSwitch", "description": "A toggle switch that users can click or touch.", "fullName": "Toggle switch", + "isUsingLegacyInstancesRenderer": false, "name": "SpriteToggleSwitch", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state." + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "State", - "0", - "0", - "" - ] + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] } ] }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -10315,10 +10158,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] } ], @@ -10336,11 +10181,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -10350,11 +10196,12 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] } ], @@ -10372,10 +10219,11 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", + "PreviousIsChecked", + "False", "" ] } @@ -10443,20 +10291,21 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "False", "" ] } @@ -10474,11 +10323,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -10488,20 +10338,21 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "True", "" ] } @@ -10519,11 +10370,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "PreviousIsChecked", + "False", + "" ] } ] @@ -10700,6 +10552,49 @@ ], "objectGroups": [] }, + { + "description": "Check if the toggle switch was checked or unchecked in the current frame.", + "fullName": "Has just been toggled", + "functionType": "Condition", + "name": "HasJustBeenToggled", + "sentence": "_PARAM0_ has just been toggled", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenToggled" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Check (or uncheck) the toggle switch.", "fullName": "Check (or uncheck)", @@ -10713,10 +10608,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -10739,10 +10636,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -10778,6 +10677,40 @@ ], "objectGroups": [] }, + { + "description": "Toggle the switch.", + "fullName": "Toggle", + "functionType": "Action", + "name": "ToggleChecked", + "sentence": "Toggle _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::ToggleChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Check if the button is not used.", "fullName": "Is idle", @@ -10958,7 +10891,6 @@ "fullName": "Is pressed", "functionType": "Condition", "name": "IsPressed", - "private": true, "sentence": "_PARAM0_ is pressed", "events": [ { @@ -10997,6 +10929,49 @@ ], "objectGroups": [] }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Update the state animation.", "fullName": "Update state animation", @@ -11115,10 +11090,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -11141,10 +11118,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -11225,10 +11204,6 @@ "value": "true", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "IsChecked" }, { @@ -11236,65 +11211,170 @@ "type": "Boolean", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousIsChecked" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "State", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false - } - ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "variants": [ + { + "areaMaxX": 32, + "areaMaxY": 34, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "7f3b0673f7479b4b487bcbadbb3c8b9412a8e6d8694543f9ec3419365ebff3f5", + "assetStoreOriginalName": "Square White Toggle", + "name": "Square White Toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ + ], + "animations": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square White Toggle_Off.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square White Toggle_On.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] } ] } - ] + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -11305,6 +11385,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Color Conversion", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWludmVydC1jb2xvcnMiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsMTkuNThWMTkuNThDMTAuNCwxOS41OCA4Ljg5LDE4Ljk2IDcuNzYsMTcuODNDNi42MiwxNi42OSA2LDE1LjE5IDYsMTMuNThDNiwxMiA2LjYyLDEwLjQ3IDcuNzYsOS4zNEwxMiw1LjFNMTcuNjYsNy45M0wxMiwyLjI3VjIuMjdMNi4zNCw3LjkzQzMuMjIsMTEuMDUgMy4yMiwxNi4xMiA2LjM0LDE5LjI0QzcuOSwyMC44IDkuOTUsMjEuNTggMTIsMjEuNThDMTQuMDUsMjEuNTggMTYuMSwyMC44IDE3LjY2LDE5LjI0QzIwLjc4LDE2LjEyIDIwLjc4LDExLjA1IDE3LjY2LDcuOTNaIiAvPjwvc3ZnPg==", "name": "ColorConversion", @@ -11335,6 +11416,8 @@ "onPsboRtDkUHNOsx7OPr8R8G1oj2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Converts a hexadecimal string into a RGB string. Example input: \"0459AF\".", @@ -12319,12 +12402,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -12344,8 +12428,39 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -12370,7 +12485,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyValue()" + "CurrentValue" ] } ] @@ -12406,11 +12521,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", "0" ] @@ -12419,13 +12533,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -12435,11 +12548,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "!=", "0" ] @@ -12448,13 +12560,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -12492,7 +12603,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMinValue()" + "MinValue" ] } ] @@ -12529,13 +12640,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -12585,7 +12695,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxValue()" + "MaxValue" ] } ] @@ -12622,13 +12732,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -12718,7 +12827,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyStepSize()" + "StepSize" ] } ] @@ -12755,13 +12864,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -12800,40 +12908,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Value" + "name": "CurrentValue" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -12853,61 +12945,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -12921,509 +12979,406 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "\"PressedInside\"" + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } ] } ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ] @@ -13434,49 +13389,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedInside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedOutside\"" ] } ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ] } ], "parameters": [ @@ -13506,22 +13600,20 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -13556,11 +13648,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -13605,11 +13696,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -13654,11 +13744,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -13703,11 +13792,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -13729,11 +13817,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -13778,11 +13865,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -13827,11 +13913,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -13880,7 +13965,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -13911,8 +13996,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -13920,14 +14003,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -13936,9 +14032,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -13946,9 +14039,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -13956,9 +14046,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -13966,9 +14053,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -13978,125 +14062,382 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" - }, - "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" - ] - } - ] - }, + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create the child-object instances." + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {}, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" }, "parameters": [ "", - "Background", - "0", - "0", "" ] - }, + } + ], + "actions": [ { "type": { - "value": "Create" + "value": "ActivateBehavior" + }, + "parameters": [ + "Thumb", + "Draggable", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ActivateBehavior" }, "parameters": [ - "", "FillBar", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, "parameters": [ - "", "Thumb", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Background", + "BarLeftPlusRightMargin", "=", - "1" + "Object.Width() - FillBar.Width()" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "FillBar", + "BarTopPlusBottomMargin", "=", - "2" + "Object.Height() - FillBar.Height()" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Thumb", + "PreviousInitialValue", "=", - "3" + "InitialValue" ] } ] @@ -14129,25 +14470,6 @@ "" ] }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Label", - "=", - "4" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "no" - ] - }, { "type": { "value": "Cache" @@ -14190,7 +14512,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -14250,15 +14572,6 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" @@ -14275,24 +14588,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -14302,7 +14615,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -14326,104 +14639,322 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Background", - "ButtonFSM" - ] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" + "value": "BehaviorActivated" }, "parameters": [ - "Thumb", - "Draggable" + "Background", + "ButtonFSM" ] - }, + } + ], + "actions": [], + "events": [ { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" - }, - "parameters": [ - "Thumb", - "Draggable" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } ] }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "value": "DraggableBehavior::Dragged" }, "parameters": [ - "Background", - "ButtonFSM", - "" + "Thumb", + "Draggable" ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, "parameters": [ - "Background", - "ButtonFSM", - "" + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } ] } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" }, "parameters": [ - "Object" + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" ] } ], @@ -14447,368 +14978,84 @@ ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "CompareObjectTimer" }, "parameters": [ - "Object" + "Label", + "\"HideBack\"", + ">", + "0.5" ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" }, "parameters": [ "Label", - "" + "\"HideBack\"" ] } ] } ] - }, + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the slider is being dragged.", + "fullName": "Being dragged", + "functionType": "Condition", + "group": "Slider", + "name": "IsBeingDragged", + "sentence": "_PARAM0_ is being dragged", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": [ - "Object" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Label", - "" - ] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Label" - ] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the slider is being dragged.", - "fullName": "Being dragged", - "functionType": "Condition", - "group": "Slider", - "name": "IsBeingDragged", - "sentence": "_PARAM0_ is being dragged", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" + "type": { + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" ] }, { @@ -14910,7 +15157,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -14997,16 +15244,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -15093,16 +15331,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -15189,7 +15418,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -15225,10 +15454,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabelAtChanges", + "True", + "" ] } ], @@ -15268,21 +15499,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "ShowLabelAtChanges", + "False", + "" ] }, { @@ -15300,21 +15534,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShowLabelAtChanges", + "True", + "" ] }, { @@ -15344,53 +15581,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -15423,10 +15613,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -15444,7 +15635,7 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { @@ -15465,10 +15656,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -15490,12 +15682,12 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, "parameters": [ "Label", @@ -15518,76 +15710,6 @@ ], "objectGroups": [] }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.PropertyBarLeftPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "fullName": "", "functionType": "Expression", @@ -15604,7 +15726,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -15654,9 +15776,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -15666,7 +15787,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -15677,7 +15798,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -15706,10 +15827,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -15742,10 +15865,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -15844,112 +15969,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -15957,8 +16069,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -15967,10 +16077,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -15979,10 +16089,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "FillBar" ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -15991,131 +16101,312 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Label" ], + "choices": [], "hidden": true, "name": "ShowLabel" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" + } + ], + "variants": [ + { + "areaMaxX": 265, + "areaMaxY": 28, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", + "assetStoreOriginalName": "Square white slider", + "name": "Square white slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 + "assetStoreId": "", + "bottomMargin": 2, + "height": 36, + "leftMargin": 1, + "name": "Thumb", + "rightMargin": 2, + "texture": "Square White Slider Thumb.png", + "tiled": false, + "topMargin": 2, + "type": "PanelSpriteObject::PanelSprite", + "width": 22, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 2, + "height": 16, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "Square White Slider Fill Bar.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 16, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 4, + "height": 28, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square White Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 265, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] } - ] - } - ] - } - ] - }, - { - "author": "", - "category": "User interface", - "extensionNamespace": "", - "fullName": "Panel sprite button", - "helpPath": "/objects/button", + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 16, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 253, + "x": 6, + "y": 6, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 248, + "y": -4, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {} + } + ] + } + ] + }, + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Panel sprite button", + "gdevelopVersion": ">=5.5.230", + "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", "shortDescription": "A button that can be customized.", - "version": "1.4.4", + "version": "2.1.1", "description": [ - "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." ], @@ -16130,8 +16421,39 @@ "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -16147,61 +16469,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -16215,562 +16503,598 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], - "actions": [ + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + ], + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } ] }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "HasTouchEnded" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "", + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "\"Validated\"" + "0" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "events": [ { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } ] }, { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] } ] } - ] + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -16840,22 +17164,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -16890,11 +17212,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -16939,11 +17260,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -16988,11 +17308,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -17037,11 +17356,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -17063,11 +17381,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -17112,11 +17429,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -17161,11 +17477,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -17214,7 +17529,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -17245,8 +17560,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -17254,14 +17567,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -17270,9 +17596,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -17280,9 +17603,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -17290,9 +17610,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -17300,9 +17617,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -17312,45 +17626,337 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." - }, + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Idle", - "0", - "0", - "" - ] - }, + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { "value": "Create" @@ -17377,58 +17983,40 @@ }, { "type": { - "value": "Cache" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "Hovered" + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { "type": { - "value": "Cache" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "Pressed" + "Pressed", + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { "type": { - "value": "ChangePlan" + "value": "Cache" }, "parameters": [ - "Hovered", - "=", - "1" + "Hovered" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "Create" + "value": "Cache" }, "parameters": [ - "", - "Label", - "0", - "0", - "" + "Pressed" ] }, { @@ -17436,27 +18024,30 @@ "value": "ChangePlan" }, "parameters": [ - "Label", + "Hovered", "=", - "2" + "1" ] }, { "type": { - "value": "TextObject::SetWrapping" + "value": "ChangePlan" }, "parameters": [ - "Label", - "yes" + "Pressed", + "=", + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -17495,18 +18086,47 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ "Object", + "=", + "PressedLabelOffsetY", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -17568,12 +18188,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -17608,10 +18229,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -17620,7 +18241,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -17628,7 +18249,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -17639,10 +18260,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -17666,10 +18287,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -17686,10 +18308,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -17718,12 +18341,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -17763,10 +18387,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -17795,12 +18420,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -17852,12 +18478,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -17889,126 +18516,6 @@ } ], "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -18019,22 +18526,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -18256,6 +18748,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -18264,21 +18757,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -18293,17 +18778,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -18312,18 +18797,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -18335,12 +18820,11 @@ "objectGroups": [] }, { - "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", - "fullName": "", - "functionType": "Expression", - "name": "CenterWithPaddingY", - "private": true, - "sentence": "", + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -18348,17 +18832,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -18370,122 +18854,6 @@ ], "objectGroups": [] }, - { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", - "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, - { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" - ] - }, - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] - }, { "description": "De/activate interactions with the button.", "fullName": "De/activate interactions", @@ -18498,10 +18866,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -18524,10 +18894,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -18601,169 +18973,1718 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ + }, { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "PressedLabelOffsetY" + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "LabelOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } ], - "hidden": false, - "name": "LeftPadding" + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "RightPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "TopPadding" + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { "value": "0", "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "BottomPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "HoveredFadeOutDuration" + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" + } + ], + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } + "variants": [ + { + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "33302f0b615672a2e96316c096e13ad8d7242adba8bd5709538691894f0eae6e", + "assetStoreOriginalName": "Blue Button With Shadow", + "name": "Blue Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Blue Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "ac76ffd4-0cc6-4581-b73c-f840b4eda2c1", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "569b45d3c7c34f7706563239938d04ca599016ff9857ee38c945c72330d4339e", + "assetStoreOriginalName": "Green Button With Shadow", + "name": "Green Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Green Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Green Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Green Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [], - "behaviors": [ + "layers": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "0fc63b9b-9e62-48c4-a3fa-576380a64e67", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] + }, + { + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", + "assetStoreOriginalName": "Red Button With Shadow", + "name": "Red Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Red Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Red Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Red Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "1a9eba11-e70c-4a1a-88b8-ed6f52e3d4dc", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "9cf9ca8be6e98fc23e76b6770d3f4d094dea09f30a49f38ef9a9d2e97c2460be", + "assetStoreOriginalName": "Grey Button With Shadow", + "name": "Grey Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Grey Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Grey Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Grey Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 59, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "f71aea9c-9a88-4ed6-a790-fcd132952d5f", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + "areaMaxX": 192, + "areaMaxY": 69, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "a48315b9a9c655af87118d7bb8f6be03b4dbb14e066387849b2d2d4c3600573c", + "assetStoreOriginalName": "Purple Button With Shadow", + "name": "Purple Button With Shadow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "BUTTON", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Purple Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Purple Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Purple Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 192, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "0e01d24f-cdb7-49dc-887c-3aa618d13841", + "width": 188, + "x": 2, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -18774,6 +20695,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Frames per second (FPS)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMzAsM2gtMkg0SDJDMS40LDMsMSwzLjQsMSw0czAuNCwxLDEsMWgxdjE2YzAsMC42LDAuNCwxLDEsMWg5LjhsLTUuNSw2LjNjLTAuNCwwLjQtMC4zLDEsMC4xLDEuNEM4LjUsMjkuOSw4LjgsMzAsOSwzMA0KCWMwLjMsMCwwLjYtMC4xLDAuOC0wLjNsNS4yLTZWMjhjMCwwLjYsMC40LDEsMSwxczEtMC40LDEtMXYtNC4zbDUuMiw2YzAuMiwwLjIsMC41LDAuMywwLjgsMC4zYzAuMiwwLDAuNS0wLjEsMC43LTAuMg0KCWMwLjQtMC40LDAuNS0xLDAuMS0xLjRMMTguMiwyMkgyOGMwLjYsMCwxLTAuNCwxLTFWNWgxYzAuNiwwLDEtMC40LDEtMVMzMC42LDMsMzAsM3ogTTI0LjgsOC42bC00LDZjLTAuMywwLjQtMC44LDAuNi0xLjMsMC4zDQoJTDE1LjgsMTNoLTMuNGwtMy43LDMuN0M4LjUsMTYuOSw4LjMsMTcsOCwxN3MtMC41LTAuMS0wLjctMC4zYy0wLjQtMC40LTAuNC0xLDAtMS40bDQtNGMwLjItMC4yLDAuNC0wLjMsMC43LTAuM2g0DQoJYzAuMiwwLDAuMywwLDAuNCwwLjFsMy4yLDEuNmwzLjUtNS4zYzAuMy0wLjUsMC45LTAuNiwxLjQtMC4zQzI1LDcuNSwyNS4xLDguMSwyNC44LDguNnoiLz4NCjwvc3ZnPg0K", "name": "FPS", @@ -18805,6 +20727,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "fullName": "", @@ -19188,10 +21112,6 @@ "value": "FPS: ", "type": "String", "label": "The prefix before the FPS count", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "prefix" }, { @@ -19199,10 +21119,6 @@ "type": "Number", "unit": "Dimensionless", "label": "Number of decimal digits to display", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "DecimalDigits" } ], @@ -19216,6 +21132,7 @@ "category": "General", "extensionNamespace": "", "fullName": "Repeat every X seconds", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJlcGVhdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNywxN0g3VjE0TDMsMThMNywyMlYxOUgxOVYxM0gxN003LDdIMTdWMTBMMjEsNkwxNywyVjVINVYxMUg3VjdaIiAvPjwvc3ZnPg==", "name": "RepeatEveryXSeconds", @@ -19238,6 +21155,8 @@ "IRIhkkTTl2UHhfjrLTTH5GYwkYu1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Triggers every X seconds.", @@ -19714,39 +21633,24 @@ "value": "MyTimer", "type": "String", "label": "The name of the timer to repeat", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TimerName" }, { "value": "1", "type": "Number", "label": "The time between each trigger (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TimerLength" }, { "value": "-1", "type": "Number", "label": "How many times should the timer trigger? -1 for forever.", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Limit" }, { "value": "0", "type": "Number", "label": "An internal counter", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Counter" } @@ -19761,6 +21665,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Create multiple copies of an object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdyaWQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAsNFY4SDE0VjRIMTBNMTYsNFY4SDIwVjRIMTZNMTYsMTBWMTRIMjBWMTBIMTZNMTYsMTZWMjBIMjBWMTZIMTZNMTQsMjBWMTZIMTBWMjBIMTRNOCwyMFYxNkg0VjIwSDhNOCwxNFYxMEg0VjE0SDhNOCw4VjRINFY4SDhNMTAsMTRIMTRWMTBIMTBWMTRNNCwySDIwQTIsMiAwIDAsMSAyMiw0VjIwQTIsMiAwIDAsMSAyMCwyMkg0QzIuOTIsMjIgMiwyMS4xIDIsMjBWNEEyLDIgMCAwLDEgNCwyWiIgLz48L3N2Zz4=", "name": "CreateMultipleCopiesOfObject", @@ -19800,6 +21705,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Create multiple copies of an object.\nSelect the object, choose the number of rows and columns, the spacing between rows and columns, the top left starting point, the layer to create the objects on, and the z-order of the objects.", @@ -20221,6 +22128,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/marching-squares-island-generator/marching-squares-island-generator.json b/examples/marching-squares-island-generator/marching-squares-island-generator.json index dc846a610..a59d1bae4 100644 --- a/examples/marching-squares-island-generator/marching-squares-island-generator.json +++ b/examples/marching-squares-island-generator/marching-squares-island-generator.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Island Generator", "description": "", @@ -55,7 +54,9 @@ ], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -67,7 +68,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/EnableNoiseButton.png", "kind": "image", "metadata": "", @@ -76,7 +76,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/DisableNoiseButton.png", "kind": "image", "metadata": "", @@ -85,7 +84,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/RerollTerrainButton.png", "kind": "image", "metadata": "", @@ -94,7 +92,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/RerollIslandButton.png", "kind": "image", "metadata": "", @@ -103,7 +100,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/EnableConstraintButton.png", "kind": "image", "metadata": "", @@ -112,7 +108,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/DisableConstraintButton.png", "kind": "image", "metadata": "", @@ -120,8 +115,7 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -145,13 +139,16 @@ "gridType": "rectangular", "gridWidth": 48, "gridHeight": 48, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 0.6533333534240722, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -520,19 +517,19 @@ "fillOpacity": 255, "outlineSize": 0, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none", "fillColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 + "b": 0 }, "outlineColor": { - "b": 35, + "r": 245, "g": 166, - "r": 245 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": false, - "antialiasing": "none" + "b": 35 + } }, { "assetStoreId": "", @@ -558,19 +555,19 @@ "fillOpacity": 255, "outlineSize": 0, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": false, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -591,19 +588,19 @@ "fillOpacity": 255, "outlineSize": 0, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none", "fillColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 + "b": 0 }, "outlineColor": { - "b": 35, + "r": 245, "g": 166, - "r": 245 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": false, - "antialiasing": "none" + "b": 35 + } }, { "assetStoreId": "", @@ -624,19 +621,19 @@ "fillOpacity": 255, "outlineSize": 0, "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none", "fillColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 + "b": 0 }, "outlineColor": { - "b": 35, + "r": 245, "g": 166, - "r": 245 - }, - "absoluteCoordinates": true, - "clearBetweenFrames": false, - "antialiasing": "none" + "b": 35 + } }, { "adaptCollisionMaskAutomatically": false, @@ -779,7 +776,9 @@ "text": "", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -820,7 +819,9 @@ "text": "Click to evaluate the height and normal", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -861,7 +862,9 @@ "text": "There is neither noise nor island shapes.\n Press one of the first two buttons.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -869,151 +872,22 @@ "assetStoreId": "", "name": "ToogleNoiseButton", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Noise toggle", "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\DisableNoiseButton.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\EnableNoiseButton.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} }, { "assetStoreId": "", "name": "ToogleConstraintButton", + "persistentUuid": "bf12dde2-dbc3-467f-b576-365fcba821b5", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Constraint toggle", "variables": [], "effects": [], "behaviors": [], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\DisableConstraintButton.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\EnableConstraintButton.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } + "content": {} } ], "objectsFolderStructure": { @@ -1904,6 +1778,7 @@ "ambientLightColorB": 32, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -1932,6 +1807,7 @@ "ambientLightColorB": 12, "ambientLightColorG": 6023776, "ambientLightColorR": 7798800, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -1949,6 +1825,7 @@ "ambientLightColorB": 12, "ambientLightColorG": 6026736, "ambientLightColorR": 8002696, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -2006,7 +1883,6 @@ "externalEvents": [ { "associatedLayout": "IslandGenerator", - "lastChangeTimeStamp": 0, "name": "IslandPositioning", "events": [ { @@ -2179,7 +2055,6 @@ }, { "associatedLayout": "IslandGenerator", - "lastChangeTimeStamp": 0, "name": "GenerateTerrain", "events": [ { @@ -2586,12 +2461,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.1.0", + "version": "1.3.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -2620,6 +2496,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -2631,7 +2509,7 @@ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -2660,11 +2538,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -2673,11 +2550,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -2711,12 +2587,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -2726,11 +2602,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -2747,12 +2624,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -2775,12 +2652,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -2790,11 +2667,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -2805,20 +2681,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -2850,11 +2726,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -2876,31 +2751,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -2916,22 +2790,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -2942,11 +2814,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -2961,11 +2832,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -2994,20 +2864,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3016,11 +2886,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3032,20 +2901,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3054,11 +2923,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3071,20 +2939,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3093,11 +2961,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3109,20 +2976,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3131,11 +2998,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3163,18 +3029,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -3186,11 +3051,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3199,11 +3063,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -3216,11 +3079,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3228,11 +3090,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -3241,11 +3102,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3328,22 +3188,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -3378,11 +3236,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -3427,11 +3284,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -3476,11 +3332,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3525,11 +3380,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -3551,11 +3405,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3600,11 +3453,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -3649,11 +3501,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -3702,7 +3553,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -3733,8 +3584,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -3742,14 +3591,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -3758,9 +3620,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -3768,9 +3627,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -3778,9 +3634,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -3788,9 +3641,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -3820,7 +3670,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] }, @@ -3831,7 +3681,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -3842,7 +3692,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -3890,7 +3740,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "no" ] }, @@ -3901,7 +3751,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -3912,7 +3762,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -3923,11 +3773,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "!=", "\"\"" ] @@ -3951,7 +3800,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] } @@ -3962,11 +3811,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "!=", "\"\"" ] @@ -3990,7 +3838,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "yes" ] } @@ -4001,11 +3849,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "!=", "\"\"" ] @@ -4029,7 +3876,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "yes" ] } @@ -4071,7 +3918,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleEffect()" + "IdleEffect" ] } ] @@ -4108,13 +3955,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4152,7 +3998,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedEffect()" + "FocusedEffect" ] } ] @@ -4189,13 +4035,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4233,7 +4078,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedEffect()" + "PressedEffect" ] } ] @@ -4270,13 +4115,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4303,31 +4147,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -4336,16 +4176,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "PressedEffect" } ], @@ -4355,7 +4192,7 @@ "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", "name": "ButtonAnimationName", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -4375,7 +4212,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -4385,7 +4222,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4435,7 +4271,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -4463,7 +4299,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -4491,7 +4327,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -4504,7 +4340,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4533,7 +4368,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -4546,7 +4381,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4571,13 +4405,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4587,7 +4420,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4616,7 +4448,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -4629,7 +4461,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4654,13 +4485,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4670,7 +4500,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4699,7 +4528,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -4712,7 +4541,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4737,13 +4565,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -4753,7 +4580,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -4767,24 +4593,31 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "choices": [], + "name": "Animation" + }, { "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -4793,16 +4626,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PressedAnimationName" } ], @@ -4826,13 +4656,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -4883,11 +4712,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -4896,11 +4724,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -4912,7 +4739,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleValue()", + "IdleValue", "" ] } @@ -4939,11 +4766,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -4952,11 +4778,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -4968,7 +4793,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -4979,11 +4804,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -4992,11 +4816,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -5008,7 +4831,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -5031,11 +4854,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -5044,11 +4866,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -5060,7 +4881,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedValue()", + "PressedValue", "" ] } @@ -5083,11 +4904,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] @@ -5101,8 +4921,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeInDuration()", - "Object.Behavior::PropertyFadeInEasing()", + "FadeInDuration", + "FadeInEasing", "" ] } @@ -5113,11 +4933,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] @@ -5131,8 +4950,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeOutDuration()", - "Object.Behavior::PropertyFadeOutEasing()", + "FadeOutDuration", + "FadeOutEasing", "" ] } @@ -5210,46 +5029,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -5288,46 +5103,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -5365,37 +5176,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "<", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Tween::Ease(GetArgumentAsString(\"Easing\"), Object.Behavior::PropertyTweenInitialValue(), Object.Behavior::PropertyTweenTargetedValue(), Object.Behavior::PropertyTweenTime() / GetArgumentAsNumber(\"Duration\"))" + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] } ] @@ -5405,37 +5213,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", ">=", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"NoTween\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyTweenTargetedValue()" + "TweenTargetedValue" ] } ] @@ -5451,9 +5256,9 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyEffectName()", - "Object.Behavior::PropertyEffectProperty()", - "Object.Behavior::PropertyEffectValue()" + "EffectName", + "EffectProperty", + "EffectValue" ] } ] @@ -5502,7 +5307,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectName()" + "EffectName" ] } ] @@ -5543,7 +5348,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectProperty()" + "EffectProperty" ] } ] @@ -5582,24 +5387,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", - "GetArgumentAsString(\"Value\")" + "NewEffectName" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", - "GetArgumentAsString(\"Value\")" + "NewPropertyName" ] } ] @@ -5619,12 +5422,12 @@ }, { "description": "Effect name", - "name": "EffectName", + "name": "NewEffectName", "type": "string" }, { "description": "Parameter name", - "name": "PropertyName", + "name": "NewPropertyName", "type": "string" } ], @@ -5647,7 +5450,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -5684,13 +5487,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -5728,7 +5530,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedValue()" + "FocusedValue" ] } ] @@ -5765,13 +5567,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -5809,7 +5610,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedValue()" + "PressedValue" ] } ] @@ -5846,13 +5647,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -5890,7 +5690,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -5928,13 +5728,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -5972,7 +5771,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -6010,13 +5809,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -6054,7 +5852,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -6091,13 +5889,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -6135,7 +5932,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -6172,13 +5969,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -6205,31 +6001,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -6238,16 +6030,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "IdleValue" }, { @@ -6256,58 +6045,153 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -6315,42 +6199,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -6359,9 +6341,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -6369,21 +6349,26 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -6392,9 +6377,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -6402,9 +6384,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -6412,9 +6391,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -6422,12 +6398,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -6436,9 +6419,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -6449,7 +6429,7 @@ "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", "name": "ButtonScaleTween", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -6469,7 +6449,7 @@ "Object", "Scale", "=", - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -6479,7 +6459,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6521,11 +6500,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -6534,11 +6512,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -6550,7 +6527,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleScale()", + "IdleScale", "" ] } @@ -6577,11 +6554,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -6590,11 +6566,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -6606,7 +6581,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -6617,11 +6592,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -6630,11 +6604,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -6646,7 +6619,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -6669,11 +6642,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -6682,11 +6654,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -6698,7 +6669,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedScale()", + "PressedScale", "" ] } @@ -6712,7 +6683,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6743,10 +6713,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -6758,7 +6728,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6794,10 +6763,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -6809,7 +6778,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6843,7 +6811,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -6856,7 +6824,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6881,13 +6848,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -6897,7 +6863,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6926,7 +6891,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedScale()" + "FocusedScale" ] } ] @@ -6939,7 +6904,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -6964,13 +6928,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -6980,7 +6943,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7009,7 +6971,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedScale()" + "PressedScale" ] } ] @@ -7022,7 +6984,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7047,13 +7008,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -7063,7 +7023,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7092,7 +7051,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -7105,7 +7064,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7130,13 +7088,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -7146,7 +7103,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7175,7 +7131,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -7188,7 +7144,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7213,13 +7168,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -7229,7 +7183,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7258,7 +7211,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -7272,7 +7225,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7297,13 +7249,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -7313,7 +7264,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7342,7 +7292,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -7356,7 +7306,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7381,13 +7330,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -7397,7 +7345,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -7411,26 +7358,34 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "choices": [], + "name": "Scale" + }, { "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -7438,9 +7393,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -7450,7 +7403,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -7458,9 +7410,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -7468,9 +7418,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -7478,51 +7426,147 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -7530,42 +7574,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -7573,12 +7715,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -7608,7 +7757,7 @@ }, "parameters": [ "Object", - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -7660,11 +7809,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -7673,11 +7821,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -7689,7 +7836,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleColorTint()", + "IdleColorTint", "" ] } @@ -7716,11 +7863,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -7729,11 +7875,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -7745,7 +7890,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -7756,11 +7901,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -7769,11 +7913,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -7785,7 +7928,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -7808,11 +7951,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -7821,11 +7963,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -7837,7 +7978,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedColorTint()", + "PressedColorTint", "" ] } @@ -7882,9 +8023,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -7932,9 +8073,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -7980,7 +8121,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -8018,13 +8159,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8063,7 +8203,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedColorTint()" + "FocusedColorTint" ] } ] @@ -8101,13 +8241,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8146,7 +8285,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedColorTint()" + "PressedColorTint" ] } ] @@ -8184,13 +8323,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8229,7 +8367,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -8267,13 +8405,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8312,7 +8449,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -8350,13 +8487,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -8395,7 +8531,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -8434,13 +8570,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8479,7 +8614,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -8518,13 +8653,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -8552,31 +8686,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -8585,16 +8715,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "PressedColorTint" }, { @@ -8602,9 +8729,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -8612,51 +8737,147 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -8664,76 +8885,182 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" - ], - "name": "FadeOutEasing" - }, - { - "value": "Idle", - "type": "Choice", - "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" - ], - "hidden": true, - "name": "PreviousState" - } - ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [] - }, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } + ], + "hidden": true, + "name": "PreviousState" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, { "author": "", "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/toggle-switch", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", "name": "SpriteToggleSwitch", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.3.1", + "version": "2.0.2", "description": [ "Toggle switch that users can click or touch. The switch can be customized with sprites.", "", @@ -8754,8 +9081,39 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Toggle switches now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing toggle switches in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the switch object.", @@ -8776,12 +9134,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "WasChecked", + "False", + "" ] } ] @@ -8803,12 +9161,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "WasChecked", + "True", + "" ] } ] @@ -8830,11 +9188,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::TogglePropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "Toggle", + "" ] } ] @@ -8867,11 +9226,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] } ], @@ -8914,21 +9274,23 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -8972,20 +9334,22 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -9096,119 +9460,70 @@ "name": "SetChecked", "sentence": "Check _PARAM0_: _PARAM2_", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Avoid a started touch to interfere with a state change from events." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "BooleanVariable" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - } + "parameters": [ + "Value", + "False", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "ButtonFSM", + "IsChecked", + "False", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - } ], - "actions": [ + "events": [ { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" + "comment": "Avoid a started touch to interfere with a state change from events." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } ] } ] @@ -9218,34 +9533,66 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsChecked", + "True", + "" ] } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", @@ -9274,11 +9621,11 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousIsChecked", + "False", "" ] } @@ -9301,12 +9648,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -9316,11 +9663,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousIsChecked", + "True", + "" ] } ], @@ -9344,11 +9692,12 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousIsChecked", + "True", + "" ] } ], @@ -9388,38 +9737,29 @@ "value": "", "type": "Behavior", "label": "Button finite state machine", - "description": "", - "group": "", "extraInformation": [ "SpriteToggleSwitch::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "false", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], "name": "IsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], + "hidden": true, "name": "PreviousIsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WasChecked" } @@ -9440,61 +9780,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -9508,509 +9814,406 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ] @@ -10021,49 +10224,188 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -10132,22 +10474,20 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -10182,11 +10522,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -10231,11 +10570,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -10280,11 +10618,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -10329,11 +10666,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -10355,11 +10691,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10404,11 +10739,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -10453,11 +10787,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10506,7 +10839,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -10537,8 +10870,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -10546,14 +10877,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -10562,9 +10906,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -10572,9 +10913,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -10582,9 +10920,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -10592,9 +10927,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -10604,47 +10936,137 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "ToggleSwitch", "description": "A toggle switch that users can click or touch.", "fullName": "Toggle switch", + "isUsingLegacyInstancesRenderer": false, "name": "SpriteToggleSwitch", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state." + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "State", - "0", - "0", - "" - ] + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] } ] }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -10662,10 +11084,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] } ], @@ -10683,11 +11107,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -10697,11 +11122,12 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] } ], @@ -10719,10 +11145,11 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", + "PreviousIsChecked", + "False", "" ] } @@ -10790,20 +11217,21 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "False", "" ] } @@ -10821,11 +11249,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -10835,20 +11264,21 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "True", "" ] } @@ -10866,11 +11296,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "PreviousIsChecked", + "False", + "" ] } ] @@ -11103,10 +11534,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -11129,10 +11562,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -11382,7 +11817,6 @@ "fullName": "Is pressed", "functionType": "Condition", "name": "IsPressed", - "private": true, "sentence": "_PARAM0_ is pressed", "events": [ { @@ -11421,6 +11855,49 @@ ], "objectGroups": [] }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Update the state animation.", "fullName": "Update state animation", @@ -11539,10 +12016,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -11565,10 +12044,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -11649,9 +12130,6 @@ "value": "true", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], "name": "IsChecked" }, { @@ -11659,74 +12137,433 @@ "type": "Boolean", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousIsChecked" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "State", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false + "variants": [ + { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Constraint toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, + { + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\DisableConstraintButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\EnableConstraintButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + } + ] } ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 10.9375, + "windowMask": false, + "selectedLayer": "" + } + }, + { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Noise toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ + ], + "animations": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\DisableNoiseButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\EnableNoiseButton.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] } ] } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "State" + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 10.9375, + "windowMask": false, + "selectedLayer": "" } - ] - } + } + ] } ] }, @@ -11735,6 +12572,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Extended math support", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZ1bmN0aW9uLXZhcmlhbnQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNDIsNS4yOUMxMS4zMiw1LjE5IDEwLjM1LDYgMTAuMjUsNy4xMUwxMCwxMEgxMi44MlYxMkg5LjgyTDkuMzgsMTcuMDdDOS4xOCwxOS4yNyA3LjI0LDIwLjkgNS4wNCwyMC43QzMuNzksMjAuNTkgMi42NiwxOS45IDIsMTguODNMMy41LDE3LjMzQzMuODMsMTguMzggNC45NiwxOC45NyA2LDE4LjYzQzYuNzgsMTguMzkgNy4zMywxNy43IDcuNCwxNi44OUw3LjgyLDEySDQuODJWMTBIOEw4LjI3LDYuOTNDOC40Niw0LjczIDEwLjM5LDMuMSAxMi42LDMuMjhDMTMuODYsMy4zOSAxNSw0LjA5IDE1LjY2LDUuMTdMMTQuMTYsNi42N0MxMy45MSw1LjkgMTMuMjMsNS4zNiAxMi40Miw1LjI5TTIyLDEzLjY1TDIwLjU5LDEyLjI0TDE3Ljc2LDE1LjA3TDE0LjkzLDEyLjI0TDEzLjUsMTMuNjVMMTYuMzUsMTYuNUwxMy41LDE5LjMxTDE0LjkzLDIwLjcyTDE3Ljc2LDE3Ljg5TDIwLjU5LDIwLjcyTDIyLDE5LjMxTDE5LjE3LDE2LjVMMjIsMTMuNjVaIiAvPjwvc3ZnPg==", "name": "ExtendedMath", @@ -11778,6 +12616,8 @@ "dt0tRnf2kHWJnjkrpnzTzNj9Yc63" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Returns a term from the Fibonacci sequence.", @@ -12654,6 +13494,7 @@ "category": "Game mechanic", "extensionNamespace": "", "fullName": "Noise generator", + "gdevelopVersion": "", "helpPath": "/tutorials/procedural-generation", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNwcmlua2xlciIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMSA3SDEzVjlIMTFWN001IDIySDlWMTBINVYyMk0xNCAxMUgxNlY5SDE0VjExTTE3IDEwSDE5VjhIMTdWMTBNMTcgNVY3SDE5VjVIMTdNMTQgOEgxNlY2SDE0VjhNMTcgMTNIMTlWMTFIMTdWMTNNNSA3SDUuMzNMNiA5SDhMOC42NyA3SDlWNkg1VjdaIiAvPjwvc3ZnPg==", "name": "Noise", @@ -12689,6 +13530,8 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "fullName": "", @@ -14147,6 +14990,7 @@ "category": "Advanced", "extensionNamespace": "", "fullName": "Color Conversion", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWludmVydC1jb2xvcnMiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsMTkuNThWMTkuNThDMTAuNCwxOS41OCA4Ljg5LDE4Ljk2IDcuNzYsMTcuODNDNi42MiwxNi42OSA2LDE1LjE5IDYsMTMuNThDNiwxMiA2LjYyLDEwLjQ3IDcuNzYsOS4zNEwxMiw1LjFNMTcuNjYsNy45M0wxMiwyLjI3VjIuMjdMNi4zNCw3LjkzQzMuMjIsMTEuMDUgMy4yMiwxNi4xMiA2LjM0LDE5LjI0QzcuOSwyMC44IDkuOTUsMjEuNTggMTIsMjEuNThDMTQuMDUsMjEuNTggMTYuMSwyMC44IDE3LjY2LDE5LjI0QzIwLjc4LDE2LjEyIDIwLjc4LDExLjA1IDE3LjY2LDcuOTNaIiAvPjwvc3ZnPg==", "name": "ColorConversion", @@ -14177,6 +15021,8 @@ "onPsboRtDkUHNOsx7OPr8R8G1oj2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Converts a hexadecimal string into a RGB string. Example input: \"0459AF\".", @@ -15161,12 +16007,13 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Marching Squares (experimental)", + "gdevelopVersion": ">=5.5.222", "helpPath": "/extensions/marching-squares/details", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXBlYW51dC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDIzQzExLjUzIDIzIDExLjA3IDIyLjk1IDEwLjYxIDIyLjg1QzcuMSAyMi4xIDQuODcgMTguNjQgNS42MiAxNS4xM0M1Ljg3IDEzLjk1IDYuNDUgMTIuODcgNy4yOCAxMkM3LjYyIDExLjY0IDcuNjIgMTEuMDggNy4yOCAxMC43MkM1LjIgOC4xNCA1LjYgNC4zNiA4LjE4IDIuMjhTMTQuNTQuNjA3IDE2LjYyIDMuMTlDMTguMzkgNS4zOCAxOC4zOSA4LjUgMTYuNjIgMTAuNzJDMTYuMzMgMTEuMTMgMTYuMzcgMTEuNyAxNi43MiAxMi4wNkMxOS4xNyAxNC42OCAxOS4wNCAxOC44IDE2LjQxIDIxLjI1QzE1LjIyIDIyLjM3IDEzLjY0IDIzIDEyIDIzTTEyIDNDMTEuMDkgMyAxMC4yIDMuMzEgOS41IDMuODlDOC41NSA0LjY1IDggNS43OSA4IDdDOCA3LjkxIDguMzEgOC43OSA4Ljg4IDkuNUM5Ljg0IDEwLjY0IDkuNzcgMTIuMzMgOC43MyAxMy40MUM3LjAzIDE1LjIyIDcuMTMgMTguMDcgOC45NCAxOS43N1MxMy42IDIxLjM4IDE1LjMgMTkuNTZDMTYuOTIgMTcuODMgMTYuOTIgMTUuMTQgMTUuMyAxMy40MUMxNC4yMyAxMi4zMiAxNC4xNSAxMC42IDE1LjEyIDkuNDFDMTYuNSA3LjY5IDE2LjIyIDUuMTcgMTQuNSAzLjc5QzE0IDMuNDEgMTMuNDcgMy4xNCAxMi44OCAzQzEyLjU5IDMgMTIuMjkgMyAxMiAzTTEyIDZDMTIgNi41NSAxMi40NSA3IDEzIDdTMTQgNi41NSAxNCA2IDEzLjU1IDUgMTMgNSAxMiA1LjQ1IDEyIDZNMTQgMTlDMTQuNTUgMTkgMTUgMTguNTUgMTUgMThTMTQuNTUgMTcgMTQgMTcgMTMgMTcuNDUgMTMgMTggMTMuNDUgMTkgMTQgMTlNMTMgMTZDMTMuNTUgMTYgMTQgMTUuNTUgMTQgMTVTMTMuNTUgMTQgMTMgMTQgMTIgMTQuNDUgMTIgMTUgMTIuNDUgMTYgMTMgMTZNMTEgMThDMTEuNTUgMTggMTIgMTcuNTUgMTIgMTdTMTEuNTUgMTYgMTEgMTYgMTAgMTYuNDUgMTAgMTcgMTAuNDUgMTggMTEgMThaIiAvPjwvc3ZnPg==", "name": "MarchingSquares", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/peanut-outline.svg", "shortDescription": "Allow to build a \"scalar field\" and draw contour lines of it: useful for fog of wars, liquid effects, paint the ground, etc...", - "version": "0.5.7", + "version": "0.6.0", "description": [ "It can be helpful for:", " * Liquid effects like water, blobs or lava ([open the project online](https://editor.gdevelop.io/?project=example://marching-squares-liquids))", @@ -15193,6 +16040,8 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Define the scalar field painter library JavaScript code.", @@ -16797,24 +17646,22 @@ "conditions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::PropertyAreaRightBound" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaRightBound", "<=", - "Object.Behavior::PropertyAreaLeftBound()" + "AreaLeftBound" ] } ], "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaRightBound" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaRightBound", "=", "Object.Behavior::AreaLeft() + SceneWindowWidth()" ] @@ -16826,26 +17673,24 @@ "conditions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::PropertyAreaBottomBound" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaBottomBound", "<=", - "Object.Behavior::PropertyAreaTopBound()" + "AreaTopBound" ] } ], "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaBottomBound" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaBottomBound", "=", - "Object.Behavior::PropertyAreaBottomBound() + SceneWindowHeight()" + "AreaBottomBound + SceneWindowHeight()" ] } ] @@ -17456,7 +18301,7 @@ "functionType": "Action", "group": "Field painting", "name": "AddLine", - "sentence": "Add a line to the field of _PARAM0_ fom _PARAM2_ ; _PARAM3_ to _PARAM4_ ; _PARAM5_ with thickness: _PARAM6_ using: _PARAM8_", + "sentence": "Add a line to the field of _PARAM0_ from _PARAM2_ ; _PARAM3_ to _PARAM4_ ; _PARAM5_ with thickness: _PARAM6_ using: _PARAM8_", "events": [ { "type": "BuiltinCommonInstructions::JsCode", @@ -17539,7 +18384,7 @@ "functionType": "Action", "group": "Field painting", "name": "MaskLine", - "sentence": "Mask a line on the field of _PARAM0_ fom _PARAM2_ ; _PARAM3_ to _PARAM4_ ; _PARAM5_ with thickness: _PARAM6_", + "sentence": "Mask a line on the field of _PARAM0_ from _PARAM2_ ; _PARAM3_ to _PARAM4_ ; _PARAM5_ with thickness: _PARAM6_", "events": [ { "type": "BuiltinCommonInstructions::JsCode", @@ -17795,13 +18640,12 @@ "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyCellWidth" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CellWidth", "=", - "GetArgumentAsNumber(\"CellWidth\")" + "Value" ] }, { @@ -17832,7 +18676,7 @@ }, { "description": "Value", - "name": "CellWidth", + "name": "Value", "type": "expression" } ], @@ -17852,13 +18696,12 @@ "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyCellHeight" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CellHeight", "=", - "GetArgumentAsNumber(\"CellHeight\")" + "Value" ] }, { @@ -17889,7 +18732,7 @@ }, { "description": "Value", - "name": "CellHeight", + "name": "Value", "type": "expression" } ], @@ -17960,12 +18803,12 @@ "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyFillOutside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=" + "FillOutside", + "False", + "" ] } ] @@ -17975,22 +18818,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"FillOutside\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyFillOutside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "FillOutside", + "True", + "" ] } ] @@ -18011,7 +18856,7 @@ }, { "description": "Fill outside?", - "name": "FillOutside", + "name": "Value", "type": "yesorno" } ], @@ -18031,13 +18876,12 @@ "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyThreshold" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Threshold", "=", - "GetArgumentAsNumber(\"Threshold\")" + "Value" ] } ] @@ -18058,7 +18902,7 @@ }, { "description": "Value", - "name": "Threshold", + "name": "Value", "type": "expression" } ], @@ -18078,46 +18922,52 @@ "actions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaLeftBound" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaLeftBound", "=", - "GetArgumentAsNumber(\"LeftBound\")" + "LeftBound" ] }, { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaTopBound" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaTopBound", "=", - "GetArgumentAsNumber(\"TopBound\")" + "TopBound" ] }, { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaRightBound" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "AreaRightBound", + "=", + "RightBound" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AreaBottomBound", "=", - "GetArgumentAsNumber(\"RightBound\")" + "BottomBound" ] }, { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::SetPropertyAreaBottomBound" + "value": "MarchingSquares::MarchingSquaresBehavior::RebuildField" }, "parameters": [ "Object", "Behavior", - "=", - "GetArgumentAsNumber(\"BottomBound\")" + "" ] } ] @@ -18176,7 +19026,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaLeftBound()" + "AreaLeftBound" ] } ] @@ -18218,7 +19068,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaTopBound()" + "AreaTopBound" ] } ] @@ -18260,7 +19110,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaRightBound()" + "AreaRightBound" ] } ] @@ -18273,9 +19123,9 @@ "value": "Egal" }, "parameters": [ - "Object.Behavior::PropertyAreaLeftBound()", + "AreaLeftBound", "=", - "Object.Behavior::PropertyAreaRightBound()" + "AreaRightBound" ] } ], @@ -18285,7 +19135,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaLeftBound() + SceneWindowWidth()" + "AreaLeftBound + SceneWindowWidth()" ] } ] @@ -18327,7 +19177,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaBottomBound()" + "AreaBottomBound" ] } ] @@ -18340,9 +19190,9 @@ "value": "Egal" }, "parameters": [ - "Object.Behavior::PropertyAreaTopBound()", + "AreaTopBound", "=", - "Object.Behavior::PropertyAreaBottomBound()" + "AreaBottomBound" ] } ], @@ -18352,7 +19202,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyAreaTopBound() + SceneWindowHeight()" + "AreaTopBound + SceneWindowHeight()" ] } ] @@ -18394,7 +19244,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyCellWidth()" + "CellWidth" ] } ] @@ -18436,7 +19286,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyCellHeight()" + "CellHeight" ] } ] @@ -18560,7 +19410,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyThreshold()" + "Threshold" ] } ] @@ -18939,11 +19789,12 @@ "conditions": [ { "type": { - "value": "MarchingSquares::MarchingSquaresBehavior::PropertyFillOutside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "FillOutside", + "True", + "" ] } ], @@ -19090,9 +19941,6 @@ "type": "Number", "unit": "Pixel", "label": "Area left bound", - "description": "", - "group": "", - "extraInformation": [], "name": "AreaLeftBound" }, { @@ -19100,9 +19948,6 @@ "type": "Number", "unit": "Pixel", "label": "Area top bound", - "description": "", - "group": "", - "extraInformation": [], "name": "AreaTopBound" }, { @@ -19110,9 +19955,6 @@ "type": "Number", "unit": "Pixel", "label": "Area right bound", - "description": "", - "group": "", - "extraInformation": [], "name": "AreaRightBound" }, { @@ -19120,9 +19962,6 @@ "type": "Number", "unit": "Pixel", "label": "Area bottom bound", - "description": "", - "group": "", - "extraInformation": [], "name": "AreaBottomBound" }, { @@ -19130,9 +19969,6 @@ "type": "Number", "unit": "Pixel", "label": "Cell width", - "description": "", - "group": "", - "extraInformation": [], "name": "CellWidth" }, { @@ -19140,18 +19976,12 @@ "type": "Number", "unit": "Pixel", "label": "Cell height", - "description": "", - "group": "", - "extraInformation": [], "name": "CellHeight" }, { "value": "", "type": "Boolean", "label": "Fill outside", - "description": "", - "group": "", - "extraInformation": [], "name": "FillOutside" }, { @@ -19159,18 +19989,12 @@ "type": "Number", "unit": "Dimensionless", "label": "Contour threshold", - "description": "", - "group": "", - "extraInformation": [], "name": "Threshold" }, { "value": "", "type": "Boolean", "label": "Must only draw what is on the screen", - "description": "", - "group": "", - "extraInformation": [], "name": "MustOnlyDrawScreen" } ], @@ -19180,6 +20004,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/music jukebox/music jukebox.json b/examples/music jukebox/music jukebox.json index 6fdfaae97..4c32a085c 100644 --- a/examples/music jukebox/music jukebox.json +++ b/examples/music jukebox/music jukebox.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 209, + "build": 245, "major": 5, - "minor": 4, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Music Jukebox Template", "description": "Interactive Music Player Jukebox example with animated disk & tracklist.\n\nGDevelop Template & Art by Perri \"TeckGeck\" T.F. (TKGK Interactive)\nMusic by Komiku, U.S. Army Blues, Soft and Furious, Loyalty Freak Music, Frederic Lardon & Malaventura\nSound Effects by Kenney Games & TeckGeck\n\nThe Character (Lillian) are under the (Creative Commons ATTRIBUTION 4.0 INTERNATIONAL) licence\nKenney Games assets are under the (Creative Commons Zero, CC0) licence\nAll music is under the (Creative Commons Zero, CC0) licence\n\n**Links**\nhttps://www.kenney.nl/assets\nhttps://www.chosic.com/free-music/all\nhttps://teckgeck.com\nhttps://www.tkgk-interactive.com\n\nhttps://creativecommons.org/publicdomain/zero/1.0\nhttps://creativecommons.org/licenses/by/4.0/", @@ -86,7 +85,9 @@ "TeckGeck" ], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -98,7 +99,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 1.png", "kind": "image", "metadata": "", @@ -107,7 +107,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 2.png", "kind": "image", "metadata": "", @@ -116,7 +115,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 3.png", "kind": "image", "metadata": "", @@ -125,7 +123,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 4.png", "kind": "image", "metadata": "", @@ -134,7 +131,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 5.png", "kind": "image", "metadata": "", @@ -143,7 +139,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 6.png", "kind": "image", "metadata": "", @@ -152,7 +147,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 7.png", "kind": "image", "metadata": "", @@ -161,7 +155,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 8.png", "kind": "image", "metadata": "", @@ -170,7 +163,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Up Arrow.png", "kind": "image", "metadata": "", @@ -179,7 +171,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Down Arrow.png", "kind": "image", "metadata": "", @@ -198,7 +189,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/Music player BG.png", "kind": "image", "metadata": "", @@ -207,7 +197,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Spine/PSX Disk.png", "kind": "image", "metadata": "", @@ -241,7 +230,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 9.png", "kind": "image", "metadata": "", @@ -250,7 +238,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Track Pannel 10.png", "kind": "image", "metadata": "", @@ -359,7 +346,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/SFX on Button.png", "kind": "image", "metadata": "", @@ -368,7 +354,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/SFX off Button.png", "kind": "image", "metadata": "", @@ -377,7 +362,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Music on Button.png", "kind": "image", "metadata": "", @@ -386,7 +370,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Music off Button.png", "kind": "image", "metadata": "", @@ -395,7 +378,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/Web Button.png", "kind": "image", "metadata": "", @@ -404,7 +386,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/itchio Button.png", "kind": "image", "metadata": "", @@ -413,7 +394,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Images/UI UX/GDgames Button.png", "kind": "image", "metadata": "", @@ -422,7 +402,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "GD Image.png", "kind": "image", "metadata": "", @@ -430,8 +409,7 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -468,13 +446,16 @@ "gridType": "rectangular", "gridWidth": 16, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.7370816317994066, - "windowMask": false + "zoomFactor": 0.841642812537315, + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -1634,15 +1615,11 @@ ] }, { - "areaMaxX": 64, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, "assetStoreId": "", "name": "SFX_Button", + "persistentUuid": "2c352984-bd44-4740-bb47-8ded82b74c85", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "SFX toggle", "variables": [], "effects": [], "behaviors": [ @@ -1657,153 +1634,14 @@ "Index": 2.0247e-320 } ], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": true, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "Images\\UI UX\\SFX off Button.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 0 - }, - { - "x": 129, - "y": 0 - }, - { - "x": 129, - "y": 129 - }, - { - "x": 0, - "y": 129 - } - ] - ] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "Images\\UI UX\\SFX on Button.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 0 - }, - { - "x": 129, - "y": 0 - }, - { - "x": 129, - "y": 129 - }, - { - "x": 0, - "y": 129 - } - ] - ] - } - ] - } - ] - } - ] - } - }, - "instances": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ - { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 - } - ], - "effects": [] - } - ] + "content": {} }, { - "areaMaxX": 64, - "areaMaxY": 64, - "areaMaxZ": 64, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, "assetStoreId": "", "name": "Music_Button", + "persistentUuid": "45747a19-66be-4580-ab48-b297285a853a", "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variant": "Music toggle", "variables": [], "effects": [], "behaviors": [ @@ -1818,142 +1656,7 @@ "Index": 2.0247e-320 } ], - "content": {}, - "childrenContent": { - "State": { - "adaptCollisionMaskAutomatically": true, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "Images\\UI UX\\Music off Button.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 0 - }, - { - "x": 129, - "y": 0 - }, - { - "x": 129, - "y": 128 - }, - { - "x": 0, - "y": 128 - } - ] - ] - } - ] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "Images\\UI UX\\Music on Button.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 0 - }, - { - "x": 129, - "y": 0 - }, - { - "x": 129, - "y": 128 - }, - { - "x": 0, - "y": 128 - } - ] - ] - } - ] - } - ] - } - ] - } - }, - "instances": [], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ - { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 - } - ], - "effects": [] - } - ] + "content": {} }, { "adaptCollisionMaskAutomatically": true, @@ -10462,6 +10165,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -10550,12 +10254,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/toggle-switch", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", "name": "SpriteToggleSwitch", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.3.1", + "version": "2.0.2", "description": [ "Toggle switch that users can click or touch. The switch can be customized with sprites.", "", @@ -10576,10 +10281,39 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Toggle switches now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing toggle switches in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the switch object.", @@ -10600,12 +10334,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "WasChecked", + "False", + "" ] } ] @@ -10627,12 +10361,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "WasChecked", + "True", + "" ] } ] @@ -10654,11 +10388,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::TogglePropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "Toggle", + "" ] } ] @@ -10691,11 +10426,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] } ], @@ -10738,21 +10474,23 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -10796,20 +10534,22 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "IsChecked", + "True", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "WasChecked", + "True", + "" ] } ], @@ -10920,119 +10660,70 @@ "name": "SetChecked", "sentence": "Check _PARAM0_: _PARAM2_", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Avoid a started touch to interfere with a state change from events." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "BooleanVariable" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - } + "parameters": [ + "Value", + "False", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "ButtonFSM", + "IsChecked", + "False", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": [ - "\"Value\"" - ] - } ], - "actions": [ + "events": [ { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" + "comment": "Avoid a started touch to interfere with a state change from events." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } ] } ] @@ -11042,22 +10733,54 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "IsChecked", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } ] } ] @@ -11098,11 +10821,11 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousIsChecked", + "False", "" ] } @@ -11125,12 +10848,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -11140,11 +10863,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousIsChecked", + "True", + "" ] } ], @@ -11168,11 +10892,12 @@ { "type": { "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "PreviousIsChecked", + "True", + "" ] } ], @@ -11212,38 +10937,29 @@ "value": "", "type": "Behavior", "label": "Button finite state machine", - "description": "", - "group": "", "extraInformation": [ "SpriteToggleSwitch::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "false", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], "name": "IsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], + "hidden": true, "name": "PreviousIsChecked" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WasChecked" } @@ -11264,61 +10980,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -11332,494 +11014,430 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] @@ -11828,13 +11446,12 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -11844,50 +11461,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -11956,22 +11674,20 @@ "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -12006,11 +11722,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -12055,11 +11770,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -12104,11 +11818,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -12153,11 +11866,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -12179,11 +11891,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -12228,11 +11939,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -12277,11 +11987,10 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -12330,7 +12039,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -12361,8 +12070,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -12370,14 +12077,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -12386,9 +12106,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -12396,9 +12113,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -12406,9 +12120,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -12416,9 +12127,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -12437,7 +12145,121 @@ "defaultName": "ToggleSwitch", "description": "A toggle switch that users can click or touch.", "fullName": "Toggle switch", + "isUsingLegacyInstancesRenderer": false, "name": "SpriteToggleSwitch", + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, + { + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -12445,36 +12267,6 @@ "name": "onCreated", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "State", - "0", - "0", - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -12492,10 +12284,12 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] } ], @@ -12513,11 +12307,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -12527,11 +12322,12 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] } ], @@ -12549,10 +12345,11 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", + "PreviousIsChecked", + "False", "" ] } @@ -12620,20 +12417,21 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "False", "" ] } @@ -12651,11 +12449,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "PreviousIsChecked", + "True", + "" ] } ] @@ -12665,20 +12464,21 @@ "conditions": [ { "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "IsChecked", + "False", + "" ] }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "SwitchFSM", + "PreviousIsChecked", + "True", "" ] } @@ -12696,11 +12496,12 @@ }, { "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "PreviousIsChecked", + "False", + "" ] } ] @@ -12933,10 +12734,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -12959,10 +12762,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], @@ -13212,7 +13017,6 @@ "fullName": "Is pressed", "functionType": "Condition", "name": "IsPressed", - "private": true, "sentence": "_PARAM0_ is pressed", "events": [ { @@ -13251,6 +13055,49 @@ ], "objectGroups": [] }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, { "description": "Update the state animation.", "fullName": "Update state animation", @@ -13369,10 +13216,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -13395,10 +13244,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -13479,9 +13330,6 @@ "value": "true", "type": "Boolean", "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], "name": "IsChecked" }, { @@ -13489,106 +13337,432 @@ "type": "Boolean", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousIsChecked" } ], - "objects": [ - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "State", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false - } - ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ + "variants": [ + { + "areaMaxX": 129, + "areaMaxY": 129, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Music toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ + ], + "animations": [ { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Images\\UI UX\\Music off Button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 129, + "y": 0 + }, + { + "x": 129, + "y": 128 + }, + { + "x": 0, + "y": 128 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Images\\UI UX\\Music on Button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 129, + "y": 0 + }, + { + "x": 129, + "y": 128 + }, + { + "x": 0, + "y": 128 + } + ] + ] + } + ] + } + ] } ] } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "State" + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 4.773551654051562, + "windowMask": false, + "selectedLayer": "" } - ] - }, - "objectsGroups": [], - "layers": [ + }, { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ - { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "areaMaxX": 129, + "areaMaxY": 129, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "SFX toggle", + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, + { + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Images\\UI UX\\SFX off Button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 129, + "y": 1 + }, + { + "x": 129, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Images\\UI UX\\SFX on Button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 129, + "y": 1 + }, + { + "x": 129, + "y": 129 + }, + { + "x": 0, + "y": 129 + } + ] + ] + } + ] + } + ] + } + ] } ], - "effects": [] + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 64, + "layer": "", + "name": "State", + "persistentUuid": "bda60bb1-c312-4710-baf7-ec7a3887c076", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 4.773551654051562, + "windowMask": false, + "selectedLayer": "" + } } - ], - "instances": [] + ] } ] }, @@ -13597,12 +13771,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": ">=5.5.222", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.1.0", + "version": "1.3.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -13644,7 +13819,7 @@ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -13673,11 +13848,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -13686,11 +13860,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -13724,12 +13897,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "MouseIsInside", + "False", + "" ] } ] @@ -13739,11 +13912,12 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "ShouldCheckHovering", + "True", + "" ] }, { @@ -13760,12 +13934,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "MouseIsInside", + "True", + "" ] } ] @@ -13788,12 +13962,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "TouchIsInside", + "False", + "" ] } ] @@ -13803,11 +13977,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchId" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "!=", "0" ] @@ -13818,20 +13991,20 @@ }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ] @@ -13863,11 +14036,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "=", "0" ] @@ -13889,31 +14061,30 @@ }, "parameters": [ "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "StartedTouchOrMouseId(Index)" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "TouchIsInside", + "True", + "" ] } ], @@ -13929,22 +14100,20 @@ "subInstructions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -13955,11 +14124,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -13974,11 +14142,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "Index", "+", "1" ] @@ -14007,20 +14174,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14029,11 +14196,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14045,20 +14211,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14067,11 +14233,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14084,20 +14249,20 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14106,11 +14271,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14122,20 +14286,20 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14144,11 +14308,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14176,18 +14339,17 @@ }, "parameters": [ "", - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -14199,11 +14361,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14212,11 +14373,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14229,11 +14389,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14241,11 +14400,10 @@ { "type": { "inverted": true, - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14254,11 +14412,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14341,22 +14498,20 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -14391,11 +14546,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -14440,11 +14594,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -14489,11 +14642,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14538,11 +14690,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -14564,11 +14715,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14613,11 +14763,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -14662,11 +14811,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -14715,7 +14863,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -14746,8 +14894,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -14755,14 +14901,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -14771,9 +14930,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -14781,9 +14937,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -14791,9 +14944,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -14801,9 +14951,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -14833,7 +14980,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] }, @@ -14844,7 +14991,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -14855,7 +15002,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -14903,7 +15050,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "no" ] }, @@ -14914,7 +15061,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "no" ] }, @@ -14925,7 +15072,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "no" ] } @@ -14936,11 +15083,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "!=", "\"\"" ] @@ -14964,7 +15110,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyIdleEffect()", + "IdleEffect", "yes" ] } @@ -14975,11 +15121,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "!=", "\"\"" ] @@ -15003,7 +15148,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyFocusedEffect()", + "FocusedEffect", "yes" ] } @@ -15014,11 +15159,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "!=", "\"\"" ] @@ -15042,7 +15186,7 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyPressedEffect()", + "PressedEffect", "yes" ] } @@ -15084,7 +15228,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleEffect()" + "IdleEffect" ] } ] @@ -15121,13 +15265,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15165,7 +15308,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedEffect()" + "FocusedEffect" ] } ] @@ -15202,13 +15345,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15246,7 +15388,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedEffect()" + "PressedEffect" ] } ] @@ -15283,13 +15425,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedEffect", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15316,31 +15457,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "IdleEffect" }, { @@ -15349,16 +15486,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], "name": "PressedEffect" } ], @@ -15368,7 +15502,7 @@ "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", "name": "ButtonAnimationName", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -15388,7 +15522,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15398,7 +15532,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15448,7 +15581,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15476,7 +15609,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -15504,7 +15637,7 @@ "Object", "Animation", "=", - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -15517,7 +15650,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15546,7 +15678,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleAnimationName()" + "IdleAnimationName" ] } ] @@ -15559,7 +15691,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15584,13 +15715,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15600,7 +15730,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15629,7 +15758,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedAnimationName()" + "FocusedAnimationName" ] } ] @@ -15642,7 +15771,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15667,13 +15795,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15683,7 +15810,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15712,7 +15838,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedAnimationName()" + "PressedAnimationName" ] } ] @@ -15725,7 +15851,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15750,13 +15875,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedAnimationName", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -15766,7 +15890,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -15780,24 +15903,31 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Animatable capability", + "extraInformation": [ + "AnimatableCapability::AnimatableBehavior" + ], + "choices": [], + "name": "Animation" + }, { "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "IdleAnimationName" }, { @@ -15806,16 +15936,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PressedAnimationName" } ], @@ -15839,13 +15966,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -15896,11 +16022,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -15909,11 +16034,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -15925,7 +16049,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleValue()", + "IdleValue", "" ] } @@ -15952,11 +16076,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -15965,11 +16088,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -15981,7 +16103,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -15992,11 +16114,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -16005,11 +16126,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -16021,7 +16141,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedValue()", + "FocusedValue", "" ] } @@ -16044,11 +16164,10 @@ }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -16057,11 +16176,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -16073,7 +16191,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedValue()", + "PressedValue", "" ] } @@ -16096,11 +16214,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] @@ -16114,8 +16231,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeInDuration()", - "Object.Behavior::PropertyFadeInEasing()", + "FadeInDuration", + "FadeInEasing", "" ] } @@ -16126,11 +16243,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] @@ -16144,8 +16260,8 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFadeOutDuration()", - "Object.Behavior::PropertyFadeOutEasing()", + "FadeOutDuration", + "FadeOutEasing", "" ] } @@ -16223,46 +16339,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeIn\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16301,46 +16413,42 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "=", "0" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"FadeOut\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenInitialValue", "=", - "Object.Behavior::PropertyEffectValue()" + "EffectValue" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTargetedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16378,37 +16486,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "<", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Tween::Ease(GetArgumentAsString(\"Easing\"), Object.Behavior::PropertyTweenInitialValue(), Object.Behavior::PropertyTweenTargetedValue(), Object.Behavior::PropertyTweenTime() / GetArgumentAsNumber(\"Duration\"))" + "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] } ] @@ -16418,37 +16523,34 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenTime", ">=", - "GetArgumentAsNumber(\"Duration\")" + "Duration" ] } ], "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "TweenState", "=", "\"NoTween\"" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectValue", "=", - "Object.Behavior::PropertyTweenTargetedValue()" + "TweenTargetedValue" ] } ] @@ -16464,9 +16566,9 @@ "parameters": [ "Object", "Effect", - "Object.Behavior::PropertyEffectName()", - "Object.Behavior::PropertyEffectProperty()", - "Object.Behavior::PropertyEffectValue()" + "EffectName", + "EffectProperty", + "EffectValue" ] } ] @@ -16515,7 +16617,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectName()" + "EffectName" ] } ] @@ -16556,7 +16658,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyEffectProperty()" + "EffectProperty" ] } ] @@ -16595,24 +16697,22 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectName", "=", - "GetArgumentAsString(\"Value\")" + "NewEffectName" ] }, { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "EffectProperty", "=", - "GetArgumentAsString(\"Value\")" + "NewPropertyName" ] } ] @@ -16632,12 +16732,12 @@ }, { "description": "Effect name", - "name": "EffectName", + "name": "NewEffectName", "type": "string" }, { "description": "Parameter name", - "name": "PropertyName", + "name": "NewPropertyName", "type": "string" } ], @@ -16660,7 +16760,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleValue()" + "IdleValue" ] } ] @@ -16697,13 +16797,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16741,7 +16840,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedValue()" + "FocusedValue" ] } ] @@ -16778,13 +16877,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16822,7 +16920,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedValue()" + "PressedValue" ] } ] @@ -16859,13 +16957,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -16903,7 +17000,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -16941,13 +17038,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -16985,7 +17081,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -17023,13 +17119,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -17067,7 +17162,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -17104,13 +17199,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17148,7 +17242,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -17185,13 +17279,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17218,31 +17311,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], "name": "EffectName" }, { @@ -17251,16 +17340,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "IdleValue" }, { @@ -17269,58 +17355,153 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -17328,42 +17509,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -17372,9 +17651,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -17382,21 +17659,26 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -17405,9 +17687,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -17415,9 +17694,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -17425,9 +17701,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -17435,12 +17708,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -17449,9 +17729,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -17462,7 +17739,7 @@ "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", "name": "ButtonScaleTween", - "objectType": "Sprite", + "objectType": "", "eventsFunctions": [ { "fullName": "", @@ -17482,7 +17759,7 @@ "Object", "Scale", "=", - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -17492,7 +17769,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17534,11 +17810,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -17547,11 +17822,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -17563,7 +17837,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleScale()", + "IdleScale", "" ] } @@ -17590,11 +17864,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -17603,11 +17876,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -17619,7 +17891,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -17630,11 +17902,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -17643,11 +17914,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -17659,7 +17929,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedScale()", + "FocusedScale", "" ] } @@ -17682,11 +17952,10 @@ }, { "type": { - "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -17695,11 +17964,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -17711,7 +17979,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedScale()", + "PressedScale", "" ] } @@ -17725,7 +17993,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17756,10 +18023,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -17771,7 +18038,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17807,10 +18073,10 @@ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", - "GetArgumentAsNumber(\"Value\")", - "GetArgumentAsNumber(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -17822,7 +18088,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17856,7 +18121,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyIdleScale()" + "IdleScale" ] } ] @@ -17869,7 +18134,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17894,13 +18158,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17910,7 +18173,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17939,7 +18201,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFocusedScale()" + "FocusedScale" ] } ] @@ -17952,7 +18214,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -17977,13 +18238,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -17993,7 +18253,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18022,7 +18281,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyPressedScale()" + "PressedScale" ] } ] @@ -18035,7 +18294,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18060,13 +18318,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedScale", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18076,7 +18333,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18105,7 +18361,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -18118,7 +18374,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18143,13 +18398,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18159,7 +18413,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18188,7 +18441,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -18201,7 +18454,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18226,13 +18478,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -18242,7 +18493,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18271,7 +18521,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -18285,7 +18535,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18310,13 +18559,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -18326,7 +18574,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18355,7 +18602,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -18369,7 +18616,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18394,13 +18640,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -18410,7 +18655,6 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { @@ -18424,26 +18668,34 @@ } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "choices": [], + "name": "Scale" + }, { "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -18451,9 +18703,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "IdleScale" }, { @@ -18463,7 +18713,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], "name": "FocusedScale" }, { @@ -18471,9 +18720,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -18481,9 +18728,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { @@ -18491,51 +18736,147 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -18543,42 +18884,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -18586,12 +19025,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -18621,7 +19067,7 @@ }, "parameters": [ "Object", - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -18673,11 +19119,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Idle\"" ] @@ -18686,11 +19131,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -18702,7 +19146,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyIdleColorTint()", + "IdleColorTint", "" ] } @@ -18729,11 +19173,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Idle\"" ] @@ -18742,11 +19185,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -18758,7 +19200,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -18769,11 +19211,10 @@ "conditions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -18782,11 +19223,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Focused\"" ] @@ -18798,7 +19238,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyFocusedColorTint()", + "FocusedColorTint", "" ] } @@ -18821,11 +19261,10 @@ }, { "type": { - "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "!=", "\"Pressed\"" ] @@ -18834,11 +19273,10 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PreviousState", "=", "\"Pressed\"" ] @@ -18850,7 +19288,7 @@ "parameters": [ "Object", "Behavior", - "Object.Behavior::PropertyPressedColorTint()", + "PressedColorTint", "" ] } @@ -18895,9 +19333,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeInEasing()", - "1000 * Object.Behavior::PropertyFadeInDuration()", + "Value", + "FadeInEasing", + "1000 * FadeInDuration", "no", "yes" ] @@ -18945,9 +19383,9 @@ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", - "GetArgumentAsString(\"Value\")", - "Object.Behavior::PropertyFadeOutEasing()", - "1000 * Object.Behavior::PropertyFadeOutDuration()", + "Value", + "FadeOutEasing", + "1000 * FadeOutDuration", "no", "yes" ] @@ -18993,7 +19431,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyIdleColorTint()" + "IdleColorTint" ] } ] @@ -19031,13 +19469,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "IdleColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19076,7 +19513,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFocusedColorTint()" + "FocusedColorTint" ] } ] @@ -19114,13 +19551,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FocusedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19159,7 +19595,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyPressedColorTint()" + "PressedColorTint" ] } ] @@ -19197,13 +19633,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "PressedColorTint", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19242,7 +19677,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeInDuration()" + "FadeInDuration" ] } ] @@ -19280,13 +19715,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -19325,7 +19759,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFadeOutDuration()" + "FadeOutDuration" ] } ] @@ -19363,13 +19797,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutDuration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -19408,7 +19841,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeInEasing()" + "FadeInEasing" ] } ] @@ -19447,13 +19880,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeInEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19492,7 +19924,7 @@ "value": "SetReturnString" }, "parameters": [ - "Object.Behavior::PropertyFadeOutEasing()" + "FadeOutEasing" ] } ] @@ -19531,13 +19963,12 @@ "actions": [ { "type": { - "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "FadeOutEasing", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -19565,31 +19996,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "IdleColorTint" }, { @@ -19598,16 +20025,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], "name": "PressedColorTint" }, { @@ -19615,9 +20039,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeInDuration" }, { @@ -19625,51 +20047,147 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -19677,42 +20195,140 @@ "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -19720,12 +20336,19 @@ "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -19737,6 +20360,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/object-slicer/object-slicer.json b/examples/object-slicer/object-slicer.json index 9d6c0c466..de9052d42 100644 --- a/examples/object-slicer/object-slicer.json +++ b/examples/object-slicer/object-slicer.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -18,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Object slicer", "description": "Test the Object Slicer extension, which can slice an object into smaller pieces that match the color of original object. \n\nUseful for creating death animations such as explosions, crumbling, dissolve, or teleportation effects.\nPieces should be a solid white color or the color of the piece not match the original color.\n\nTips:\n- Pieces are linked to the original object which can be used in other events (i.e. explode away from the original object)", @@ -88,6 +87,7 @@ ], "playableDevices": [ "keyboard", + "mobile", "mobile" ], "extensionProperties": [], @@ -101,7 +101,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Rubber Ducktopus.png", "kind": "image", "metadata": "", @@ -114,7 +113,6 @@ } }, { - "alwaysLoaded": false, "file": "BlankTile-1-0.png", "kind": "image", "metadata": "", @@ -123,7 +121,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "HoverColor-1.png", "kind": "image", "metadata": "", @@ -132,7 +129,6 @@ "userAdded": false }, { - "alwaysLoaded": false, "file": "assets/tiled_Wall for Blue Floor.png", "kind": "image", "metadata": "", @@ -145,7 +141,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Gordon_Idle_1.png", "kind": "image", "metadata": "", @@ -158,7 +153,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Gordon_Idle_2.png", "kind": "image", "metadata": "", @@ -171,7 +165,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Gordon_Idle_3.png", "kind": "image", "metadata": "", @@ -184,7 +177,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Gordon_Idle_4.png", "kind": "image", "metadata": "", @@ -197,7 +189,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_1.png", "kind": "image", "metadata": "", @@ -210,7 +201,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_10.png", "kind": "image", "metadata": "", @@ -223,7 +213,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_11.png", "kind": "image", "metadata": "", @@ -236,7 +225,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_12.png", "kind": "image", "metadata": "", @@ -249,7 +237,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_13.png", "kind": "image", "metadata": "", @@ -262,7 +249,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_14.png", "kind": "image", "metadata": "", @@ -275,7 +261,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_15.png", "kind": "image", "metadata": "", @@ -288,7 +273,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_2.png", "kind": "image", "metadata": "", @@ -301,7 +285,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_3.png", "kind": "image", "metadata": "", @@ -314,7 +297,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_4.png", "kind": "image", "metadata": "", @@ -327,7 +309,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_5.png", "kind": "image", "metadata": "", @@ -340,7 +321,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_6.png", "kind": "image", "metadata": "", @@ -353,7 +333,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_7.png", "kind": "image", "metadata": "", @@ -366,7 +345,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_8.png", "kind": "image", "metadata": "", @@ -379,7 +357,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Zombie Boy_Idle_9.png", "kind": "image", "metadata": "", @@ -392,7 +369,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_1.png", "kind": "image", "metadata": "", @@ -405,7 +381,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_10.png", "kind": "image", "metadata": "", @@ -418,7 +393,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_11.png", "kind": "image", "metadata": "", @@ -431,7 +405,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_12.png", "kind": "image", "metadata": "", @@ -444,7 +417,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_13.png", "kind": "image", "metadata": "", @@ -457,7 +429,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_14.png", "kind": "image", "metadata": "", @@ -470,7 +441,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_15.png", "kind": "image", "metadata": "", @@ -483,7 +453,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_16.png", "kind": "image", "metadata": "", @@ -496,7 +465,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_17.png", "kind": "image", "metadata": "", @@ -509,7 +477,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_18.png", "kind": "image", "metadata": "", @@ -522,7 +489,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_19.png", "kind": "image", "metadata": "", @@ -535,7 +501,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_2.png", "kind": "image", "metadata": "", @@ -548,7 +513,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_20.png", "kind": "image", "metadata": "", @@ -561,7 +525,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_21.png", "kind": "image", "metadata": "", @@ -574,7 +537,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_22.png", "kind": "image", "metadata": "", @@ -587,7 +549,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_23.png", "kind": "image", "metadata": "", @@ -600,7 +561,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_24.png", "kind": "image", "metadata": "", @@ -613,7 +573,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_25.png", "kind": "image", "metadata": "", @@ -626,7 +585,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_26.png", "kind": "image", "metadata": "", @@ -639,7 +597,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_27.png", "kind": "image", "metadata": "", @@ -652,7 +609,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_28.png", "kind": "image", "metadata": "", @@ -665,7 +621,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_29.png", "kind": "image", "metadata": "", @@ -678,7 +633,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_3.png", "kind": "image", "metadata": "", @@ -691,7 +645,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_30.png", "kind": "image", "metadata": "", @@ -704,7 +657,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_31.png", "kind": "image", "metadata": "", @@ -717,7 +669,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_32.png", "kind": "image", "metadata": "", @@ -730,7 +681,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_4.png", "kind": "image", "metadata": "", @@ -743,7 +693,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_5.png", "kind": "image", "metadata": "", @@ -756,7 +705,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_6.png", "kind": "image", "metadata": "", @@ -769,7 +717,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_7.png", "kind": "image", "metadata": "", @@ -782,7 +729,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_8.png", "kind": "image", "metadata": "", @@ -795,7 +741,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Captain_Idle_9.png", "kind": "image", "metadata": "", @@ -808,7 +753,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -821,7 +765,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -834,7 +777,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -847,7 +789,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -860,7 +801,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -873,7 +813,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -886,7 +825,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -899,7 +837,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -912,7 +849,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Purple Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -925,7 +861,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Orange Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -938,7 +873,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Orange Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -951,7 +885,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Orange Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -964,7 +897,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_1.png", "kind": "image", "metadata": "", @@ -977,7 +909,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_10.png", "kind": "image", "metadata": "", @@ -990,7 +921,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_11.png", "kind": "image", "metadata": "", @@ -1003,7 +933,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_12.png", "kind": "image", "metadata": "", @@ -1016,7 +945,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_13.png", "kind": "image", "metadata": "", @@ -1029,7 +957,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_14.png", "kind": "image", "metadata": "", @@ -1042,7 +969,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_15.png", "kind": "image", "metadata": "", @@ -1055,7 +981,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_16.png", "kind": "image", "metadata": "", @@ -1068,7 +993,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_17.png", "kind": "image", "metadata": "", @@ -1081,7 +1005,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_18.png", "kind": "image", "metadata": "", @@ -1094,7 +1017,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_19.png", "kind": "image", "metadata": "", @@ -1107,7 +1029,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_2.png", "kind": "image", "metadata": "", @@ -1120,7 +1041,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_3.png", "kind": "image", "metadata": "", @@ -1133,7 +1053,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_4.png", "kind": "image", "metadata": "", @@ -1146,7 +1065,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_5.png", "kind": "image", "metadata": "", @@ -1159,7 +1077,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_6.png", "kind": "image", "metadata": "", @@ -1172,7 +1089,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_7.png", "kind": "image", "metadata": "", @@ -1185,7 +1101,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_8.png", "kind": "image", "metadata": "", @@ -1198,7 +1113,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Red hero_Run_9.png", "kind": "image", "metadata": "", @@ -1214,7 +1128,7 @@ "file": "assets/Ranchers-Regular.ttf", "kind": "font", "metadata": "", - "name": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "name": "Ranchers-Regular.ttf", "userAdded": true, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Google Fonts/566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", @@ -1222,7 +1136,6 @@ } }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -1230,10 +1143,12 @@ "smoothed": true, "userAdded": true } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -1252,13 +1167,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, "zoomFactor": 0.5685425067868953, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -1604,7 +1522,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "ZombieBoy", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2362,7 +2279,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "0d91b7b0a2a8562a0172b4d5e9bf3d80340f866a030aa7a5f3baf6157840f1c3", "name": "RedHero", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -3388,7 +3304,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Gordon", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -3698,7 +3613,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Captain", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -4888,7 +4802,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "RubberDucktopus", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -4982,7 +4895,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "WhitePixel", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -5050,7 +4962,6 @@ "italic": false, "name": "GreenValue", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5064,6 +4975,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Green: 123", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -5072,7 +5005,6 @@ "italic": false, "name": "BlueValue", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5086,6 +5018,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Blue: 123", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -5094,7 +5048,6 @@ "italic": false, "name": "AlphaValue", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5108,6 +5061,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Alpha: 123", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -5116,7 +5091,6 @@ "italic": false, "name": "RedValue", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5130,13 +5104,34 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Red: 123", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "0;0;0" } }, { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "HoverColor", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -5180,7 +5175,6 @@ "italic": false, "name": "Instructions", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5200,13 +5194,35 @@ ], "behaviors": [], "string": "Click on an object to crumble it", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "font": "Ranchers-Regular.ttf", "textAlignment": "center", "characterSize": 25, "color": { "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Click on an object to crumble it", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5215,7 +5231,6 @@ "italic": false, "name": "Instructions2", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -5235,20 +5250,41 @@ ], "behaviors": [], "string": "\nOutline color matches mouse position", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "font": "Ranchers-Regular.ttf", "textAlignment": "center", "characterSize": 25, "color": { "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "\nOutline color matches mouse position", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } }, { "assetStoreId": "", "height": 128, "name": "WallForBlueFloor", - "tags": "", "texture": "tiled_Wall for Blue Floor.png", "type": "TiledSpriteObject::TiledSprite", "width": 128, @@ -5286,26 +5322,46 @@ "italic": false, "name": "Title", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "Extension: Object slicer", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "font": "Ranchers-Regular.ttf", "textAlignment": "", "characterSize": 50, "color": { "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Extension: Object slicer", + "font": "Ranchers-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 50, + "lineHeight": 0, + "color": "255;255;255" } }, { "assetStoreId": "", "name": "SliderHorizontalSlices", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -5341,24 +5397,23 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", "name": "SliderVerticalSlices", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -5394,19 +5449,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true, - "antialiasing": "none" + "b": 0 + } }, { "assetStoreId": "", @@ -5414,20 +5469,41 @@ "italic": false, "name": "HorizontalStrips", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "Horizontal slices: 123", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "font": "Ranchers-Regular.ttf", "textAlignment": "", "characterSize": 25, "color": { "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Horizontal slices: 123", + "font": "Ranchers-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5436,27 +5512,49 @@ "italic": false, "name": "VerticalStrips", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "Vertical slices: 123", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", + "font": "Ranchers-Regular.ttf", "textAlignment": "", "characterSize": 25, "color": { "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Vertical slices: 123", + "font": "Ranchers-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 25, + "lineHeight": 0, + "color": "255;255;255" } }, { "assetStoreId": "b6e192c68f93de7846e94964878d4edf7b8071a1e295788658c044e70aff7543", "name": "Explode_Button", - "tags": "", + "persistentUuid": "f5302489-88f9-44c3-bc46-d8fc9ee91a36", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Red Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -5466,61 +5564,16 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Red Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Red Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Explode", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Red Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } + "HoveredFadeOutDuration": 0.2, + "LabelText": "Explode" } }, { "assetStoreId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", "name": "Transporter_Button", - "tags": "", + "persistentUuid": "c9d194b5-bac0-4d86-973c-12a8af27617a", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -5530,61 +5583,16 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Transporter", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } + "HoveredFadeOutDuration": 0.2, + "LabelText": "Transporter" } }, { "assetStoreId": "3699f3a9dbcacb430dfb90834c239c60a0324b631635c6658396cd524c7adb0a", "name": "OutAndBack_Button", - "tags": "", + "persistentUuid": "b2c5b673-6a05-486d-a9c6-332f6c24b2bc", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Purple Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -5594,61 +5602,16 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Out and Back", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Purple Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } + "HoveredFadeOutDuration": 0.2, + "LabelText": "Out and Back" } }, { "assetStoreId": "a0b220a4d2b5cc644055848ff63b0f56c2685517bf870112832c9ab4b65aaa2f", "name": "Crumble_Button", - "tags": "", + "persistentUuid": "836d2dd7-834d-4981-95f4-79d1669041af", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Orange Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -5658,57 +5621,85 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Orange Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Orange Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Crumble", - "font": "566a014b24b13d8f73118f13a7105778225c22c95127a8f1d5c3e996ff0768de_Ranchers-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Orange Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } + "HoveredFadeOutDuration": 0.2, + "LabelText": "Crumble" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "ZombieBoy" + }, + { + "objectName": "RedHero" + }, + { + "objectName": "Gordon" + }, + { + "objectName": "Captain" + }, + { + "objectName": "RubberDucktopus" + }, + { + "objectName": "WhitePixel" + }, + { + "objectName": "GreenValue" + }, + { + "objectName": "BlueValue" + }, + { + "objectName": "AlphaValue" + }, + { + "objectName": "RedValue" + }, + { + "objectName": "HoverColor" + }, + { + "objectName": "Instructions" + }, + { + "objectName": "Instructions2" + }, + { + "objectName": "WallForBlueFloor" + }, + { + "objectName": "Title" + }, + { + "objectName": "SliderHorizontalSlices" + }, + { + "objectName": "SliderVerticalSlices" + }, + { + "objectName": "HorizontalStrips" + }, + { + "objectName": "VerticalStrips" + }, + { + "objectName": "Explode_Button" + }, + { + "objectName": "Transporter_Button" + }, + { + "objectName": "OutAndBack_Button" + }, + { + "objectName": "Crumble_Button" + } + ] + }, "events": [ { "colorB": 224, @@ -6910,9 +6901,11 @@ "ambientLightColorB": 0, "ambientLightColorG": -2147483360, "ambientLightColorR": 158, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -6937,9 +6930,11 @@ "ambientLightColorB": 8342408, "ambientLightColorG": 6043328, "ambientLightColorR": 8808784, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -6966,9 +6961,11 @@ "ambientLightColorB": 134217728, "ambientLightColorG": 6026736, "ambientLightColorR": 12105000, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -6980,10 +6977,26 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, { "name": "DraggableSliderControl", "type": "DraggableSliderControl::DraggableSliderControl" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, { "name": "Physics2", "type": "Physics2::Physics2Behavior", @@ -6991,6 +7004,18 @@ "gravityY": 9.8, "scaleX": 100, "scaleY": 100 + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] } @@ -7002,14 +7027,15 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", - "helpPath": "", + "gdevelopVersion": ">=5.5.230", + "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", "shortDescription": "A button that can be customized.", - "version": "1.2.0", + "version": "2.1.1", "description": [ - "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." ], @@ -7024,20 +7050,29 @@ "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { - "fullName": "Any touch pressed", + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", "functionType": "Condition", - "name": "AnyTouchPressed", + "name": "IsInGameEdition", "private": true, - "sentence": "Any touch is pressed", + "sentence": "Events are running for the editor", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "eventsFunctionContext.returnValue = runtimeScene.getGame().getInputManager()._touches.firstKey() !== null;", - "" + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" ], "parameterObjects": "", "useStrict": true, @@ -7062,24 +7097,13 @@ "name": "doStepPostEvents", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "We don't use the touch capability condition because the device could have both touch and cursor." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::AnyTouchPressed" + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, "parameters": [ "", @@ -7087,405 +7111,355 @@ ] } ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::AnyTouchPressed" - }, - "parameters": [ - "", - "" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::ShouldCheckMousePosition" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - }, - { - "type": { - "value": "SourisSurObjet" + "value": "StringVariable" }, "parameters": [ - "Object", - "", - "no", - "" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "yes" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchStarted" - }, - "parameters": [ - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Ignore mouse events when a touch is active because the mouse is probably an echo of touch events.\nThe mouse press could be a touch that has not the right TouchId." + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "MouseButtonPressed" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -7493,137 +7467,20 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::AnyTouchPressed" + "value": "BooleanVariable" }, "parameters": [ - "", + "MouseIsInside", + "True", "" ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The trigger once must be before the state condition to detect a new press." }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -7632,11 +7489,10 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -7648,89 +7504,34 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "MouseIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"PressedOutside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"PressedInside\"" + "\"Hovered\"" ] } ] @@ -7741,100 +7542,20 @@ { "type": { "inverted": true, - "value": "MouseButtonPressed" + "value": "BooleanVariable" }, "parameters": [ - "", - "Left" + "TouchIsInside", + "True", + "" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Ignore mouse events when a touch is active because the mouse is probably an echo of touch events.\nThe mouse release could be a touch release that has not the right TouchId." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "MouseButtonReleased" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::AnyTouchPressed" - }, - "parameters": [ - "", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -7843,13 +7564,12 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -7859,150 +7579,239 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "HasTouchEnded" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "", + "TouchId" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "\"Validated\"" + "0" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "events": [ { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } ] }, { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] } ], "parameters": [ @@ -8032,11 +7841,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -8081,11 +7889,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -8130,11 +7937,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8179,11 +7985,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -8205,11 +8010,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -8254,11 +8058,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -8303,11 +8106,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -8341,66 +8143,30 @@ "objectGroups": [] }, { - "fullName": "Should check mouse position", - "functionType": "Condition", - "name": "ShouldCheckMousePosition", - "private": true, - "sentence": "_PARAM0_ should check mouse position", + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Using a function avoid the OR to unselect Object when the property is not set." - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "MouseButtonPressed" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, "parameters": [ - "True" + "TouchId" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -8423,8 +8189,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -8432,14 +8196,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -8448,9 +8225,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -8458,9 +8232,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -8468,9 +8239,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -8478,9 +8246,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -8490,28 +8255,332 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Button", "description": "A button that can be customized.", - "fullName": "Panel sprite button", + "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -8523,7 +8592,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -8535,7 +8604,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -8543,14 +8612,24 @@ }, { "type": { - "value": "Create" + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "", "Pressed", - "0", - "0", - "" + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { @@ -8578,63 +8657,26 @@ "=", "1" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Pressed", "=", - "2" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -8673,18 +8715,47 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ "Object", + "=", + "PressedLabelOffsetY", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -8746,12 +8817,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8786,10 +8858,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -8798,7 +8870,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -8806,7 +8878,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -8817,10 +8889,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -8844,10 +8916,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -8864,10 +8937,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -8896,12 +8970,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -8941,10 +9016,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -8973,12 +9049,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { @@ -9030,12 +9107,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -9067,137 +9145,1474 @@ } ], "parameters": [] - }, + } + ], + "parameters": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." - }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsClicked" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsHovered" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsFocused" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsPressed" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change the text of the button label.", + "fullName": "Label text", + "functionType": "Action", + "name": "SetLabelText", + "private": true, + "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Text", + "name": "Value", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Labels.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", + "functionType": "Action", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Idle", + "ButtonFSM" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "LabelOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" ] } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" + }, + { + "value": "0.25", + "type": "Number", + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" + } + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Green Button With Stone Frame 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "f8a927cc-1139-440f-8a4e-bc8e56e322bf", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.0114942528735633, + "windowMask": false, + "selectedLayer": "" + } + }, + { + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Orange Button With Stone Frame 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } ], - "parameters": [] + "effects": [] } ], - "parameters": [ + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "1ce5beca-7282-43a1-b6cd-4bdecbce827f", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [ + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.0114942528735633, + "windowMask": false, + "selectedLayer": "" + } + }, + { + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Red Button With Stone Frame 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { "name": "Background", "objects": [ @@ -9211,443 +10626,1601 @@ "name": "Pressed" } ] - } - ] - }, - { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "Labels", + "objects": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsIdle" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] - } - ], - "actions": [ + "name": "Label" + }, { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "BitmapLabel" } ] } ], - "parameters": [ + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "f1940baa-4be1-489e-8fbc-d69709a0eba0", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.0114942528735633, + "windowMask": false, + "selectedLayer": "" + } }, { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", - "events": [ + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Purple Button With Stone Frame 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "Ranchers-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsClicked" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" } ] } ], - "parameters": [ + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "74b3bb84-0bdf-4e85-a321-8b5462c65e1e", + "width": 283, + "x": 32, + "y": 51, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.0114942528735633, + "windowMask": false, + "selectedLayer": "" + } }, { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", - "events": [ + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", + "assetStoreOriginalName": "Green Button With Stone Frame", + "name": "Green Button With Stone Frame", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsHovered" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" } ], - "actions": [ + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], - "objectGroups": [] - }, - { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", - "events": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "Background", + "objects": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsFocused" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" } - ], - "actions": [ + ] + }, + { + "name": "Labels", + "objects": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "Label" + }, + { + "name": "BitmapLabel" } ] } ], - "parameters": [ + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "f8a927cc-1139-440f-8a4e-bc8e56e322bf", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] + "editionSettings": [] }, { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", - "events": [ + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "b6e192c68f93de7846e94964878d4edf7b8071a1e295788658c044e70aff7543", + "assetStoreOriginalName": "Red Button With Stone Frame", + "name": "Red Button With Stone Frame", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::IsPressed" - }, - "parameters": [ - "Idle", - "ButtonFSM", - "" - ] + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" } ], - "actions": [ + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Change the text of the button label.", - "fullName": "Label text", - "functionType": "Action", - "name": "SetLabelText", - "sentence": "Change the text of _PARAM0_ to _PARAM1_", - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Label", - "=", - "GetArgumentAsString(\"LabelText\")" - ] + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false }, { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" - ] + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Red Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] }, { - "description": "", - "name": "LabelText", - "type": "string" + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], - "objectGroups": [] - }, - { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", - "sentence": "", - "events": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "Background", + "objects": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "Label.String()" - ] + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" } ] } ], - "expressionType": { - "type": "string" - }, - "parameters": [ + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "f1940baa-4be1-489e-8fbc-d69709a0eba0", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] + "editionSettings": [] }, { - "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", - "fullName": "", - "functionType": "Expression", - "name": "CenterWithPaddingY", - "private": true, - "sentence": "", - "events": [ + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "3699f3a9dbcacb430dfb90834c239c60a0324b631635c6658396cd524c7adb0a", + "assetStoreOriginalName": "Purple Button With Stone Frame", + "name": "Purple Button With Stone Frame", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } } ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Purple Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], - "objectGroups": [] - }, - { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", - "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", - "events": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "Background", + "objects": [ { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] + "name": "Idle" }, { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" - ] + "name": "Hovered" }, { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 60, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "74b3bb84-0bdf-4e85-a321-8b5462c65e1e", + "width": 283, + "x": 32, + "y": 51, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] + }, + { + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "a0b220a4d2b5cc644055848ff63b0f56c2685517bf870112832c9ab4b65aaa2f", + "assetStoreOriginalName": "Orange Button With Stone Frame", + "name": "Orange Button With Stone Frame", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ], - "events": [ + "string": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } } - ], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Orange Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], - "objectGroups": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { "name": "Background", "objects": [ @@ -9661,171 +12234,86 @@ "name": "Pressed" } ] - } - ] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "LeftPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "RightPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "TopPadding" - }, - { - "value": "0", - "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "BottomPadding" - }, - { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + }, { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "1ce5beca-7282-43a1-b6cd-4bdecbce827f", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + ], + "editionSettings": [] } ] } @@ -9836,6 +12324,7 @@ "category": "", "extensionNamespace": "", "fullName": "Checkbox", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNoZWNrYm94LW1hcmtlZCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMCwxN0w1LDEyTDYuNDEsMTAuNThMMTAsMTQuMTdMMTcuNTksNi41OEwxOSw4TTE5LDNINUMzLjg5LDMgMywzLjg5IDMsNVYxOUEyLDIgMCAwLDAgNSwyMUgxOUEyLDIgMCAwLDAgMjEsMTlWNUMyMSwzLjg5IDIwLjEsMyAxOSwzWiIgLz48L3N2Zz4=", "name": "Checkbox", @@ -9871,6 +12360,8 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -12812,59 +15303,41 @@ "value": "0", "type": "Boolean", "label": "Checked", - "description": "", "group": "Checkbox state", - "extraInformation": [], - "hidden": false, "name": "Checked" }, { "value": "", "type": "Number", "label": "Halo size (hover). If blank, this is set to \"SideLength\".", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloRadiusHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityHover" }, { "value": "128", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", "group": "Checkbox state", - "extraInformation": [], - "hidden": false, "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingPressed" }, @@ -12872,9 +15345,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -12882,9 +15352,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -12892,9 +15359,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -12902,9 +15366,6 @@ "value": "0.3", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -12912,9 +15373,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" }, @@ -12922,9 +15380,6 @@ "value": "", "type": "Boolean", "label": "State of the checkbox has changed. (Used in \"ToggleChecked\" function)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ToggleChanged" }, @@ -12932,60 +15387,42 @@ "value": " 24;119;211", "type": "Color", "label": "Primary color of checkbox. (Example: 24;119;211) Fill color when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "PrimaryColor" }, { "value": "255;255;255", "type": "Color", "label": "Secondary color of checkbox. (Example: 255;255;255) Color of checkmark when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "SecondaryColor" }, { "value": "24", "type": "Number", "label": "Length of each side (px) Minimum: 10", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "SideLength" }, { "value": "5", "type": "Number", "label": "Line width of checkmark (px) (Min: 1, Max: 1/4 * SideLength)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "LineWidth" }, { "value": "2", "type": "Number", "label": "Border thickness (px) This border is only visible when the checkbox is unchecked. ", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "BorderThickness" }, { "value": "", "type": "Number", "label": "Halo size (pressed). If blank, this is set to \"HaloRadiusHover * 1.1\"", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloRadiusPressed" } ], @@ -12999,6 +15436,7 @@ "category": "", "extensionNamespace": "", "fullName": "Sine (or ellipsis) Movement", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/extension-sinemovement-and-deptheffect", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNpbmUtd2F2ZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDIxQzEzLjUsMjEgMTIuMzEsMTYuNzYgMTEuMDUsMTIuMjhDMTAuMTQsOS4wNCA5LDUgNy41LDVDNC4xMSw1IDQsMTEuOTMgNCwxMkgyQzIsMTEuNjMgMi4wNiwzIDcuNSwzQzEwLjUsMyAxMS43MSw3LjI1IDEyLjk3LDExLjc0QzEzLjgzLDE0LjggMTUsMTkgMTYuNSwxOUMxOS45NCwxOSAyMC4wMywxMi4wNyAyMC4wMywxMkgyMi4wM0MyMi4wMywxMi4zNyAyMS45NywyMSAxNi41LDIxWiIgLz48L3N2Zz4=", "name": "SineMovement", @@ -13040,6 +15478,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -13894,69 +16334,42 @@ "value": "60", "type": "Number", "label": "Horizontal speed, in degrees per second", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "HorizontalSpeed" }, { "value": "60", "type": "Number", "label": "Vertical speed, in degrees per second", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "VerticalSpeed" }, { "value": "100", "type": "Number", "label": "Horizontal distance: amplitude of the movement on X axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "HorizontalDistance" }, { "value": "0", "type": "Number", "label": "Vertical distance: amplitude of the movement on Y axis (0 to deactivate)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "VerticalDistance" }, { "value": "0", "type": "Number", "label": "Center of movement, X position", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "CenterPointX" }, { "value": "0", "type": "Number", "label": "Center of movement, Y position", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "CenterPointY" }, { "value": "0", "type": "Number", "label": "Counter used to change X position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SineProgressX" }, @@ -13964,9 +16377,6 @@ "value": "0", "type": "Number", "label": "Counter used to change Y position", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "SineProgressY" } @@ -13981,6 +16391,7 @@ "category": "", "extensionNamespace": "", "fullName": "Find the center of a group of objects", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWRvdHMtZ3JpZCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiAxNkMxMy4xIDE2IDE0IDE2LjkgMTQgMThTMTMuMSAyMCAxMiAyMCAxMCAxOS4xIDEwIDE4IDEwLjkgMTYgMTIgMTZNMTIgMTBDMTMuMSAxMCAxNCAxMC45IDE0IDEyUzEzLjEgMTQgMTIgMTQgMTAgMTMuMSAxMCAxMiAxMC45IDEwIDEyIDEwTTEyIDRDMTMuMSA0IDE0IDQuOSAxNCA2UzEzLjEgOCAxMiA4IDEwIDcuMSAxMCA2IDEwLjkgNCAxMiA0TTYgMTZDNy4xIDE2IDggMTYuOSA4IDE4UzcuMSAyMCA2IDIwIDQgMTkuMSA0IDE4IDQuOSAxNiA2IDE2TTYgMTBDNy4xIDEwIDggMTAuOSA4IDEyUzcuMSAxNCA2IDE0IDQgMTMuMSA0IDEyIDQuOSAxMCA2IDEwTTYgNEM3LjEgNCA4IDQuOSA4IDZTNy4xIDggNiA4IDQgNy4xIDQgNiA0LjkgNCA2IDRNMTggMTZDMTkuMSAxNiAyMCAxNi45IDIwIDE4UzE5LjEgMjAgMTggMjAgMTYgMTkuMSAxNiAxOCAxNi45IDE2IDE4IDE2TTE4IDEwQzE5LjEgMTAgMjAgMTAuOSAyMCAxMlMxOS4xIDE0IDE4IDE0IDE2IDEzLjEgMTYgMTIgMTYuOSAxMCAxOCAxME0xOCA0QzE5LjEgNCAyMCA0LjkgMjAgNlMxOS4xIDggMTggOCAxNiA3LjEgMTYgNiAxNi45IDQgMTggNFoiIC8+PC9zdmc+", "name": "FindCenterOfObjects", @@ -14000,6 +16411,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Center point of a group of objects (X)", @@ -14368,6 +16781,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Draggable slider", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "DraggableSliderControl", @@ -14410,6 +16824,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -18028,202 +20444,145 @@ "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ValueMin" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ValueMax" }, { "value": "0", "type": "Number", "label": "Tick spacing", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TickSpacing" }, { "value": "circle", "type": "Choice", "label": "Thumb shape", - "description": "", "group": "Thumb", - "extraInformation": [ - "circle", - "rectangle" + "choices": [ + { + "label": "circle", + "value": "circle" + }, + { + "label": "rectangle", + "value": "rectangle" + } ], - "hidden": false, "name": "ThumbShape" }, { "value": "20", "type": "Number", "label": "Thumb width", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbWidth" }, { "value": "20", "type": "Number", "label": "Thumb height", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbHeight" }, { "value": " 24;119;211", "type": "Color", "label": "Thumb Color", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbColor" }, { "value": "255", "type": "Number", "label": "Thumb opacity", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbOpacity" }, { "value": "200", "type": "Number", "label": "Track length", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "TrackLength" }, { "value": "4", "type": "Number", "label": "Track thickness", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "TrackThickness" }, { "value": "", "type": "String", "label": "Inactive track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "InactiveTrackColor" }, { "value": "96", "type": "Number", "label": "Inactive track opacity", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "InactiveTrackOpacity" }, { "value": " ", "type": "String", "label": "Active track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "ActiveTrackColor" }, { "value": "255", "type": "Number", "label": "Active track opacity", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "ActiveTrackOpacity" }, { "value": "24", "type": "Number", "label": "Halo size (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloRadius" }, { "value": "32", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Rounded track ends", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "RoundedTrack" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingDragged" }, @@ -18231,9 +20590,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Value" }, @@ -18241,9 +20597,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbOffset" }, @@ -18251,9 +20604,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -18261,9 +20611,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -18271,9 +20618,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseX" }, @@ -18281,9 +20625,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseY" }, @@ -18291,9 +20632,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -18301,9 +20639,6 @@ "value": "0.2", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -18311,9 +20646,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" } @@ -18328,6 +20660,7 @@ "category": "", "extensionNamespace": "", "fullName": "Repeat every X seconds", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJlcGVhdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNywxN0g3VjE0TDMsMThMNywyMlYxOUgxOVYxM0gxN003LDdIMTdWMTBMMjEsNkwxNywyVjVINVYxMUg3VjdaIiAvPjwvc3ZnPg==", "name": "RepeatEveryXSeconds", @@ -18343,6 +20676,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Triggers every X seconds.", @@ -18819,39 +21154,24 @@ "value": "MyTimer", "type": "String", "label": "The name of the timer to repeat", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TimerName" }, { "value": "1", "type": "Number", "label": "The time between each trigger (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TimerLength" }, { "value": "-1", "type": "Number", "label": "How many times should the timer trigger? -1 for forever.", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Limit" }, { "value": "0", "type": "Number", "label": "An internal counter", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Counter" } @@ -18866,6 +21186,7 @@ "category": "", "extensionNamespace": "", "fullName": "Explosion force", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/extension-explosion-force", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJvbWIiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuMjUsNkEzLjI1LDMuMjUgMCAwLDEgMTQuNSwyLjc1QTMuMjUsMy4yNSAwIDAsMSAxNy43NSw2QzE3Ljc1LDYuNDIgMTguMDgsNi43NSAxOC41LDYuNzVDMTguOTIsNi43NSAxOS4yNSw2LjQyIDE5LjI1LDZWNS4yNUgyMC43NVY2QTIuMjUsMi4yNSAwIDAsMSAxOC41LDguMjVBMi4yNSwyLjI1IDAgMCwxIDE2LjI1LDZBMS43NSwxLjc1IDAgMCwwIDE0LjUsNC4yNUExLjc1LDEuNzUgMCAwLDAgMTIuNzUsNkgxNFY3LjI5QzE2Ljg5LDguMTUgMTksMTAuODMgMTksMTRBNyw3IDAgMCwxIDEyLDIxQTcsNyAwIDAsMSA1LDE0QzUsMTAuODMgNy4xMSw4LjE1IDEwLDcuMjlWNkgxMS4yNU0yMiw2SDI0VjdIMjJWNk0xOSw0VjJIMjBWNEgxOU0yMC45MSw0LjM4TDIyLjMzLDIuOTZMMjMuMDQsMy42N0wyMS42Miw1LjA5TDIwLjkxLDQuMzhaIiAvPjwvc3ZnPg==", "name": "ExplosionForce", @@ -18900,6 +21221,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Simulate an explosion with physics forces on target objects", @@ -19118,6 +21441,7 @@ "category": "", "extensionNamespace": "", "fullName": "Create multiple copies of an object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdyaWQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAsNFY4SDE0VjRIMTBNMTYsNFY4SDIwVjRIMTZNMTYsMTBWMTRIMjBWMTBIMTZNMTYsMTZWMjBIMjBWMTZIMTZNMTQsMjBWMTZIMTBWMjBIMTRNOCwyMFYxNkg0VjIwSDhNOCwxNFYxMEg0VjE0SDhNOCw4VjRINFY4SDhNMTAsMTRIMTRWMTBIMTBWMTRNNCwySDIwQTIsMiAwIDAsMSAyMiw0VjIwQTIsMiAwIDAsMSAyMCwyMkg0QzIuOTIsMjIgMiwyMS4xIDIsMjBWNEEyLDIgMCAwLDEgNCwyWiIgLz48L3N2Zz4=", "name": "CreateMultipleCopiesOfObject", @@ -19151,6 +21475,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Create multiple copies of an object.\nSelect the object, choose the number of rows and columns, the spacing between rows and columns, the top left starting point, the layer to create the objects on, and the z-order of the objects.", @@ -19576,6 +21902,7 @@ "category": "", "extensionNamespace": "", "fullName": "âš™ DevToolkit", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "", "name": "DevToolkit", @@ -19586,6 +21913,8 @@ "tags": [], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "fullName": "", @@ -20318,6 +22647,7 @@ "category": "", "extensionNamespace": "", "fullName": "Read pixels", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggZD0iTTIzLDI4Yy0xLjEsMC0yLjEtMC43LTIuNS0xLjhjMC0wLjEsMC0wLjItMC4xLTAuMmgtOC45YzAsMC4xLDAsMC4yLTAuMSwwLjJDMTEuMSwyNy4zLDEwLjEsMjgsOSwyOGMtMC42LDAtMSwwLjQtMSwxDQoJczAuNCwxLDEsMWgxNGMwLjYsMCwxLTAuNCwxLTFTMjMuNiwyOCwyMywyOHoiLz4NCjxwYXRoIGQ9Ik0yNywzSDVDMy4zLDMsMiw0LjMsMiw2djE1YzAsMS43LDEuMywzLDMsM2g2LjloOC4xSDI3YzEuNywwLDMtMS4zLDMtM1Y2QzMwLDQuMywyOC43LDMsMjcsM3ogTTEwLjQsMTlsNC42LTQuNmwxLjMsMS4zDQoJYzAuNCwwLjQsMSwwLjQsMS40LDBsMC4yLTAuMmwzLDMuNUgxMC40eiBNMjMsMThjMCwwLjEsMCwwLjIsMCwwLjJsLTQuMi00LjlDMTguNiwxMy4xLDE4LjMsMTMsMTgsMTNjLTAuMywwLTAuNSwwLjEtMC43LDAuMw0KCUwxNywxMy42bC0xLjMtMS4zYy0wLjQtMC40LTEtMC40LTEuNCwwTDksMTcuNlY5YzAtMC42LDAuNC0xLDEtMWgxMmMwLjYsMCwxLDAuNCwxLDFWMTh6Ii8+DQo8L3N2Zz4NCg==", "name": "ReadPixels", @@ -20343,6 +22673,8 @@ ], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Return the alpha component of the pixel at the specified position.", @@ -20643,6 +22975,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Slice an object into pieces", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWtuaWZlIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIwLjYyLDJDMjMuOTcsNy42MSAxMi40NywyMC4xNSAxMi40NywyMC4xNUw5LjYsMTcuMjhMNC45MSwyMkwyLjc3LDE5Ljg2TDIwLjYyLDJaIiAvPjwvc3ZnPg==", "name": "ObjectSlicer", @@ -20667,6 +23000,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Slice an object into smaller pieces that match color of the original object. The new object should be a solid white color.", @@ -21477,6 +23812,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/orbiting-objects/orbiting-objects.json b/examples/orbiting-objects/orbiting-objects.json index 78956ccdb..22b347e95 100644 --- a/examples/orbiting-objects/orbiting-objects.json +++ b/examples/orbiting-objects/orbiting-objects.json @@ -1,13 +1,15 @@ { "firstLayout": "Elliptical Orbits", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "portrait", "packageName": "com.example.gamename", @@ -16,7 +18,6 @@ "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "", - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Extension: Orbiting Objects", "description": "Try the new elliptical orbit that modifies the Z-order or orbiting objects to make a 3D effect!", @@ -77,10 +78,20 @@ "placement": "bottom-left", "showWatermark": true }, - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], - "authorUsernames": ["VictrisGames"], - "categories": ["mini-games"], - "playableDevices": ["keyboard", "mobile"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "authorUsernames": [ + "VictrisGames" + ], + "categories": [ + "mini-games" + ], + "playableDevices": [ + "keyboard", + "mobile", + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -92,7 +103,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "assets/Transparent light joystick border.png", "kind": "image", "metadata": "", @@ -105,7 +115,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Transparent light joystick thumb.png", "kind": "image", "metadata": "", @@ -118,7 +127,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/GDevelop complete logo (classic).png", "kind": "image", "metadata": "", @@ -131,7 +139,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/GDevelop complete logo (white).png", "kind": "image", "metadata": "", @@ -144,7 +151,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/GDevelop G logo (white).png", "kind": "image", "metadata": "", @@ -160,7 +166,7 @@ "file": "assets/LakkiReddy-Regular.ttf", "kind": "font", "metadata": "", - "name": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "name": "LakkiReddy-Regular.ttf", "userAdded": true, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Open Font License/10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", @@ -168,7 +174,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Gas.png", "kind": "image", "metadata": "", @@ -181,7 +186,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Star_LargeNarrow.png", "kind": "image", "metadata": "", @@ -194,7 +198,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Star_LargeWide.png", "kind": "image", "metadata": "", @@ -207,7 +210,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Star_Medium.png", "kind": "image", "metadata": "", @@ -220,7 +222,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Star_Small.png", "kind": "image", "metadata": "", @@ -233,7 +234,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Small Plastic Green Round Slider Border.png", "kind": "image", "metadata": "", @@ -246,7 +246,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Transparent.png", "kind": "image", "metadata": "", @@ -259,7 +258,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Small Plastic Green Round Slider Thumb.png", "kind": "image", "metadata": "", @@ -272,7 +270,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Hovered.png", "kind": "image", "metadata": "", @@ -285,7 +282,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Idle.png", "kind": "image", "metadata": "", @@ -298,7 +294,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Green Button With Stone Frame_Pressed.png", "kind": "image", "metadata": "", @@ -311,7 +306,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_18.png", "kind": "image", "metadata": "", @@ -324,7 +318,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_102.png", "kind": "image", "metadata": "", @@ -337,7 +330,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_112.png", "kind": "image", "metadata": "", @@ -350,7 +342,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_122.png", "kind": "image", "metadata": "", @@ -363,7 +354,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_132.png", "kind": "image", "metadata": "", @@ -376,7 +366,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_142.png", "kind": "image", "metadata": "", @@ -389,7 +378,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_152.png", "kind": "image", "metadata": "", @@ -402,7 +390,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_162.png", "kind": "image", "metadata": "", @@ -415,7 +402,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_172.png", "kind": "image", "metadata": "", @@ -428,7 +414,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_22.png", "kind": "image", "metadata": "", @@ -441,7 +426,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_32.png", "kind": "image", "metadata": "", @@ -454,7 +438,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_42.png", "kind": "image", "metadata": "", @@ -467,7 +450,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_52.png", "kind": "image", "metadata": "", @@ -480,7 +462,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_62.png", "kind": "image", "metadata": "", @@ -493,7 +474,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_72.png", "kind": "image", "metadata": "", @@ -506,7 +486,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_82.png", "kind": "image", "metadata": "", @@ -519,7 +498,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Dead_92.png", "kind": "image", "metadata": "", @@ -532,7 +510,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_17.png", "kind": "image", "metadata": "", @@ -545,7 +522,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_102.png", "kind": "image", "metadata": "", @@ -558,7 +534,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_112.png", "kind": "image", "metadata": "", @@ -571,7 +546,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_122.png", "kind": "image", "metadata": "", @@ -584,7 +558,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_132.png", "kind": "image", "metadata": "", @@ -597,7 +570,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_142.png", "kind": "image", "metadata": "", @@ -610,7 +582,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_152.png", "kind": "image", "metadata": "", @@ -623,7 +594,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_162.png", "kind": "image", "metadata": "", @@ -636,7 +606,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_22.png", "kind": "image", "metadata": "", @@ -649,7 +618,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_32.png", "kind": "image", "metadata": "", @@ -662,7 +630,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_42.png", "kind": "image", "metadata": "", @@ -675,7 +642,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_52.png", "kind": "image", "metadata": "", @@ -688,7 +654,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_62.png", "kind": "image", "metadata": "", @@ -701,7 +666,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_72.png", "kind": "image", "metadata": "", @@ -714,7 +678,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_82.png", "kind": "image", "metadata": "", @@ -727,7 +690,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Idle_92.png", "kind": "image", "metadata": "", @@ -740,7 +702,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_17.png", "kind": "image", "metadata": "", @@ -753,7 +714,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_102.png", "kind": "image", "metadata": "", @@ -766,7 +726,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_112.png", "kind": "image", "metadata": "", @@ -779,7 +738,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_122.png", "kind": "image", "metadata": "", @@ -792,7 +750,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_132.png", "kind": "image", "metadata": "", @@ -805,7 +762,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_142.png", "kind": "image", "metadata": "", @@ -818,7 +774,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_152.png", "kind": "image", "metadata": "", @@ -831,7 +786,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_162.png", "kind": "image", "metadata": "", @@ -844,7 +798,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_22.png", "kind": "image", "metadata": "", @@ -857,7 +810,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_32.png", "kind": "image", "metadata": "", @@ -870,7 +822,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_42.png", "kind": "image", "metadata": "", @@ -883,7 +834,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_52.png", "kind": "image", "metadata": "", @@ -896,7 +846,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_62.png", "kind": "image", "metadata": "", @@ -909,7 +858,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_72.png", "kind": "image", "metadata": "", @@ -922,7 +870,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_82.png", "kind": "image", "metadata": "", @@ -935,7 +882,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Jump_92.png", "kind": "image", "metadata": "", @@ -948,7 +894,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_12.png", "kind": "image", "metadata": "", @@ -961,7 +906,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_102.png", "kind": "image", "metadata": "", @@ -974,7 +918,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_112.png", "kind": "image", "metadata": "", @@ -987,7 +930,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_22.png", "kind": "image", "metadata": "", @@ -1000,7 +942,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_32.png", "kind": "image", "metadata": "", @@ -1013,7 +954,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_42.png", "kind": "image", "metadata": "", @@ -1026,7 +966,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_52.png", "kind": "image", "metadata": "", @@ -1039,7 +978,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_62.png", "kind": "image", "metadata": "", @@ -1052,7 +990,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_72.png", "kind": "image", "metadata": "", @@ -1065,7 +1002,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_82.png", "kind": "image", "metadata": "", @@ -1078,7 +1014,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Run_92.png", "kind": "image", "metadata": "", @@ -1091,7 +1026,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_12.png", "kind": "image", "metadata": "", @@ -1104,7 +1038,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_102.png", "kind": "image", "metadata": "", @@ -1117,7 +1050,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_112.png", "kind": "image", "metadata": "", @@ -1130,7 +1062,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_22.png", "kind": "image", "metadata": "", @@ -1143,7 +1074,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_32.png", "kind": "image", "metadata": "", @@ -1156,7 +1086,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_42.png", "kind": "image", "metadata": "", @@ -1169,7 +1098,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_52.png", "kind": "image", "metadata": "", @@ -1182,7 +1110,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_62.png", "kind": "image", "metadata": "", @@ -1195,7 +1122,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_72.png", "kind": "image", "metadata": "", @@ -1208,7 +1134,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_82.png", "kind": "image", "metadata": "", @@ -1221,7 +1146,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Slide_92.png", "kind": "image", "metadata": "", @@ -1234,7 +1158,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_14.png", "kind": "image", "metadata": "", @@ -1247,7 +1170,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_102.png", "kind": "image", "metadata": "", @@ -1260,7 +1182,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_112.png", "kind": "image", "metadata": "", @@ -1273,7 +1194,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_122.png", "kind": "image", "metadata": "", @@ -1286,7 +1206,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_132.png", "kind": "image", "metadata": "", @@ -1299,7 +1218,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_22.png", "kind": "image", "metadata": "", @@ -1312,7 +1230,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_32.png", "kind": "image", "metadata": "", @@ -1325,7 +1242,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_42.png", "kind": "image", "metadata": "", @@ -1338,7 +1254,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_52.png", "kind": "image", "metadata": "", @@ -1351,7 +1266,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_62.png", "kind": "image", "metadata": "", @@ -1364,7 +1278,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_72.png", "kind": "image", "metadata": "", @@ -1377,7 +1290,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_82.png", "kind": "image", "metadata": "", @@ -1390,7 +1302,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Santa_Walk_92.png", "kind": "image", "metadata": "", @@ -1403,7 +1314,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_12.png", "kind": "image", "metadata": "", @@ -1416,7 +1326,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_22.png", "kind": "image", "metadata": "", @@ -1429,7 +1338,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_32.png", "kind": "image", "metadata": "", @@ -1442,7 +1350,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_42.png", "kind": "image", "metadata": "", @@ -1455,7 +1362,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_52.png", "kind": "image", "metadata": "", @@ -1468,7 +1374,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_62.png", "kind": "image", "metadata": "", @@ -1481,7 +1386,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_72.png", "kind": "image", "metadata": "", @@ -1494,7 +1398,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Dead_82.png", "kind": "image", "metadata": "", @@ -1507,7 +1410,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_12.png", "kind": "image", "metadata": "", @@ -1520,7 +1422,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_102.png", "kind": "image", "metadata": "", @@ -1533,7 +1434,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_22.png", "kind": "image", "metadata": "", @@ -1546,7 +1446,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_32.png", "kind": "image", "metadata": "", @@ -1559,7 +1458,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_42.png", "kind": "image", "metadata": "", @@ -1572,7 +1470,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_52.png", "kind": "image", "metadata": "", @@ -1585,7 +1482,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_62.png", "kind": "image", "metadata": "", @@ -1598,7 +1494,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_72.png", "kind": "image", "metadata": "", @@ -1611,7 +1506,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_82.png", "kind": "image", "metadata": "", @@ -1624,7 +1518,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Idle_92.png", "kind": "image", "metadata": "", @@ -1637,7 +1530,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_13.png", "kind": "image", "metadata": "", @@ -1650,7 +1542,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_102.png", "kind": "image", "metadata": "", @@ -1663,7 +1554,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_112.png", "kind": "image", "metadata": "", @@ -1676,7 +1566,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_122.png", "kind": "image", "metadata": "", @@ -1689,7 +1578,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_22.png", "kind": "image", "metadata": "", @@ -1702,7 +1590,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_32.png", "kind": "image", "metadata": "", @@ -1715,7 +1602,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_42.png", "kind": "image", "metadata": "", @@ -1728,7 +1614,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_52.png", "kind": "image", "metadata": "", @@ -1741,7 +1626,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_62.png", "kind": "image", "metadata": "", @@ -1754,7 +1638,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_72.png", "kind": "image", "metadata": "", @@ -1767,7 +1650,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_82.png", "kind": "image", "metadata": "", @@ -1780,7 +1662,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Jump_92.png", "kind": "image", "metadata": "", @@ -1793,7 +1674,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_12.png", "kind": "image", "metadata": "", @@ -1806,7 +1686,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_22.png", "kind": "image", "metadata": "", @@ -1819,7 +1698,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_32.png", "kind": "image", "metadata": "", @@ -1832,7 +1710,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_42.png", "kind": "image", "metadata": "", @@ -1845,7 +1722,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_52.png", "kind": "image", "metadata": "", @@ -1858,7 +1734,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_62.png", "kind": "image", "metadata": "", @@ -1871,7 +1746,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_72.png", "kind": "image", "metadata": "", @@ -1884,7 +1758,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Run_82.png", "kind": "image", "metadata": "", @@ -1897,7 +1770,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_12.png", "kind": "image", "metadata": "", @@ -1910,7 +1782,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_102.png", "kind": "image", "metadata": "", @@ -1923,7 +1794,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_22.png", "kind": "image", "metadata": "", @@ -1936,7 +1806,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_32.png", "kind": "image", "metadata": "", @@ -1949,7 +1818,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_42.png", "kind": "image", "metadata": "", @@ -1962,7 +1830,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_52.png", "kind": "image", "metadata": "", @@ -1975,7 +1842,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_62.png", "kind": "image", "metadata": "", @@ -1988,7 +1854,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_72.png", "kind": "image", "metadata": "", @@ -2001,7 +1866,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_82.png", "kind": "image", "metadata": "", @@ -2014,7 +1878,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Dino_Walk_92.png", "kind": "image", "metadata": "", @@ -2027,7 +1890,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Crystal2.png", "kind": "image", "metadata": "", @@ -2050,7 +1912,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "preview.png", "kind": "image", "metadata": "", @@ -2058,10 +1919,12 @@ "smoothed": true, "userAdded": false } - ], - "resourceFolders": [] + ] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [], "layouts": [ @@ -2080,13 +1943,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.44036845014237413, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -2296,14 +2162,15 @@ { "assetStoreId": "14597a6b9020c730f9fd07fdf2b0deaba2505f0c33fd78ccd2e982b5ecee350b", "name": "TransparentLightJoystick", - "tags": "", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", "variables": [], "effects": [], "behaviors": [], "content": {}, "childrenContent": { "Border": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -2338,6 +2205,7 @@ ] }, "Thumb": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -2379,7 +2247,6 @@ "italic": false, "name": "Text0", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2404,13 +2271,35 @@ } ], "string": "0", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 550, "color": { "b": 28, "g": 231, "r": 248 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "0", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 550, + "lineHeight": 0, + "color": "248;231;28" } }, { @@ -2419,7 +2308,6 @@ "italic": false, "name": "HorizontalSize_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2444,13 +2332,35 @@ } ], "string": "Width", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 50, "color": { "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Width", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 50, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2459,7 +2369,6 @@ "italic": false, "name": "Title_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2471,13 +2380,35 @@ } ], "string": "Orbiting Objects Extension\n(Elliptical orbit)", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 70, "color": { "b": 224, "g": 16, "r": 189 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Orbiting Objects Extension\n(Elliptical orbit)", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 70, + "lineHeight": 0, + "color": "189;16;224" } }, { @@ -2486,7 +2417,6 @@ "italic": false, "name": "VerticalSize_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2511,13 +2441,35 @@ } ], "string": "Height", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 50, "color": { "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Height", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 50, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2526,7 +2478,6 @@ "italic": false, "name": "Foreground_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2551,13 +2502,35 @@ } ], "string": "Foreground\nSide", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 40, "color": { "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Foreground\nSide", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2566,7 +2539,6 @@ "italic": false, "name": "Text2", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2591,13 +2563,35 @@ } ], "string": "2", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 300, "color": { "b": 28, "g": 231, "r": 248 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "2", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 300, + "lineHeight": 0, + "color": "248;231;28" } }, { @@ -2606,7 +2600,6 @@ "italic": false, "name": "Text3", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2631,13 +2624,35 @@ } ], "string": "3", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 300, "color": { "b": 28, "g": 231, "r": 248 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "3", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 300, + "lineHeight": 0, + "color": "248;231;28" } }, { @@ -2646,7 +2661,6 @@ "italic": false, "name": "JoystickChallenge_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -2658,19 +2672,41 @@ } ], "string": "#JoystickChallenge", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 80, "color": { "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "#JoystickChallenge", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 80, + "lineHeight": 0, + "color": "255;255;255" } }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "41720015614a457303209ae93ed21ff1ebc2c8d77a5341d7f033e88cde53fc4e", "name": "GdevelopCompleteLogoClassic", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2709,9 +2745,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "3c439a5142f6ea19bc70afbbcb66c824c55af7fac5f64b1b79ab603b68d70195", "name": "GdevelopCompleteLogoWhite", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2750,9 +2786,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "6e0bb6ed3d9b15390d252ea815ed2e0a3bc72036cb7efc1efcc7d72f3c7610f4", "name": "GdevelopGLogoWhite", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2799,6 +2835,7 @@ "emitterForceMax": 50, "emitterForceMin": 50, "flow": 200, + "jumpForwardInTimeOnCreation": 0, "maxParticleNb": 1000, "name": "Gas", "particleAlpha1": 100, @@ -2811,6 +2848,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 224, "particleBlue2": 255, + "particleColor1": "189;16;224", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 16, @@ -2826,7 +2865,6 @@ "rendererParam1": 1, "rendererParam2": 1, "rendererType": "Quad", - "tags": "", "tank": -1, "textureParticleName": "Gas.png", "type": "ParticleSystem::ParticleEmitter", @@ -2836,9 +2874,9 @@ "behaviors": [] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "574655a4565bd983af8f5dd98e0fd8cda3bd67cf929c00d3db317e898322e06b", "name": "Star", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2979,8 +3017,8 @@ { "assetStoreId": "05b0eb2d13ff37b70927d0184d4705e9c39c0b8fece7463127c4fe9eb65bb422", "name": "HorizontalSize_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Small Plastic Green Round Slider", "variables": [], "effects": [], "behaviors": [], @@ -2991,60 +3029,13 @@ "InitialValue": 50, "MinValue": 50, "MaxValue": 300 - }, - "childrenContent": { - "Background": { - "bottomMargin": 31, - "height": 63, - "leftMargin": 31, - "rightMargin": 31, - "texture": "Small Plastic Green Round Slider Border.png", - "tiled": false, - "topMargin": 31, - "width": 583 - }, - "FillBar": { - "bottomMargin": 0, - "height": 16, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Transparent.png", - "tiled": false, - "topMargin": 0, - "width": 16 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - "Thumb": { - "bottomMargin": 0, - "height": 59, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Small Plastic Green Round Slider Thumb.png", - "tiled": false, - "topMargin": 0, - "width": 63 - } } }, { "assetStoreId": "05b0eb2d13ff37b70927d0184d4705e9c39c0b8fece7463127c4fe9eb65bb422", "name": "VerticalSize_Slider", - "tags": "", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Small Plastic Green Round Slider", "variables": [], "effects": [], "behaviors": [], @@ -3055,60 +3046,14 @@ "MinValue": 50, "MaxValue": 300, "ShowLabelAtChanges": false - }, - "childrenContent": { - "Background": { - "bottomMargin": 31, - "height": 63, - "leftMargin": 31, - "rightMargin": 31, - "texture": "Small Plastic Green Round Slider Border.png", - "tiled": false, - "topMargin": 31, - "width": 583 - }, - "FillBar": { - "bottomMargin": 0, - "height": 16, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Transparent.png", - "tiled": false, - "topMargin": 0, - "width": 16 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 221, - "g": 221, - "r": 221 - } - }, - "Thumb": { - "bottomMargin": 0, - "height": 59, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Small Plastic Green Round Slider Thumb.png", - "tiled": false, - "topMargin": 0, - "width": 63 - } } }, { "assetStoreId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", "name": "ForegroundTop_Button", - "tags": "", + "persistentUuid": "3daac84e-badc-46d5-844f-118b9f2fe10b", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -3118,61 +3063,15 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Top", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } + "HoveredFadeOutDuration": 0.2, + "LabelText": "Top" } }, { "assetStoreId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", "name": "ForegroundBottom_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -3182,61 +3081,15 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Bottom", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } + "HoveredFadeOutDuration": 0.2, + "LabelText": "Bottom" } }, { "assetStoreId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", "name": "ForegroundLeft_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -3246,61 +3099,15 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Left", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } + "HoveredFadeOutDuration": 0.2, + "LabelText": "Left" } }, { "assetStoreId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", "name": "ForegroundRight_Button", - "tags": "", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green Button With Stone Frame 2", "variables": [], "effects": [], "behaviors": [], @@ -3310,57 +3117,76 @@ "PressedLabelOffsetY": 2, "BottomPadding": 0, "TopPadding": 0, - "HoveredFadeOutDuration": 0.2 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Hovered.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Idle": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Idle.png", - "tiled": false, - "topMargin": 0, - "width": 348 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Right", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": { - "b": 255, - "g": 255, - "r": 255 - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 102, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Green Button With Stone Frame_Pressed.png", - "tiled": false, - "topMargin": 0, - "width": 348 - } + "HoveredFadeOutDuration": 0.2, + "LabelText": "Right" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "TransparentLightJoystick" + }, + { + "objectName": "Text0" + }, + { + "objectName": "HorizontalSize_Text" + }, + { + "objectName": "Title_Text" + }, + { + "objectName": "VerticalSize_Text" + }, + { + "objectName": "Foreground_Text" + }, + { + "objectName": "Text2" + }, + { + "objectName": "Text3" + }, + { + "objectName": "JoystickChallenge_Text" + }, + { + "objectName": "GdevelopCompleteLogoClassic" + }, + { + "objectName": "GdevelopCompleteLogoWhite" + }, + { + "objectName": "GdevelopGLogoWhite" + }, + { + "objectName": "Gas" + }, + { + "objectName": "Star" + }, + { + "objectName": "HorizontalSize_Slider" + }, + { + "objectName": "VerticalSize_Slider" + }, + { + "objectName": "ForegroundTop_Button" + }, + { + "objectName": "ForegroundBottom_Button" + }, + { + "objectName": "ForegroundLeft_Button" + }, + { + "objectName": "ForegroundRight_Button" + } + ] + }, "events": [ { "colorB": 228, @@ -3379,7 +3205,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [], @@ -3392,25 +3220,41 @@ "type": { "value": "ParticleSystem::SetFlow" }, - "parameters": ["Gas", "=", "150"] + "parameters": [ + "Gas", + "=", + "150" + ] }, { "type": { "value": "ParticleSystem::EmitterForceMax" }, - "parameters": ["Gas", "=", "50"] + "parameters": [ + "Gas", + "=", + "50" + ] }, { "type": { "value": "ParticleSystem::EmitterForceMin" }, - "parameters": ["Gas", "=", "50"] + "parameters": [ + "Gas", + "=", + "50" + ] }, { "type": { "value": "ModVarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Bottom\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Bottom\"" + ] } ] }, @@ -3454,7 +3298,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": ["ForegroundTop_Button", ""] + "parameters": [ + "ForegroundTop_Button", + "" + ] } ], "actions": [ @@ -3462,7 +3309,11 @@ "type": { "value": "ModVarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Top\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Top\"" + ] } ] }, @@ -3473,7 +3324,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": ["ForegroundBottom_Button", ""] + "parameters": [ + "ForegroundBottom_Button", + "" + ] } ], "actions": [ @@ -3481,7 +3335,11 @@ "type": { "value": "ModVarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Bottom\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Bottom\"" + ] } ] }, @@ -3492,7 +3350,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": ["ForegroundLeft_Button", ""] + "parameters": [ + "ForegroundLeft_Button", + "" + ] } ], "actions": [ @@ -3500,7 +3361,11 @@ "type": { "value": "ModVarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Left\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Left\"" + ] } ] }, @@ -3511,7 +3376,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": ["ForegroundRight_Button", ""] + "parameters": [ + "ForegroundRight_Button", + "" + ] } ], "actions": [ @@ -3519,7 +3387,11 @@ "type": { "value": "ModVarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Right\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Right\"" + ] } ] }, @@ -3531,7 +3403,11 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetOpacity" }, - "parameters": ["Buttons", "=", "128"] + "parameters": [ + "Buttons", + "=", + "128" + ] } ] }, @@ -3542,7 +3418,11 @@ "type": { "value": "VarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Top\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Top\"" + ] } ], "actions": [ @@ -3550,7 +3430,11 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetOpacity" }, - "parameters": ["ForegroundTop_Button", "=", "255"] + "parameters": [ + "ForegroundTop_Button", + "=", + "255" + ] } ], "events": [ @@ -3569,13 +3453,23 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["HorizontalSize_Slider", "=", "300", ""] + "parameters": [ + "HorizontalSize_Slider", + "=", + "300", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["VerticalSize_Slider", "=", "75", ""] + "parameters": [ + "VerticalSize_Slider", + "=", + "75", + "" + ] } ] } @@ -3588,7 +3482,11 @@ "type": { "value": "VarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Bottom\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Bottom\"" + ] } ], "actions": [ @@ -3596,7 +3494,11 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetOpacity" }, - "parameters": ["ForegroundBottom_Button", "=", "255"] + "parameters": [ + "ForegroundBottom_Button", + "=", + "255" + ] } ], "events": [ @@ -3615,13 +3517,23 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["HorizontalSize_Slider", "=", "300", ""] + "parameters": [ + "HorizontalSize_Slider", + "=", + "300", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["VerticalSize_Slider", "=", "75", ""] + "parameters": [ + "VerticalSize_Slider", + "=", + "75", + "" + ] } ] } @@ -3634,7 +3546,11 @@ "type": { "value": "VarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Left\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Left\"" + ] } ], "actions": [ @@ -3642,7 +3558,11 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetOpacity" }, - "parameters": ["ForegroundLeft_Button", "=", "255"] + "parameters": [ + "ForegroundLeft_Button", + "=", + "255" + ] } ], "events": [ @@ -3661,13 +3581,23 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["HorizontalSize_Slider", "=", "75", ""] + "parameters": [ + "HorizontalSize_Slider", + "=", + "75", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["VerticalSize_Slider", "=", "300", ""] + "parameters": [ + "VerticalSize_Slider", + "=", + "300", + "" + ] } ] } @@ -3680,7 +3610,11 @@ "type": { "value": "VarSceneTxt" }, - "parameters": ["ForegroundSide", "=", "\"Right\""] + "parameters": [ + "ForegroundSide", + "=", + "\"Right\"" + ] } ], "actions": [ @@ -3688,7 +3622,11 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetOpacity" }, - "parameters": ["ForegroundRight_Button", "=", "255"] + "parameters": [ + "ForegroundRight_Button", + "=", + "255" + ] } ], "events": [ @@ -3707,13 +3645,23 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["HorizontalSize_Slider", "=", "75", ""] + "parameters": [ + "HorizontalSize_Slider", + "=", + "75", + "" + ] }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["VerticalSize_Slider", "=", "300", ""] + "parameters": [ + "VerticalSize_Slider", + "=", + "300", + "" + ] } ] } @@ -3765,9 +3713,16 @@ "ambientLightColorB": 10038552, "ambientLightColorG": 6067680, "ambientLightColorR": 9764888, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Background", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -3776,9 +3731,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 8065944, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -3796,9 +3758,37 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, { "name": "ShakeObject_PositionAngle", "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] }, @@ -3817,13 +3807,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 0.4986558268409531, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -4133,7 +4126,6 @@ { "assetStoreId": "", "name": "SpeedSlider", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4164,23 +4156,23 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "b": 0 + } }, { "assetStoreId": "", "name": "DistanceSlider", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4211,23 +4203,23 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "b": 0 + } }, { "assetStoreId": "", "name": "OffsetSlider", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4258,23 +4250,23 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "b": 0 + } }, { "assetStoreId": "", "name": "RotationSlider", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4305,23 +4297,23 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "b": 0 + } }, { "assetStoreId": "", "name": "QtySlider", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4352,18 +4344,19 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "b": 0 + } }, { "assetStoreId": "", @@ -4371,7 +4364,6 @@ "italic": false, "name": "OrbitDistance", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4385,6 +4377,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Distance: 100", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4393,7 +4407,6 @@ "italic": false, "name": "OrbitSpeed", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4407,6 +4420,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Speed: 100", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4415,7 +4450,6 @@ "italic": false, "name": "StartingOffset", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4429,6 +4463,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Offset: 123", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4437,7 +4493,6 @@ "italic": false, "name": "OrbitRotation", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4451,6 +4506,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Rotation: 10", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4459,7 +4536,6 @@ "italic": false, "name": "OrbitMode", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4473,6 +4549,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Only active during left-click?", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4481,7 +4579,6 @@ "italic": false, "name": "ResetAfterDeletionText", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4495,6 +4592,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Reset position after reducing quantity?", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4503,7 +4622,6 @@ "italic": false, "name": "RightClickInstructions", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4517,6 +4635,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Right-click to delete orbiting objects?", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4525,7 +4665,6 @@ "italic": false, "name": "Title", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4539,6 +4678,28 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Extension: Orbiting Objects", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 50, + "lineHeight": 0, + "color": "0;0;0" } }, { @@ -4547,7 +4708,6 @@ "italic": false, "name": "OrbitQuantity", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -4561,12 +4721,33 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Quantity: 10", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" } }, { "assetStoreId": "", "name": "RightClickDelete", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4600,23 +4781,23 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "b": 0 + } }, { "assetStoreId": "", "name": "ResetAfterDeletion", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4650,23 +4831,23 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "b": 0 + } }, { "assetStoreId": "", "name": "LeftClickAnimate", - "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], "effects": [], @@ -4700,23 +4881,24 @@ "fillOpacity": 255, "outlineSize": 1, "outlineOpacity": 255, + "absoluteCoordinates": false, + "clearBetweenFrames": true, + "antialiasing": "none", "fillColor": { - "b": 255, + "r": 255, "g": 255, - "r": 255 + "b": 255 }, "outlineColor": { - "b": 0, + "r": 0, "g": 0, - "r": 0 - }, - "absoluteCoordinates": false, - "clearBetweenFrames": true + "b": 0 + } }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "69613f0acdefed2b5aeaeddc7eb0036d5f1926e97b87a7bae837f9c9c94222c9", "name": "Santa", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -6226,9 +6408,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "825abcfda20c825cd2876bd73588886607a2787c57000758522b5463e02cf577", "name": "Dino", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -7114,9 +7296,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "ea0d1ca2d62d7786253980d9f593997ffb33b29be81c75305b70ae109c37acc8", "name": "Crystal", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -7155,6 +7337,71 @@ ] } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "SpeedSlider" + }, + { + "objectName": "DistanceSlider" + }, + { + "objectName": "OffsetSlider" + }, + { + "objectName": "RotationSlider" + }, + { + "objectName": "QtySlider" + }, + { + "objectName": "OrbitDistance" + }, + { + "objectName": "OrbitSpeed" + }, + { + "objectName": "StartingOffset" + }, + { + "objectName": "OrbitRotation" + }, + { + "objectName": "OrbitMode" + }, + { + "objectName": "ResetAfterDeletionText" + }, + { + "objectName": "RightClickInstructions" + }, + { + "objectName": "Title" + }, + { + "objectName": "OrbitQuantity" + }, + { + "objectName": "RightClickDelete" + }, + { + "objectName": "ResetAfterDeletion" + }, + { + "objectName": "LeftClickAnimate" + }, + { + "objectName": "Santa" + }, + { + "objectName": "Dino" + }, + { + "objectName": "Crystal" + } + ] + }, "events": [ { "colorB": 228, @@ -7172,7 +7419,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [], @@ -7240,7 +7489,11 @@ "type": { "value": "SetGameResolutionSize" }, - "parameters": ["", "1280", "720"] + "parameters": [ + "", + "1280", + "720" + ] } ] } @@ -7410,8 +7663,7 @@ "textG": 0, "textR": 0 }, - "comment": "Animate orbiting objects only when left button is clicked on a Santa", - "comment2": "" + "comment": "Animate orbiting objects only when left button is clicked on a Santa" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7420,19 +7672,31 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["LeftClickAnimate", "ToggleSwitch", ""] + "parameters": [ + "LeftClickAnimate", + "ToggleSwitch", + "" + ] }, { "type": { "value": "MouseButtonPressed" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] }, { "type": { "value": "SourisSurObjet" }, - "parameters": ["Santa", "", "", ""] + "parameters": [ + "Santa", + "", + "", + "" + ] } ], "actions": [], @@ -7444,7 +7708,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["ResetAfterDeletion", "ToggleSwitch", ""] + "parameters": [ + "ResetAfterDeletion", + "ToggleSwitch", + "" + ] } ], "actions": [], @@ -7508,7 +7776,11 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["ResetAfterDeletion", "ToggleSwitch", ""] + "parameters": [ + "ResetAfterDeletion", + "ToggleSwitch", + "" + ] } ], "actions": [], @@ -7574,7 +7846,11 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["LeftClickAnimate", "ToggleSwitch", ""] + "parameters": [ + "LeftClickAnimate", + "ToggleSwitch", + "" + ] } ], "actions": [], @@ -7586,7 +7862,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["ResetAfterDeletion", "ToggleSwitch", ""] + "parameters": [ + "ResetAfterDeletion", + "ToggleSwitch", + "" + ] } ], "actions": [], @@ -7650,7 +7930,11 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["ResetAfterDeletion", "ToggleSwitch", ""] + "parameters": [ + "ResetAfterDeletion", + "ToggleSwitch", + "" + ] } ], "actions": [], @@ -7718,8 +8002,7 @@ "textG": 0, "textR": 0 }, - "comment": "Changing offset requires object quantity to change", - "comment2": "" + "comment": "Changing offset requires object quantity to change" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7728,13 +8011,20 @@ "type": { "value": "MouseButtonPressed" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] }, { "type": { "value": "DraggableSliderControl::DraggableSliderControl::IsBeingDragged" }, - "parameters": ["OffsetSlider", "DraggableSliderControl", ""] + "parameters": [ + "OffsetSlider", + "DraggableSliderControl", + "" + ] } ], "actions": [ @@ -7742,7 +8032,12 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetValue" }, - "parameters": ["QtySlider", "DraggableSliderControl", "0", ""] + "parameters": [ + "QtySlider", + "DraggableSliderControl", + "0", + "" + ] } ] }, @@ -7756,8 +8051,7 @@ "textG": 0, "textR": 0 }, - "comment": "Delete orbiting objects", - "comment2": "" + "comment": "Delete orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7766,7 +8060,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::IsChecked" }, - "parameters": ["RightClickDelete", "ToggleSwitch", ""] + "parameters": [ + "RightClickDelete", + "ToggleSwitch", + "" + ] } ], "actions": [], @@ -7778,7 +8076,10 @@ "type": { "value": "MouseButtonPressed" }, - "parameters": ["", "Right"] + "parameters": [ + "", + "Right" + ] }, { "type": { @@ -7790,7 +8091,12 @@ "type": { "value": "SourisSurObjet" }, - "parameters": ["Santa", "", "", ""] + "parameters": [ + "Santa", + "", + "", + "" + ] } ], "actions": [ @@ -7798,13 +8104,25 @@ "type": { "value": "OrbitingObjects::DeleteOrbitingObjects" }, - "parameters": ["", "Santa", "Crystal", "\"Crystals\"", ""] + "parameters": [ + "", + "Santa", + "Crystal", + "\"Crystals\"", + "" + ] }, { "type": { "value": "OrbitingObjects::DeleteOrbitingObjects" }, - "parameters": ["", "Santa", "Dino", "\"Dino2\"", ""] + "parameters": [ + "", + "Santa", + "Dino", + "\"Dino2\"", + "" + ] } ] } @@ -7819,9 +8137,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 0, "ambientLightColorR": 0, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -7840,13 +8165,37 @@ ], "behaviorsSharedData": [ { - "name": "Checkbox", - "type": "Checkbox::Checkbox" + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" }, { "name": "DraggableSliderControl", "type": "DraggableSliderControl::DraggableSliderControl" }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + }, { "name": "ToggleSwitch", "type": "ToggleSwitch::ToggleSwitch" @@ -7868,13 +8217,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.1, "snap": true, "zoomFactor": 0.311387517316283, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [], "variables": [], @@ -8021,14 +8373,15 @@ { "assetStoreId": "14597a6b9020c730f9fd07fdf2b0deaba2505f0c33fd78ccd2e982b5ecee350b", "name": "TransparentLightJoystick", - "tags": "", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", "variables": [], "effects": [], "behaviors": [], "content": {}, "childrenContent": { "Border": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -8063,6 +8416,7 @@ ] }, "Thumb": { + "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { @@ -8104,7 +8458,6 @@ "italic": false, "name": "Touches_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -8129,13 +8482,35 @@ } ], "string": "0", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 645, "color": { "b": 28, "g": 231, "r": 248 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "0", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 645, + "lineHeight": 0, + "color": "248;231;28" } }, { @@ -8144,7 +8519,6 @@ "italic": false, "name": "JoystickChallenge_Text", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -8156,19 +8530,41 @@ } ], "string": "#JoystickChallenge", - "font": "10a594780bf83286a06818d30b10a69366cbed3ffb9a9652bc688da7bc2be349_LakkiReddy-Regular.ttf", + "font": "LakkiReddy-Regular.ttf", "textAlignment": "center", "characterSize": 80, "color": { "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "#JoystickChallenge", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 80, + "lineHeight": 0, + "color": "255;255;255" } }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "41720015614a457303209ae93ed21ff1ebc2c8d77a5341d7f033e88cde53fc4e", "name": "GdevelopCompleteLogoClassic", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -8207,9 +8603,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "3c439a5142f6ea19bc70afbbcb66c824c55af7fac5f64b1b79ab603b68d70195", "name": "GdevelopCompleteLogoWhite", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -8248,9 +8644,9 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "6e0bb6ed3d9b15390d252ea815ed2e0a3bc72036cb7efc1efcc7d72f3c7610f4", "name": "GdevelopGLogoWhite", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -8297,6 +8693,7 @@ "emitterForceMax": 50, "emitterForceMin": 50, "flow": 100, + "jumpForwardInTimeOnCreation": 0, "maxParticleNb": 1000, "name": "Gas", "particleAlpha1": 100, @@ -8309,6 +8706,8 @@ "particleAngleRandomness2": 0, "particleBlue1": 224, "particleBlue2": 255, + "particleColor1": "189;16;224", + "particleColor2": "255;255;255", "particleGravityX": 0, "particleGravityY": 0, "particleGreen1": 16, @@ -8324,7 +8723,6 @@ "rendererParam1": 1, "rendererParam2": 1, "rendererType": "Quad", - "tags": "", "tank": -1, "textureParticleName": "Gas.png", "type": "ParticleSystem::ParticleEmitter", @@ -8334,9 +8732,9 @@ "behaviors": [] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "574655a4565bd983af8f5dd98e0fd8cda3bd67cf929c00d3db317e898322e06b", "name": "Star", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -8475,6 +8873,35 @@ ] } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "TransparentLightJoystick" + }, + { + "objectName": "Touches_Text" + }, + { + "objectName": "JoystickChallenge_Text" + }, + { + "objectName": "GdevelopCompleteLogoClassic" + }, + { + "objectName": "GdevelopCompleteLogoWhite" + }, + { + "objectName": "GdevelopGLogoWhite" + }, + { + "objectName": "Gas" + }, + { + "objectName": "Star" + } + ] + }, "events": [ { "colorB": 228, @@ -8492,7 +8919,9 @@ "type": { "value": "DepartScene" }, - "parameters": [""] + "parameters": [ + "" + ] } ], "actions": [ @@ -8500,7 +8929,11 @@ "type": { "value": "SetGameResolutionSize" }, - "parameters": ["", "720", "1280"] + "parameters": [ + "", + "720", + "1280" + ] } ] } @@ -8524,7 +8957,11 @@ "type": { "value": "ModVarScene" }, - "parameters": ["ActiveJoystickQty", "=", "0"] + "parameters": [ + "ActiveJoystickQty", + "=", + "0" + ] } ] }, @@ -8535,7 +8972,12 @@ "type": { "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::JoystickForce" }, - "parameters": ["TransparentLightJoystick", ">", "0.5", ""] + "parameters": [ + "TransparentLightJoystick", + ">", + "0.5", + "" + ] } ], "actions": [ @@ -8573,8 +9015,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start and stop music", - "comment2": "" + "comment": "Start and stop music" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8583,7 +9024,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "0"] + "parameters": [ + "ActiveJoystickQty", + "=", + "0" + ] } ], "actions": [ @@ -8591,7 +9036,10 @@ "type": { "value": "StopSoundCanal" }, - "parameters": ["", "1"] + "parameters": [ + "", + "1" + ] } ] }, @@ -8602,7 +9050,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", ">", "0"] + "parameters": [ + "ActiveJoystickQty", + ">", + "0" + ] }, { "type": { @@ -8637,8 +9089,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set volume", - "comment2": "" + "comment": "Set volume" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8647,7 +9098,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "1"] + "parameters": [ + "ActiveJoystickQty", + "=", + "1" + ] } ], "actions": [ @@ -8655,7 +9110,11 @@ "type": { "value": "ModGlobalVolume" }, - "parameters": ["", "=", "20"] + "parameters": [ + "", + "=", + "20" + ] } ] }, @@ -8666,7 +9125,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "2"] + "parameters": [ + "ActiveJoystickQty", + "=", + "2" + ] } ], "actions": [ @@ -8674,7 +9137,11 @@ "type": { "value": "ModGlobalVolume" }, - "parameters": ["", "=", "40"] + "parameters": [ + "", + "=", + "40" + ] } ] }, @@ -8685,7 +9152,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "3"] + "parameters": [ + "ActiveJoystickQty", + "=", + "3" + ] } ], "actions": [ @@ -8693,7 +9164,11 @@ "type": { "value": "ModGlobalVolume" }, - "parameters": ["", "=", "60"] + "parameters": [ + "", + "=", + "60" + ] } ] }, @@ -8704,7 +9179,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "4"] + "parameters": [ + "ActiveJoystickQty", + "=", + "4" + ] } ], "actions": [ @@ -8712,7 +9191,11 @@ "type": { "value": "ModGlobalVolume" }, - "parameters": ["", "=", "80"] + "parameters": [ + "", + "=", + "80" + ] } ] }, @@ -8723,7 +9206,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "5"] + "parameters": [ + "ActiveJoystickQty", + "=", + "5" + ] } ], "actions": [ @@ -8731,7 +9218,11 @@ "type": { "value": "ModGlobalVolume" }, - "parameters": ["", "=", "100"] + "parameters": [ + "", + "=", + "100" + ] } ] } @@ -8754,7 +9245,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "<", "5"] + "parameters": [ + "ActiveJoystickQty", + "<", + "5" + ] }, { "type": { @@ -8768,19 +9263,32 @@ "type": { "value": "ParticleSystem::EmitterForceMax" }, - "parameters": ["Gas", "=", "50"] + "parameters": [ + "Gas", + "=", + "50" + ] }, { "type": { "value": "ParticleSystem::EmitterForceMin" }, - "parameters": ["Gas", "=", "50"] + "parameters": [ + "Gas", + "=", + "50" + ] }, { "type": { "value": "OrbitingObjects::DeleteOrbitingObjects" }, - "parameters": ["", "Gas", "Star", ""] + "parameters": [ + "", + "Gas", + "Star", + "" + ] } ] }, @@ -8791,7 +9299,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "5"] + "parameters": [ + "ActiveJoystickQty", + "=", + "5" + ] } ], "actions": [ @@ -8831,13 +9343,21 @@ "type": { "value": "ParticleSystem::EmitterForceMax" }, - "parameters": ["Gas", "=", "1000"] + "parameters": [ + "Gas", + "=", + "1000" + ] }, { "type": { "value": "ParticleSystem::EmitterForceMin" }, - "parameters": ["Gas", "=", "1000"] + "parameters": [ + "Gas", + "=", + "1000" + ] } ] } @@ -8850,7 +9370,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", "=", "0"] + "parameters": [ + "ActiveJoystickQty", + "=", + "0" + ] }, { "type": { @@ -8864,13 +9388,21 @@ "type": { "value": "TextObject::String" }, - "parameters": ["Touches_Text", "=", "\"0\""] + "parameters": [ + "Touches_Text", + "=", + "\"0\"" + ] }, { "type": { "value": "ParticleSystem::SetFlow" }, - "parameters": ["Gas", "=", "10"] + "parameters": [ + "Gas", + "=", + "10" + ] } ] }, @@ -8884,8 +9416,7 @@ "textG": 0, "textR": 0 }, - "comment": "Shake and flow based on number of active joysticks", - "comment2": "" + "comment": "Shake and flow based on number of active joysticks" }, { "type": "BuiltinCommonInstructions::Standard", @@ -8894,7 +9425,11 @@ "type": { "value": "VarScene" }, - "parameters": ["ActiveJoystickQty", ">", "0"] + "parameters": [ + "ActiveJoystickQty", + ">", + "0" + ] } ], "actions": [ @@ -8918,7 +9453,11 @@ "type": { "value": "ParticleSystem::SetFlow" }, - "parameters": ["Gas", "=", "50 * Variable(ActiveJoystickQty)"] + "parameters": [ + "Gas", + "=", + "50 * Variable(ActiveJoystickQty)" + ] }, { "type": { @@ -8941,9 +9480,16 @@ "ambientLightColorB": 10038552, "ambientLightColorG": 6067680, "ambientLightColorR": 9764888, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Background", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -8952,9 +9498,16 @@ "ambientLightColorB": 0, "ambientLightColorG": 8065944, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -8972,9 +9525,37 @@ } ], "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, { "name": "ShakeObject_PositionAngle", "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] } @@ -8986,6 +9567,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Toggle switch (for Shape Painter)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjIsMUgxMEM2LjEsMSwzLDQuMSwzLDhzMy4xLDcsNyw3aDEyYzMuOSwwLDctMy4xLDctN1MyNS45LDEsMjIsMXogTTIyLDEyYy0yLjIsMC00LTEuOC00LTRzMS44LTQsNC00czQsMS44LDQsNA0KCVMyNC4yLDEyLDIyLDEyeiIvPg0KPHBhdGggZD0iTTIyLDE3SDEwYy0zLjksMC03LDMuMS03LDdzMy4xLDcsNyw3aDEyYzMuOSwwLDctMy4xLDctN1MyNS45LDE3LDIyLDE3eiBNMTAsMjhjLTIuMiwwLTQtMS44LTQtNHMxLjgtNCw0LTRzNCwxLjgsNCw0DQoJUzEyLjIsMjgsMTAsMjh6Ii8+DQo8L3N2Zz4NCg==", "name": "ToggleSwitch", @@ -9018,8 +9600,12 @@ "toggle", "switch" ], - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -9053,8 +9639,7 @@ "textG": 0, "textR": 0 }, - "comment": "Fix bad inputs that create malformed toggle switches", - "comment2": "" + "comment": "Fix bad inputs that create malformed toggle switches" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9211,8 +9796,7 @@ "textG": 0, "textR": 0 }, - "comment": "Animate the thumb to the right place", - "comment2": "" + "comment": "Animate the thumb to the right place" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9222,7 +9806,10 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9246,7 +9833,12 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyThumbOffset" }, - "parameters": ["Object", "Behavior", ">", "0.01"] + "parameters": [ + "Object", + "Behavior", + ">", + "0.01" + ] } ], "actions": [ @@ -9254,7 +9846,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -9267,7 +9863,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9304,7 +9903,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -9320,8 +9923,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect hover/touch/click (but only if the layer and object is visible, and the object is not already being dragged)", - "comment2": "" + "comment": "Detect hover/touch/click (but only if the layer and object is visible, and the object is not already being dragged)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9330,20 +9932,28 @@ "type": { "value": "LayerVisible" }, - "parameters": ["Object", "Object.Layer()"] + "parameters": [ + "Object", + "Object.Layer()" + ] }, { "type": { "value": "Visible" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] }, { "type": { "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyDisabled" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { @@ -9365,7 +9975,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9373,7 +9986,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyWasHovered" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -9385,7 +10002,10 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9393,7 +10013,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyWasHovered" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -9405,7 +10029,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyIsHovered" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -9466,7 +10094,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyIsHovered" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -9477,14 +10109,20 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyWasHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9492,7 +10130,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -9504,13 +10146,19 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyWasHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9518,7 +10166,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -9532,8 +10184,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect mouse clicks near track, start dragging", - "comment2": "" + "comment": "Detect mouse clicks near track, start dragging" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9542,7 +10193,10 @@ "type": { "value": "SourisBouton" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] }, { "type": { @@ -9560,7 +10214,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::IsHoveredOver" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -9568,7 +10226,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::ToggleChecked" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { @@ -9584,7 +10246,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyIsPressed" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -9602,8 +10268,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset scene variable", - "comment2": "" + "comment": "Reset scene variable" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9612,7 +10277,10 @@ "type": { "value": "MouseButtonReleased" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] } ], "actions": [ @@ -9630,7 +10298,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyIsPressed" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -9653,7 +10325,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyNeedRedaw" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -9661,13 +10336,19 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] }, { "type": { "value": "PrimitiveDrawing::Drawer::ClearShapes" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] } ], "events": [ @@ -9681,8 +10362,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set inactive track parameters (by default, use thumb color)", - "comment2": "" + "comment": "Set inactive track parameters (by default, use thumb color)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9691,7 +10371,12 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyInactiveTrackColor" }, - "parameters": ["Object", "Behavior", "=", "\"\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] } ], "actions": [ @@ -9714,7 +10399,12 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyInactiveTrackColor" }, - "parameters": ["Object", "Behavior", "=", "\"\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] } ], "actions": [ @@ -9747,7 +10437,11 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "Object", + "=", + "0" + ] } ] }, @@ -9761,8 +10455,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw half circle at end (optional)", - "comment2": "" + "comment": "Draw half circle at end (optional)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9795,8 +10488,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw inactive track", - "comment2": "" + "comment": "Draw inactive track" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9826,8 +10518,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set active track parameters (by default, use thumb color)", - "comment2": "" + "comment": "Set active track parameters (by default, use thumb color)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9836,7 +10527,12 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyActiveTrackColor" }, - "parameters": ["Object", "Behavior", "=", "\"\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] } ], "actions": [ @@ -9859,7 +10555,12 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyActiveTrackColor" }, - "parameters": ["Object", "Behavior", "=", "\"\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] } ], "actions": [ @@ -9900,8 +10601,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw half circle at end (optional)", - "comment2": "" + "comment": "Draw half circle at end (optional)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9934,8 +10634,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw active track", - "comment2": "" + "comment": "Draw active track" }, { "type": "BuiltinCommonInstructions::Standard", @@ -9965,8 +10664,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw halo when the mouse is hovering over thumb ", - "comment2": "" + "comment": "Draw halo when the mouse is hovering over thumb " }, { "type": "BuiltinCommonInstructions::Standard", @@ -9975,7 +10673,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -10002,70 +10703,12 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "0"] - }, - { - "type": { - "value": "PrimitiveDrawing::Circle" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyThumbOffset()", - "Object.Behavior::PropertyTrackHeight()/2", - "Object.Behavior::PropertyHaloRadius()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Use darker halo while being pressed", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ToggleSwitch::ToggleSwitch::PropertyIsPressed" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "Object", - "Object.Behavior::PropertyActiveThumbColor()" - ] - }, - { - "type": { - "value": "PrimitiveDrawing::FillOpacity" - }, "parameters": [ "Object", "=", - "Object.Behavior::PropertyHaloOpacityPressed()" + "0" ] }, - { - "type": { - "value": "PrimitiveDrawing::OutlineOpacity" - }, - "parameters": ["Object", "=", "0"] - }, { "type": { "value": "PrimitiveDrawing::Circle" @@ -10089,8 +10732,75 @@ "textG": 0, "textR": 0 }, - "comment": "Drop Shadow", - "comment2": "" + "comment": "Use darker halo while being pressed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ToggleSwitch::ToggleSwitch::PropertyIsPressed" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyActiveThumbColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyHaloOpacityPressed()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineOpacity" + }, + "parameters": [ + "Object", + "=", + "0" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "Object.Behavior::PropertyTrackHeight()/2", + "Object.Behavior::PropertyHaloRadius()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Drop Shadow" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10100,7 +10810,10 @@ "type": { "value": "PrimitiveDrawing::FillColor" }, - "parameters": ["Object", "\"50;50;93\""] + "parameters": [ + "Object", + "\"50;50;93\"" + ] }, { "type": { @@ -10139,7 +10852,10 @@ "type": { "value": "PrimitiveDrawing::FillColor" }, - "parameters": ["Object", "\"0;0;0\""] + "parameters": [ + "Object", + "\"0;0;0\"" + ] }, { "type": { @@ -10180,8 +10896,7 @@ "textG": 0, "textR": 0 }, - "comment": "Prepare thumb settings", - "comment2": "" + "comment": "Prepare thumb settings" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10191,13 +10906,21 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "128"] + "parameters": [ + "Object", + "=", + "128" + ] }, { "type": { "value": "PrimitiveDrawing::OutlineSize" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "Object", + "=", + "0" + ] }, { "type": { @@ -10218,7 +10941,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -10260,7 +10986,10 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -10304,8 +11033,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw Circle thumb", - "comment2": "" + "comment": "Draw Circle thumb" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10362,8 +11090,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure object doesn't get re-drawn every frame", - "comment2": "" + "comment": "Make sure object doesn't get re-drawn every frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10373,7 +11100,10 @@ "type": { "value": "PrimitiveDrawing::ClearBetweenFrames" }, - "parameters": ["Object", "no"] + "parameters": [ + "Object", + "no" + ] } ] } @@ -10420,7 +11150,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10472,7 +11206,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10524,7 +11262,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10576,7 +11318,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10628,7 +11374,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10680,7 +11430,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10732,7 +11486,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10784,7 +11542,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10836,7 +11598,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10888,7 +11654,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10940,7 +11710,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -10992,7 +11766,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11044,7 +11822,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11096,7 +11878,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11148,7 +11934,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11200,7 +11990,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11241,13 +12035,21 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] }, { "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyToggleChanged" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] }, @@ -11258,7 +12060,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -11266,13 +12071,21 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyChecked" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] }, { "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyToggleChanged" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -11284,14 +12097,20 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyToggleChanged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -11299,7 +12118,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyChecked" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11335,7 +12158,9 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": ["\"State\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ @@ -11343,7 +12168,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyDisabled" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -11354,7 +12183,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"State\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ @@ -11362,7 +12193,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyDisabled" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -11374,7 +12209,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11415,7 +12254,9 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": ["\"State\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ @@ -11423,7 +12264,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyChecked" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -11434,7 +12279,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"State\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ @@ -11442,7 +12289,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyChecked" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -11454,7 +12305,11 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::SetPropertyNeedRedaw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -11497,8 +12352,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set default result", - "comment2": "" + "comment": "Set default result" }, { "type": "BuiltinCommonInstructions::Standard", @@ -11508,7 +12362,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] }, @@ -11522,8 +12378,7 @@ "textG": 0, "textR": 0 }, - "comment": "Check position of mouse", - "comment2": "" + "comment": "Check position of mouse" }, { "type": "BuiltinCommonInstructions::Standard", @@ -11532,7 +12387,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -11540,7 +12398,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -11576,7 +12436,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTrackWidth()"] + "parameters": [ + "Object.Behavior::PropertyTrackWidth()" + ] } ] } @@ -11606,45 +12468,6 @@ "functionType": "Expression", "name": "TrackHeight", "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.Behavior::PropertyTrackHeight()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "ToggleSwitch::ToggleSwitch", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Offset (Y) of shadow on thumb.", - "fullName": "Offset (Y) of shadow on thumb", - "functionType": "Expression", - "name": "ThumbShadowOffsetY", - "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -11655,7 +12478,48 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyThumbShadowOffsetY()" + "Object.Behavior::PropertyTrackHeight()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ToggleSwitch::ToggleSwitch", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Offset (Y) of shadow on thumb.", + "fullName": "Offset (Y) of shadow on thumb", + "functionType": "Expression", + "name": "ThumbShadowOffsetY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyThumbShadowOffsetY()" ] } ] @@ -11777,7 +12641,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyThumbOpacity()"] + "parameters": [ + "Object.Behavior::PropertyThumbOpacity()" + ] } ] } @@ -11980,7 +12846,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyHaloRadius()"] + "parameters": [ + "Object.Behavior::PropertyHaloRadius()" + ] } ] } @@ -12141,7 +13009,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyDisabled" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -12149,7 +13020,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -12161,7 +13034,10 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyDisabled" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -12169,7 +13045,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] } @@ -12204,7 +13082,10 @@ "type": { "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -12212,7 +13093,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -12224,7 +13107,10 @@ "inverted": true, "value": "ToggleSwitch::ToggleSwitch::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -12232,7 +13118,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["False"] + "parameters": [ + "False" + ] } ] } @@ -12300,129 +13188,78 @@ "value": "10", "type": "Number", "label": "Radius of the thumb (px) Example: 10", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ThumbRadius" }, { "value": "24;119;211", "type": "String", "label": "Active thumb color string. Example: 24;119;211", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ActiveThumbColor" }, { "value": "255", "type": "Number", "label": "Opacity of the thumb. Example: 255", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ThumbOpacity" }, { "value": "20", "type": "Number", "label": "Width of the track (pixels) Example: 20", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TrackWidth" }, { "value": "14", "type": "Number", "label": "Height of the track (pixels) Example: 14", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TrackHeight" }, { "value": "150;150;150", "type": "String", "label": "Color string for the track that is RIGHT of the thumb. Example: 150;150;150 (Leave blank to use thumb color)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "InactiveTrackColor" }, { "value": "255", "type": "Number", "label": "Opacity of the track that is RIGHT of the thumb. Example: 255", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "InactiveTrackOpacity" }, { "value": "", "type": "String", "label": "Color string for the track that is LEFT of the thumb. Example: 24;119;211 (Leave blank to use thumb color)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ActiveTrackColor" }, { "value": "128", "type": "Number", "label": "Opacity of the track that is LEFT of the thumb. Example: 128", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ActiveTrackOpacity" }, { "value": "24", "type": "Number", "label": "Size of halo when the mouse hovers and clicks on the thumb. Example: 24", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "HaloRadius" }, { "value": "32", "type": "Number", "label": "Opacity of halo when the mouse hovers on the thumb. Example: 32", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityHover" }, { "value": "64", "type": "Number", "label": "Opacity of the halo that appears when the toggle switch is pressed. Example: 64", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityPressed" }, { "value": "0", "type": "Number", "label": "Number of pixels the thumb is from the left side of the track.", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbOffset" }, @@ -12430,29 +13267,18 @@ "value": "", "type": "Boolean", "label": "Checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Checked" }, { "value": "", "type": "Boolean", "label": "Disabled", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Disabled" }, { "value": "", "type": "Boolean", "label": "State has been changed (used in ToggleChecked function)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ToggleChanged" }, @@ -12460,19 +13286,12 @@ "value": "255;255;255", "type": "String", "label": "Inactive thumb color string. Example: 255;255;255", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "InactiveThumbColor" }, { "value": "", "type": "Boolean", "label": "Click or press has started on toggle switch", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsPressed" }, @@ -12480,39 +13299,24 @@ "value": "4", "type": "Number", "label": "Offset (Y) of shadow on thumb. Positive numbers move shadow down, negative numbers move shadow up. Example: 4", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ThumbShadowOffsetY" }, { "value": "0", "type": "Number", "label": "Offset (X) of shadow on thumb. Positive numbers move shadow right, negative numbers move shadow left. Example: 0", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ThumbShadowOffsetX" }, { "value": "32", "type": "Number", "label": "Opacity of shadow on thumb. Example: 32", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ThumbShadowOpacity" }, { "value": "true", "type": "Boolean", "label": "Need redraw", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedaw" }, @@ -12520,9 +13324,6 @@ "value": "", "type": "Boolean", "label": "Is hovered", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -12530,9 +13331,6 @@ "value": "", "type": "Boolean", "label": "Was hovered", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "WasHovered" } @@ -12543,228 +13341,131 @@ "eventsBasedObjects": [] }, { - "author": "", + "author": "Tristan Rhodes (https://victrisgames.itch.io/), D8H", "category": "User interface", "extensionNamespace": "", - "fullName": "Toggle switch", - "helpPath": "/objects/toggle-switch", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", - "name": "SpriteToggleSwitch", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", - "shortDescription": "Toggle switch that users can click or touch.", - "version": "1.2.2", + "fullName": "Checkbox (for Shape Painter)", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNoZWNrYm94LW1hcmtlZCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMCwxN0w1LDEyTDYuNDEsMTAuNThMMTAsMTQuMTdMMTcuNTksNi41OEwxOSw4TTE5LDNINUMzLjg5LDMgMywzLjg5IDMsNVYxOUEyLDIgMCAwLDAgNSwyMUgxOUEyLDIgMCAwLDAgMjEsMTlWNUMyMSwzLjg5IDIwLjEsMyAxOSwzWiIgLz48L3N2Zz4=", + "name": "Checkbox", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/checkbox-marked.svg", + "shortDescription": "Checkbox that can be toggled by a left-click or touch.", + "version": "0.1.1", "description": [ - "Toggle switch that users can click or touch. The switch can be customized with sprites.", + "Users can click on the checkbox to add and remove the checkmark. ", + "", + "How to use:", + "- Add this extension to a shape painter object", + "- Use condition \"Is checked\" to find out the state of the checkbox", "", - "There are ready-to-use toggle switches in the asset-store [settings UI pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=settings-ui-settings-ui)." + "Tips:", + "- Checkbox state can also be changed by an action.", + "- Checkbox can be disabled so that users cannot interact with it ", + "- To remove halo, Set \"halo hover\" and \"halo pressed\" opacity to 0" ], "origin": { - "identifier": "SpriteToggleSwitch", + "identifier": "Checkbox", "name": "gdevelop-extension-store" }, - "tags": ["ui", "widget", "toggle", "switch"], + "tags": [ + "checkbox", + "shape painter", + "ui", + "widget", + "toggle", + "switch" + ], "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", - "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "The finite state machine used internally by the switch object.", - "fullName": "Switch finite state machine", - "name": "SwitchFSM", - "objectType": "", - "private": true, + "description": "Checkbox that can be toggled by a left-click or touch.", + "fullName": "Checkbox", + "name": "Checkbox", + "objectType": "PrimitiveDrawing::Drawer", "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPreEvents", + "name": "onCreated", "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" - }, - "parameters": ["Object", "ButtonFSM", ""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" - }, - "parameters": ["Object", "Behavior", "no"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure object doesn't get re-drawn every frame" }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the toggle switch is checked.", - "fullName": "Is checked", - "functionType": "Condition", - "group": "Switch finite state machine configuration", - "name": "IsChecked", - "sentence": "_PARAM0_ is checked", - "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" - }, - "parameters": ["Object", "Behavior"] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "PrimitiveDrawing::ClearBetweenFrames" }, - "parameters": ["True"] + "parameters": [ + "Object", + "no" + ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check (or uncheck) the toggle switch.", - "fullName": "Check (or uncheck)", - "functionType": "Action", - "group": "Switch finite state machine configuration", - "name": "SetChecked", - "sentence": "Check _PARAM0_: _PARAM2_", - "events": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Start halo at same size as thumb" + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertySideLength()/2" + ] } ] }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + "value": "Checkbox::Checkbox::UpdateHitbox" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -12773,70 +13474,22 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "supplementaryInformation": "Checkbox::Checkbox", "type": "behavior" - }, - { - "defaultValue": "yes", - "description": "IsChecked", - "name": "Value", - "optional": true, - "type": "yesorno" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "Button finite state machine", - "description": "", - "group": "", - "extraInformation": ["SpriteToggleSwitch::ButtonFSM"], - "hidden": false, - "name": "ButtonFSM" }, - { - "value": "false", - "type": "Boolean", - "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "IsChecked" - }, - { - "value": "", - "type": "Boolean", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "WasChecked" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", - "private": true, - "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "doStepPreEvents", "sentence": "", "events": [ { @@ -12844,107 +13497,117 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Finite state machine", + "name": "Checkbox logic", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "Checkbox::Checkbox::IsEnabled" }, "parameters": [ "Object", "Behavior", - "=", - "\"Validated\"" + "" ] } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "actions": [], "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" + "value": "Checkbox::Checkbox::PropertyIsBeingPressed" }, "parameters": [ "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "Behavior" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Grow halo even more when pressed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyHaloRadiusPressed()" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "yes"] + "comment": "Detect press ending" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] } ] }, @@ -12958,85 +13621,55 @@ "textG": 0, "textR": 0 }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "comment": "Detect hover and touch/click" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - }, - { - "type": { - "value": "CollisionPoint" + "inverted": true, + "value": "Checkbox::Checkbox::PropertyIsBeingPressed" }, "parameters": [ "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "Behavior" ] } ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "actions": [], + "events": [ { - "type": { - "value": "HasAnyTouchOrMouseStarted" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [""] - } - ], - "actions": [ + "comment": "Detect mouse clicks near checkbox" + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisBouton" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], "actions": [], "events": [ { @@ -13044,225 +13677,321 @@ "conditions": [ { "type": { - "value": "CollisionPoint" + "value": "SourisX" }, "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + "", + ">", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisX" + }, + "parameters": [ + "", + "<", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + ">", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + "<", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" }, "parameters": [ "Object", "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + "yes" ] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, "parameters": [ "Object", "Behavior", "yes" ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyIndex" + "value": "Checkbox::Checkbox::ToggleChecked" }, "parameters": [ "Object", "Behavior", - "+", - "1" + "" ] } ] } ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior"] + "comment": "Reset hover detection " }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "comment": "Grow halo when hovered" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SourisBouton" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "SourisX" + }, + "parameters": [ + "", + ">", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisX" + }, + "parameters": [ + "", + "<", + "(Object.X() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + ">", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + }, + { + "type": { + "value": "SourisY" + }, + "parameters": [ + "", + "<", + "(Object.Y() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyHaloRadiusHover()" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "comment": "Shrink halo to zero when not hovered" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Checkbox::Checkbox::PropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertySideLength()/2" + ] + } ] } ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Redraw checkbox only when halo is not at final size" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "Egal" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "abs(Object.Behavior::PropertyCurrentHaloRadius() - Object.Behavior::PropertyTargetHaloRadius())", + "<", + "1" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" }, "parameters": [ "Object", "Behavior", "=", - "\"Hovered\"" + "Object.Behavior::PropertyTargetHaloRadius()" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] }, { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedOutside\"" + "yes" ] } ] @@ -13272,145 +14001,41 @@ "conditions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" }, "parameters": [ "Object", "Behavior", - "=", - "\"PressedOutside\"" + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" ] } ], "actions": [ { "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" }, "parameters": [ "Object", "Behavior", "=", - "\"PressedInside\"" + "lerp(Object.Behavior::PropertyCurrentHaloRadius(), Object.Behavior::PropertyTargetHaloRadius(), Object.Behavior::PropertyHaloGrowSpeed())" ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "HasTouchEnded" + "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "Object", + "Behavior", + "yes" ] } ] } - ], - "parameters": [] + ] } ], "parameters": [] @@ -13420,12 +14045,13 @@ { "description": "Object", "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", + "supplementaryInformation": "Checkbox::Checkbox", "type": "behavior" } ], @@ -13434,1945 +14060,46 @@ { "fullName": "", "functionType": "Action", - "name": "onDeActivate", + "name": "doStepPostEvents", "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - }, - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "sentence": "_PARAM0_ is idle", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "sentence": "_PARAM0_ is clicked", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "sentence": "_PARAM0_ is focused", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "_PARAM0_ is pressed", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button is currently being pressed outside with mouse or touch.", - "fullName": "Is held outside", - "functionType": "Condition", - "name": "IsPressedOutside", - "sentence": "_PARAM0_ is held outside", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "the touch id that is using the button or 0 if none.", - "fullName": "Touch id", - "functionType": "ExpressionAndCondition", - "name": "TouchId", - "sentence": "the touch id", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.Behavior::PropertyTouchId()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", - "type": "behavior" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" - }, - { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" - ], - "hidden": true, - "name": "State" - }, - { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" - }, - { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" - }, - { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" - }, - { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" - } - ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "defaultName": "ToggleSwitch", - "description": "A toggle switch that users can click or touch.", - "fullName": "Toggle switch", - "name": "SpriteToggleSwitch", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Create one background instance for of each state.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": ["", "State", "0", "0", ""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Pass the configuration to the behavior.\nThe PreviousIsChecked property allows to detect a change of \"intial value\" on hot reload.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" - }, - "parameters": ["Object"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" - }, - "parameters": ["State", "SwitchFSM", "", ""] - }, - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" - }, - "parameters": ["Object", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" - }, - "parameters": ["Object"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" - }, - "parameters": ["State", "SwitchFSM", "no", ""] - }, - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" - }, - "parameters": ["Object", ""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" - }, - "parameters": ["Object", ""] - }, - { - "type": { - "value": "ChangeSprite" - }, - "parameters": [ - "State", - "=", - "State.AnimationFrameCount() - 1" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] - }, - { - "fullName": "", - "functionType": "Action", - "name": "onHotReloading", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" - }, - "parameters": ["Object"] - }, - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" - }, - "parameters": ["Object", "SwitchFSM", ""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" - }, - "parameters": ["Object", "yes", "no"] - }, - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" - }, - "parameters": ["Object", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" - }, - "parameters": ["Object"] - }, - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" - }, - "parameters": ["Object", "SwitchFSM", ""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" - }, - "parameters": ["Object", "SwitchFSM", "no"] - }, - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" - }, - "parameters": ["Object", "no"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" - }, - "parameters": ["Object", ""] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the toggle switch is checked.", - "fullName": "Is checked", - "functionType": "Condition", - "name": "IsChecked", - "sentence": "_PARAM0_ is checked", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" - }, - "parameters": ["State", "SwitchFSM", ""] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check (or uncheck) the toggle switch.", - "fullName": "Check (or uncheck)", - "functionType": "Action", - "name": "SetChecked", - "sentence": "Check _PARAM0_: _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" - }, - "parameters": ["State", "SwitchFSM", "no", ""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"Value\""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" - }, - "parameters": ["State", "SwitchFSM", "yes", ""] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - }, - { - "defaultValue": "yes", - "description": "IsChecked", - "name": "Value", - "optional": true, - "type": "yesorno" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button is not used.", - "fullName": "Is idle", - "functionType": "Condition", - "name": "IsIdle", - "private": true, - "sentence": "_PARAM0_ is idle", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsIdle" - }, - "parameters": ["State", "ButtonFSM", ""] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button was just clicked.", - "fullName": "Is clicked", - "functionType": "Condition", - "name": "IsClicked", - "private": true, - "sentence": "_PARAM0_ is clicked", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" - }, - "parameters": ["State", "ButtonFSM", ""] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the cursor is hovered over the button.", - "fullName": "Is hovered", - "functionType": "Condition", - "name": "IsHovered", - "sentence": "_PARAM0_ is hovered", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsHovered" - }, - "parameters": ["State", "ButtonFSM", ""] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button is either hovered or pressed but not hovered.", - "fullName": "Is focused", - "functionType": "Condition", - "name": "IsFocused", - "private": true, - "sentence": "_PARAM0_ is focused", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsFocused" - }, - "parameters": ["State", "ButtonFSM", ""] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the button is currently being pressed with mouse or touch.", - "fullName": "Is pressed", - "functionType": "Condition", - "name": "IsPressed", - "private": true, - "sentence": "_PARAM0_ is pressed", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::ButtonFSM::IsPressed" - }, - "parameters": ["State", "ButtonFSM", ""] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Update the state animation.", - "fullName": "Update state animation", - "functionType": "Action", - "name": "UpdateStateAnimation", - "private": true, - "sentence": "Update the state animation of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" - }, - "parameters": ["Object", "ButtonFSM", ""] - }, - { - "type": { - "value": "AnimationName" - }, - "parameters": ["State", "\"Unchecked\""] - } - ], - "actions": [ - { - "type": { - "value": "SetAnimationName" - }, - "parameters": ["State", "\"Checked\""] - }, - { - "type": { - "value": "PlayAnimation" - }, - "parameters": ["State"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" - }, - "parameters": ["Object", "ButtonFSM", ""] - }, - { - "type": { - "value": "AnimationName" - }, - "parameters": ["State", "\"Checked\""] - } - ], - "actions": [ - { - "type": { - "value": "SetAnimationName" - }, - "parameters": ["State", "\"Unchecked\""] - }, - { - "type": { - "value": "PlayAnimation" - }, - "parameters": ["State"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "De/activate interactions with the button.", - "fullName": "De/activate interactions", - "functionType": "Action", - "name": "Activate", - "sentence": "Activate interactions with _PARAM0_: _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"ShouldActivate\""] - } - ], - "actions": [ - { - "type": { - "value": "ActivateBehavior" - }, - "parameters": ["State", "ButtonFSM", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" - }, - "parameters": ["\"ShouldActivate\""] - } - ], - "actions": [ - { - "type": { - "value": "ActivateBehavior" - }, - "parameters": ["State", "ButtonFSM", "no"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - }, - { - "description": "Activate", - "name": "ShouldActivate", - "type": "yesorno" - } - ], - "objectGroups": [] - }, - { - "description": "Check if interactions are activated on the button.", - "fullName": "Interactions activated", - "functionType": "Condition", - "name": "IsActivated", - "sentence": "Interactions on _PARAM0_ are activated", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": ["State", "ButtonFSM"] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", - "type": "object" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "Is checked", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "IsChecked" - }, - { - "value": "", - "type": "Boolean", - "label": "", - "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "PreviousIsChecked" - } - ], - "objects": [ - { - "assetStoreId": "", - "name": "State", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "SpriteToggleSwitch::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - }, - { - "name": "SwitchFSM", - "type": "SpriteToggleSwitch::SwitchFSM", - "ButtonFSM": "ButtonFSM", - "IsChecked": false, - "WasChecked": false - } - ], - "animations": [ - { - "name": "Unchecked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - }, - { - "name": "Checked", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] - } - ] - } - ] - }, - { - "author": "Tristan Rhodes (https://victrisgames.itch.io/), D8H", - "category": "User interface", - "extensionNamespace": "", - "fullName": "Checkbox (for Shape Painter)", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNoZWNrYm94LW1hcmtlZCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMCwxN0w1LDEyTDYuNDEsMTAuNThMMTAsMTQuMTdMMTcuNTksNi41OEwxOSw4TTE5LDNINUMzLjg5LDMgMywzLjg5IDMsNVYxOUEyLDIgMCAwLDAgNSwyMUgxOUEyLDIgMCAwLDAgMjEsMTlWNUMyMSwzLjg5IDIwLjEsMyAxOSwzWiIgLz48L3N2Zz4=", - "name": "Checkbox", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/checkbox-marked.svg", - "shortDescription": "Checkbox that can be toggled by a left-click or touch.", - "version": "0.1.1", - "description": [ - "Users can click on the checkbox to add and remove the checkmark. ", - "", - "How to use:", - "- Add this extension to a shape painter object", - "- Use condition \"Is checked\" to find out the state of the checkbox", - "", - "Tips:", - "- Checkbox state can also be changed by an action.", - "- Checkbox can be disabled so that users cannot interact with it ", - "- To remove halo, Set \"halo hover\" and \"halo pressed\" opacity to 0" - ], - "origin": { - "identifier": "Checkbox", - "name": "gdevelop-extension-store" - }, - "tags": ["checkbox", "shape painter", "ui", "widget", "toggle", "switch"], - "authorIds": [ - "gqDaZjCfevOOxBYkK6zlhtZnXCg1", - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "Checkbox that can be toggled by a left-click or touch.", - "fullName": "Checkbox", - "name": "Checkbox", - "objectType": "PrimitiveDrawing::Drawer", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure object doesn't get re-drawn every frame", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::ClearBetweenFrames" - }, - "parameters": ["Object", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Start halo at same size as thumb", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertySideLength()/2" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::UpdateHitbox" - }, - "parameters": ["Object", "Behavior", ""] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Checkbox logic", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::IsEnabled" - }, - "parameters": ["Object", "Behavior", ""] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyIsBeingPressed" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Grow halo even more when pressed", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertyHaloRadiusPressed()" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect press ending", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "MouseButtonReleased" - }, - "parameters": ["", "Left"] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect hover and touch/click", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyIsBeingPressed" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Detect mouse clicks near checkbox", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisBouton" - }, - "parameters": ["", "Left"] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SourisX" - }, - "parameters": [ - "", - ">", - "(Object.X() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisX" - }, - "parameters": [ - "", - "<", - "(Object.X() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisY" - }, - "parameters": [ - "", - ">", - "(Object.Y() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisY" - }, - "parameters": [ - "", - "<", - "(Object.Y() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::ToggleChecked" - }, - "parameters": ["Object", "Behavior", ""] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset hover detection ", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyIsHovered" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Grow halo when hovered", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SourisBouton" - }, - "parameters": ["", "Left"] - }, - { - "type": { - "value": "SourisX" - }, - "parameters": [ - "", - ">", - "(Object.X() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisX" - }, - "parameters": [ - "", - "<", - "(Object.X() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisY" - }, - "parameters": [ - "", - ">", - "(Object.Y() + 0.5 * Object.Behavior::SideLength()) - max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - }, - { - "type": { - "value": "SourisY" - }, - "parameters": [ - "", - "<", - "(Object.Y() + 0.5 * Object.Behavior::SideLength()) + max(Object.Behavior::PropertyHaloRadiusHover(), 0.5 * Object.Behavior::PropertySideLength())", - "Object.Layer()", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyIsHovered" - }, - "parameters": ["Object", "Behavior", "yes"] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertyHaloRadiusHover()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Shrink halo to zero when not hovered", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Checkbox::Checkbox::PropertyIsHovered" - }, - "parameters": ["Object", "Behavior"] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyTargetHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertySideLength()/2" - ] - } - ] - } - ] - } - ] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Checkbox drawing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" + "value": "Checkbox::Checkbox::PropertyNeedRedraw" }, "parameters": [ "Object", - "Behavior", - "!=", - "Object.Behavior::PropertyTargetHaloRadius()" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Redraw checkbox only when halo is not at final size", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "abs(Object.Behavior::PropertyCurrentHaloRadius() - Object.Behavior::PropertyTargetHaloRadius())", - "<", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertyTargetHaloRadius()" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyCurrentHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "Object.Behavior::PropertyTargetHaloRadius()" - ] - } - ], - "actions": [ - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyCurrentHaloRadius" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "lerp(Object.Behavior::PropertyCurrentHaloRadius(), Object.Behavior::PropertyTargetHaloRadius(), Object.Behavior::PropertyHaloGrowSpeed())" - ] - }, - { - "type": { - "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior", "yes"] - } + "Behavior" ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PrimitiveDrawing::Drawer", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Checkbox::Checkbox", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Checkbox drawing", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Checkbox::Checkbox::PropertyNeedRedraw" - }, - "parameters": ["Object", "Behavior"] }, { "type": { "value": "Visible" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] }, { "type": { "value": "LayerVisible" }, - "parameters": ["", "Object.Layer()"] + "parameters": [ + "", + "Object.Layer()" + ] } ], "actions": [ @@ -15380,13 +14107,19 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] }, { "type": { "value": "PrimitiveDrawing::Drawer::ClearShapes" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] } ], "events": [ @@ -15409,8 +14142,7 @@ "textG": 0, "textR": 0 }, - "comment": "Fix inputs that create malformed checkboxes", - "comment2": "" + "comment": "Fix inputs that create malformed checkboxes" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15459,7 +14191,12 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyLineWidth" }, - "parameters": ["Object", "Behavior", "=", "1"] + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] } ] }, @@ -15569,8 +14306,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set halo radius, if not specified", - "comment2": "" + "comment": "Set halo radius, if not specified" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15579,7 +14315,12 @@ "type": { "value": "Checkbox::Checkbox::PropertyHaloRadiusHover" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] } ], "actions": [ @@ -15606,8 +14347,7 @@ "textG": 0, "textR": 0 }, - "comment": "Check if halo is bigger than checkbox", - "comment2": "" + "comment": "Check if halo is bigger than checkbox" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15636,8 +14376,7 @@ "textG": 0, "textR": 0 }, - "comment": "Prepare halo", - "comment2": "" + "comment": "Prepare halo" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15656,7 +14395,11 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "Object", + "=", + "0" + ] } ] }, @@ -15670,8 +14413,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw halo (it will grow or shrink as needed)", - "comment2": "" + "comment": "Draw halo (it will grow or shrink as needed)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15681,7 +14423,10 @@ "inverted": true, "value": "Checkbox::Checkbox::PropertyIsBeingPressed" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -15718,8 +14463,7 @@ "textG": 0, "textR": 0 }, - "comment": "Use a more opaque halo while being dragged (it will grow or shrink as needed)", - "comment2": "" + "comment": "Use a more opaque halo while being dragged (it will grow or shrink as needed)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15728,7 +14472,10 @@ "type": { "value": "Checkbox::Checkbox::PropertyIsBeingPressed" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -15779,8 +14526,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change shape painter based on properties", - "comment2": "" + "comment": "Change shape painter based on properties" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15789,7 +14535,11 @@ "type": { "value": "Checkbox::Checkbox::IsChecked" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [], @@ -15828,7 +14578,11 @@ "inverted": true, "value": "Checkbox::Checkbox::IsChecked" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [], @@ -15877,13 +14631,21 @@ "type": { "value": "PrimitiveDrawing::FillOpacity" }, - "parameters": ["Object", "=", "255"] + "parameters": [ + "Object", + "=", + "255" + ] }, { "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "255"] + "parameters": [ + "Object", + "=", + "255" + ] } ] }, @@ -15924,7 +14686,11 @@ "type": { "value": "Checkbox::Checkbox::IsChecked" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [], @@ -15939,8 +14705,7 @@ "textG": 0, "textR": 0 }, - "comment": "Prepare color of checkmark", - "comment2": "" + "comment": "Prepare color of checkmark" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15967,8 +14732,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw left-side of checkmark", - "comment2": "" + "comment": "Draw left-side of checkmark" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15999,8 +14763,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw right-side of checkmark", - "comment2": "" + "comment": "Draw right-side of checkmark" }, { "type": "BuiltinCommonInstructions::Standard", @@ -16064,7 +14827,9 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": ["\"State\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ @@ -16088,7 +14853,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"State\""] + "parameters": [ + "\"State\"" + ] } ], "actions": [ @@ -16096,7 +14863,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyChecked" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -16108,7 +14879,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -16150,7 +14925,9 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": ["\"Enable\""] + "parameters": [ + "\"Enable\"" + ] } ], "actions": [ @@ -16158,7 +14935,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyEnabled" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ], "events": [ @@ -16172,8 +14953,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop dragging (so the checkbox won't be dragging when it gets enabled)", - "comment2": "" + "comment": "Stop dragging (so the checkbox won't be dragging when it gets enabled)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -16183,7 +14963,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyIsBeingPressed" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -16197,8 +14981,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset halo size (so halo won't appear when checkbox gets enabled)", - "comment2": "" + "comment": "Reset halo size (so halo won't appear when checkbox gets enabled)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -16226,7 +15009,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"Enable\""] + "parameters": [ + "\"Enable\"" + ] } ], "actions": [ @@ -16234,7 +15019,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyEnabled" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -16246,7 +15035,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -16287,7 +15080,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyToggleChanged" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] }, @@ -16298,7 +15095,10 @@ "type": { "value": "Checkbox::Checkbox::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -16306,13 +15106,21 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyChecked" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "Checkbox::Checkbox::SetPropertyToggleChanged" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -16324,14 +15132,20 @@ "inverted": true, "value": "Checkbox::Checkbox::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { "inverted": true, "value": "Checkbox::Checkbox::PropertyToggleChanged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -16339,7 +15153,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyChecked" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -16351,7 +15169,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -16399,7 +15221,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -16452,7 +15278,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -16505,7 +15335,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -16558,7 +15392,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -16611,7 +15449,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -16664,7 +15506,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -16717,7 +15563,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -16770,7 +15620,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -16782,7 +15636,11 @@ "type": { "value": "Checkbox::Checkbox::UpdateHitbox" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -16835,7 +15693,11 @@ "type": { "value": "Checkbox::Checkbox::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -16876,7 +15738,10 @@ "type": { "value": "Checkbox::Checkbox::PropertyChecked" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -16884,7 +15749,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -16920,7 +15787,10 @@ "type": { "value": "Checkbox::Checkbox::PropertyEnabled" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -16928,7 +15798,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -16965,7 +15837,9 @@ "type": { "value": "SetReturnString" }, - "parameters": ["Object.Behavior::PropertyPrimaryColor()"] + "parameters": [ + "Object.Behavior::PropertyPrimaryColor()" + ] } ] } @@ -17089,7 +15963,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::HaloOpacityPressed()"] + "parameters": [ + "Object.Behavior::HaloOpacityPressed()" + ] } ] } @@ -17213,7 +16089,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyLineWidth()"] + "parameters": [ + "Object.Behavior::PropertyLineWidth()" + ] } ] } @@ -17253,7 +16131,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertySideLength()"] + "parameters": [ + "Object.Behavior::PropertySideLength()" + ] } ] } @@ -17334,7 +16214,10 @@ "type": { "value": "Checkbox::Checkbox::PropertyIsBeingPressed" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -17342,7 +16225,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -17398,8 +16283,7 @@ "textG": 0, "textR": 0 }, - "comment": "Include border in the collision mask", - "comment2": "" + "comment": "Include border in the collision mask" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17442,59 +16326,41 @@ "value": "0", "type": "Boolean", "label": "Checked", - "description": "", "group": "Checkbox state", - "extraInformation": [], - "hidden": false, "name": "Checked" }, { "value": "", "type": "Number", "label": "Halo size (hover). If blank, this is set to \"SideLength\".", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloRadiusHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityHover" }, { "value": "128", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", "group": "Checkbox state", - "extraInformation": [], - "hidden": false, "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingPressed" }, @@ -17502,9 +16368,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -17512,9 +16375,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -17522,9 +16382,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -17532,9 +16389,6 @@ "value": "0.3", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -17542,9 +16396,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" }, @@ -17552,9 +16403,6 @@ "value": "", "type": "Boolean", "label": "State of the checkbox has changed. (Used in \"ToggleChecked\" function)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ToggleChanged" }, @@ -17562,60 +16410,42 @@ "value": " 24;119;211", "type": "Color", "label": "Primary color of checkbox. (Example: 24;119;211) Fill color when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "PrimaryColor" }, { "value": "255;255;255", "type": "Color", "label": "Secondary color of checkbox. (Example: 255;255;255) Color of checkmark when box is checked.", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "SecondaryColor" }, { "value": "24", "type": "Number", "label": "Length of each side (px) Minimum: 10", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "SideLength" }, { "value": "5", "type": "Number", "label": "Line width of checkmark (px) (Min: 1, Max: 1/4 * SideLength)", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "LineWidth" }, { "value": "2", "type": "Number", "label": "Border thickness (px) This border is only visible when the checkbox is unchecked. ", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "BorderThickness" }, { "value": "", "type": "Number", "label": "Halo size (pressed). If blank, this is set to \"HaloRadiusHover * 1.1\"", - "description": "", "group": "Checkbox appearance", - "extraInformation": [], - "hidden": false, "name": "HaloRadiusPressed" } ], @@ -17629,6 +16459,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Draggable slider (for Shape Painter)", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "DraggableSliderControl", @@ -17659,12 +16490,20 @@ "identifier": "DraggableSliderControl", "name": "gdevelop-extension-store" }, - "tags": ["draggable", "slider", "shape painter", "ui", "widget"], + "tags": [ + "draggable", + "slider", + "shape painter", + "ui", + "widget" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -17689,8 +16528,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure object doesn't get re-drawn every frame", - "comment2": "" + "comment": "Make sure object doesn't get re-drawn every frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17700,7 +16538,10 @@ "type": { "value": "PrimitiveDrawing::ClearBetweenFrames" }, - "parameters": ["Object", "no"] + "parameters": [ + "Object", + "no" + ] } ] }, @@ -17714,8 +16555,7 @@ "textG": 0, "textR": 0 }, - "comment": "Use correct min value (instead of always starting at 0)", - "comment2": "" + "comment": "Use correct min value (instead of always starting at 0)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17744,8 +16584,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set track height function (which enforces valid thumb sizes)", - "comment2": "" + "comment": "Set track height function (which enforces valid thumb sizes)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17774,8 +16613,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start halo at same size as thumb", - "comment2": "" + "comment": "Start halo at same size as thumb" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17802,7 +16640,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } @@ -17845,7 +16687,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::IsEnabled" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [], @@ -17860,8 +16706,7 @@ "textG": 0, "textR": 0 }, - "comment": "Track where the mouse is (in relation to object)", - "comment2": "" + "comment": "Track where the mouse is (in relation to object)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17901,8 +16746,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move slider when being dragged", - "comment2": "" + "comment": "Move slider when being dragged" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17911,7 +16755,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -17930,7 +16777,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ], "events": [ @@ -17944,8 +16795,7 @@ "textG": 0, "textR": 0 }, - "comment": "End sliding and update variables", - "comment2": "" + "comment": "End sliding and update variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17954,7 +16804,10 @@ "type": { "value": "MouseButtonReleased" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] } ], "actions": [ @@ -17962,7 +16815,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -17976,8 +16833,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update \"Value\" based on the location of the thumb", - "comment2": "" + "comment": "Update \"Value\" based on the location of the thumb" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18006,8 +16862,7 @@ "textG": 0, "textR": 0 }, - "comment": "Grow halo even more when pressed", - "comment2": "" + "comment": "Grow halo even more when pressed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18038,8 +16893,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect hover/touch/click (but only if the layer and object is visible, and the object is not already being dragged)", - "comment2": "" + "comment": "Detect hover/touch/click (but only if the layer and object is visible, and the object is not already being dragged)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18049,7 +16903,10 @@ "inverted": true, "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [], @@ -18064,8 +16921,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect mouse clicks near track, start dragging", - "comment2": "" + "comment": "Detect mouse clicks near track, start dragging" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18074,7 +16930,10 @@ "type": { "value": "SourisBouton" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] }, { "type": { @@ -18164,8 +17023,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset hover detection ", - "comment2": "" + "comment": "Reset hover detection " }, { "type": "BuiltinCommonInstructions::Standard", @@ -18175,7 +17033,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsHovered" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -18189,8 +17051,7 @@ "textG": 0, "textR": 0 }, - "comment": "Grow halo when hovered", - "comment2": "" + "comment": "Grow halo when hovered" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18200,7 +17061,10 @@ "inverted": true, "value": "SourisBouton" }, - "parameters": ["", "Left"] + "parameters": [ + "", + "Left" + ] }, { "type": { @@ -18248,7 +17112,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsHovered" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] }, { "type": { @@ -18273,8 +17141,7 @@ "textG": 0, "textR": 0 }, - "comment": "Shrink halo to zero when not hovered", - "comment2": "" + "comment": "Shrink halo to zero when not hovered" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18284,7 +17151,10 @@ "inverted": true, "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsHovered" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -18332,8 +17202,7 @@ "textG": 0, "textR": 0 }, - "comment": "Redraw slider only when halo is not at final size", - "comment2": "" + "comment": "Redraw slider only when halo is not at final size" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18365,7 +17234,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -18400,7 +17273,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -18448,19 +17325,27 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyNeedRedraw" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] }, { "type": { "value": "Visible" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] }, { "type": { "value": "LayerVisible" }, - "parameters": ["", "Object.Layer()"] + "parameters": [ + "", + "Object.Layer()" + ] } ], "actions": [ @@ -18468,13 +17353,19 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] }, { "type": { "value": "PrimitiveDrawing::Drawer::ClearShapes" }, - "parameters": ["Object"] + "parameters": [ + "Object" + ] } ], "events": [ @@ -18497,8 +17388,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set inactive track parameters (by default, use thumb color)", - "comment2": "" + "comment": "Set inactive track parameters (by default, use thumb color)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18572,7 +17462,11 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "Object", + "=", + "0" + ] } ] }, @@ -18586,8 +17480,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw inactive track", - "comment2": "" + "comment": "Draw inactive track" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18617,8 +17510,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw half circle at end of track (inactive side)", - "comment2": "" + "comment": "Draw half circle at end of track (inactive side)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18627,7 +17519,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -18670,8 +17565,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set active track parameters (by default, use thumb color)", - "comment2": "" + "comment": "Set active track parameters (by default, use thumb color)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18753,8 +17647,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw active track (2 pixels bigger than property) ", - "comment2": "" + "comment": "Draw active track (2 pixels bigger than property) " }, { "type": "BuiltinCommonInstructions::Standard", @@ -18784,8 +17677,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw half circle at end of track (active side)", - "comment2": "" + "comment": "Draw half circle at end of track (active side)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18794,7 +17686,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -18854,8 +17749,7 @@ "textG": 0, "textR": 0 }, - "comment": "Prepare halo", - "comment2": "" + "comment": "Prepare halo" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18874,7 +17768,11 @@ "type": { "value": "PrimitiveDrawing::OutlineOpacity" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "Object", + "=", + "0" + ] } ] }, @@ -18888,8 +17786,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw halo (it will grow or shrink as needed)", - "comment2": "" + "comment": "Draw halo (it will grow or shrink as needed)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18899,7 +17796,10 @@ "inverted": true, "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -18936,8 +17836,7 @@ "textG": 0, "textR": 0 }, - "comment": "Use a more opaque halo while being dragged (it will grow or shrink as needed)", - "comment2": "" + "comment": "Use a more opaque halo while being dragged (it will grow or shrink as needed)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18946,7 +17845,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -18997,8 +17899,7 @@ "textG": 0, "textR": 0 }, - "comment": "Prepare thumb settings", - "comment2": "" + "comment": "Prepare thumb settings" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19035,8 +17936,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw Circle thumb", - "comment2": "" + "comment": "Draw Circle thumb" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19077,8 +17977,7 @@ "textG": 0, "textR": 0 }, - "comment": "Draw Rectangle thumb", - "comment2": "" + "comment": "Draw Rectangle thumb" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19150,7 +18049,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -19158,7 +18060,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -19194,7 +18098,10 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyEnabled" }, - "parameters": ["Object", "Behavior"] + "parameters": [ + "Object", + "Behavior" + ] } ], "actions": [ @@ -19202,7 +18109,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -19239,7 +18148,9 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": ["\"Enable\""] + "parameters": [ + "\"Enable\"" + ] } ], "actions": [ @@ -19247,7 +18158,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyEnabled" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ], "events": [ @@ -19261,8 +18176,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop dragging (so the slider won't be dragging when it gets enabled)", - "comment2": "" + "comment": "Stop dragging (so the slider won't be dragging when it gets enabled)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19272,7 +18186,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -19286,8 +18204,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset halo size (so halo won't appear when slider gets enabled)", - "comment2": "" + "comment": "Reset halo size (so halo won't appear when slider gets enabled)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19315,7 +18232,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"Enable\""] + "parameters": [ + "\"Enable\"" + ] } ], "actions": [ @@ -19323,7 +18242,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyEnabled" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -19335,7 +18258,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -19377,7 +18304,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValue()"] + "parameters": [ + "Object.Behavior::PropertyValue()" + ] } ] } @@ -19416,7 +18345,12 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyTickSpacing" }, - "parameters": ["Object", "Behavior", "<=", "0"] + "parameters": [ + "Object", + "Behavior", + "<=", + "0" + ] } ], "actions": [ @@ -19440,7 +18374,12 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyTickSpacing" }, - "parameters": ["Object", "Behavior", ">", "0"] + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] } ], "actions": [ @@ -19525,8 +18464,7 @@ "textG": 0, "textR": 0 }, - "comment": "Set the proper offset (it moves the slider)", - "comment2": "" + "comment": "Set the proper offset (it moves the slider)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19547,7 +18485,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -19589,7 +18531,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValueMin()"] + "parameters": [ + "Object.Behavior::PropertyValueMin()" + ] } ] } @@ -19687,7 +18631,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValueMax()"] + "parameters": [ + "Object.Behavior::PropertyValueMax()" + ] } ] } @@ -19769,7 +18715,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTrackLength()"] + "parameters": [ + "Object.Behavior::PropertyTrackLength()" + ] } ] } @@ -19809,7 +18757,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyThumbHeight()"] + "parameters": [ + "Object.Behavior::PropertyThumbHeight()" + ] } ] } @@ -19907,7 +18857,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTickSpacing()"] + "parameters": [ + "Object.Behavior::PropertyTickSpacing()" + ] } ] } @@ -20021,13 +18973,21 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -20041,8 +19001,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move thumb to correct place (based on new track size)", - "comment2": "" + "comment": "Move thumb to correct place (based on new track size)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -20110,7 +19069,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -20124,8 +19087,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure thumb width is not smaller than track height + 2 pixels (to prevent track ends from showing)", - "comment2": "" + "comment": "Make sure thumb width is not smaller than track height + 2 pixels (to prevent track ends from showing)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -20225,8 +19187,7 @@ "textG": 0, "textR": 0 }, - "comment": "Thumb cannot be less than track thickness (plus 2 pixels)", - "comment2": "" + "comment": "Thumb cannot be less than track thickness (plus 2 pixels)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -20253,13 +19214,21 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20303,8 +19272,7 @@ "textG": 0, "textR": 0 }, - "comment": "Thumb cannot be less than track thickness (plus 2 pixels)", - "comment2": "" + "comment": "Thumb cannot be less than track thickness (plus 2 pixels)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -20331,13 +19299,21 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] }, { "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20390,7 +19366,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20443,7 +19423,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20496,7 +19480,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20549,7 +19537,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -20563,8 +19555,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure thumb width is not smaller than track height (to prevent track ends from showing)", - "comment2": "" + "comment": "Make sure thumb width is not smaller than track height (to prevent track ends from showing)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -20573,7 +19564,12 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" }, - "parameters": ["Object", "Behavior", "=", "\"rectangle\""] + "parameters": [ + "Object", + "Behavior", + "=", + "\"rectangle\"" + ] }, { "type": { @@ -20639,7 +19635,11 @@ "type": { "value": "Egal" }, - "parameters": ["GetArgumentAsNumber(\"Value\")", "=", "0"] + "parameters": [ + "GetArgumentAsNumber(\"Value\")", + "=", + "0" + ] } ], "actions": [ @@ -20647,7 +19647,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" }, - "parameters": ["Object", "Behavior", "no"] + "parameters": [ + "Object", + "Behavior", + "no" + ] } ] }, @@ -20658,7 +19662,11 @@ "type": { "value": "Egal" }, - "parameters": ["GetArgumentAsNumber(\"Value\")", "=", "1"] + "parameters": [ + "GetArgumentAsNumber(\"Value\")", + "=", + "1" + ] } ], "actions": [ @@ -20666,7 +19674,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] }, @@ -20678,7 +19690,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20731,7 +19747,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20784,7 +19804,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20837,7 +19861,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20890,7 +19918,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20943,7 +19975,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -20996,7 +20032,11 @@ "type": { "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "Object", + "Behavior", + "yes" + ] } ] } @@ -21082,199 +20122,145 @@ "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ValueMin" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ValueMax" }, { "value": "0", "type": "Number", "label": "Tick spacing", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "TickSpacing" }, { "value": "circle", "type": "Choice", "label": "Thumb shape", - "description": "", "group": "Thumb", - "extraInformation": ["circle", "rectangle"], - "hidden": false, + "choices": [ + { + "label": "circle", + "value": "circle" + }, + { + "label": "rectangle", + "value": "rectangle" + } + ], "name": "ThumbShape" }, { "value": "20", "type": "Number", "label": "Thumb width", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbWidth" }, { "value": "20", "type": "Number", "label": "Thumb height", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbHeight" }, { "value": " 24;119;211", "type": "Color", "label": "Thumb Color", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbColor" }, { "value": "255", "type": "Number", "label": "Thumb opacity", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "ThumbOpacity" }, { "value": "200", "type": "Number", "label": "Track length", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "TrackLength" }, { "value": "4", "type": "Number", "label": "Track thickness", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "TrackThickness" }, { "value": "", "type": "String", "label": "Inactive track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "InactiveTrackColor" }, { "value": "96", "type": "Number", "label": "Inactive track opacity", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "InactiveTrackOpacity" }, { "value": " ", "type": "String", "label": "Active track color (thumb color by default)", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "ActiveTrackColor" }, { "value": "255", "type": "Number", "label": "Active track opacity", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "ActiveTrackOpacity" }, { "value": "24", "type": "Number", "label": "Halo size (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloRadius" }, { "value": "32", "type": "Number", "label": "Halo opacity (hover)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityHover" }, { "value": "64", "type": "Number", "label": "Halo opacity (pressed)", - "description": "", "group": "Thumb", - "extraInformation": [], - "hidden": false, "name": "HaloOpacityClick" }, { "value": "true", "type": "Boolean", "label": "Rounded track ends", - "description": "", "group": "Track", - "extraInformation": [], - "hidden": false, "name": "RoundedTrack" }, { "value": "true", "type": "Boolean", "label": "Enable interactions", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "Enabled" }, { "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsBeingDragged" }, @@ -21282,9 +20268,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Value" }, @@ -21292,9 +20275,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbOffset" }, @@ -21302,9 +20282,6 @@ "value": "true", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "NeedRedraw" }, @@ -21312,9 +20289,6 @@ "value": "", "type": "Boolean", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "IsHovered" }, @@ -21322,9 +20296,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseX" }, @@ -21332,9 +20303,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseY" }, @@ -21342,9 +20310,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "CurrentHaloRadius" }, @@ -21352,9 +20317,6 @@ "value": "0.2", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "HaloGrowSpeed" }, @@ -21362,9 +20324,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TargetHaloRadius" } @@ -21379,14 +20338,15 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", "shortDescription": "A button that can be customized.", - "version": "1.4.2", + "version": "2.1.1", "description": [ - "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." ], @@ -21394,10 +20354,46 @@ "identifier": "PanelSpriteButton", "name": "gdevelop-extension-store" }, - "tags": ["button", "ui"], - "authorIds": ["IWykYNRvhCZBN3vEgKEbBPOR3Oc2"], + "tags": [ + "button", + "ui" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "The finite state machine used internally by the button object.", @@ -21413,57 +20409,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -21477,463 +20443,406 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } + ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], - "actions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": ["Object", "Behavior", "=", "0"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + } + ] + } + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ] @@ -21944,49 +20853,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -22016,15 +21064,63 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "PanelSpriteButton::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -22056,9 +21152,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -22066,7 +21166,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22098,9 +21200,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -22108,7 +21214,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22140,9 +21248,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -22150,7 +21262,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22182,9 +21296,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -22192,7 +21310,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -22201,11 +21321,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -22216,7 +21335,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22248,11 +21369,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -22263,7 +21383,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22295,11 +21417,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -22310,7 +21431,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -22345,107 +21468,412 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Button", + "description": "A button that can be customized.", + "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ { - "description": "Object", - "name": "Object", - "type": "object" + "name": "Label" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "name": "BitmapLabel" } - ], - "objectGroups": [] + ] } ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" - }, - { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } ], - "hidden": true, - "name": "State" - }, - { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" - }, - { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" - }, - { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" - }, + "effects": [] + } + ], + "instances": [ { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", - "name": "PanelSpriteButton", + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -22463,8 +21891,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown.", - "comment2": "" + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -22474,80 +21901,94 @@ "type": { "value": "Create" }, - "parameters": ["", "Idle", "0", "0", ""] + "parameters": [ + "", + "Hovered", + "0", + "0", + "" + ] }, { "type": { "value": "Create" }, - "parameters": ["", "Hovered", "0", "0", ""] + "parameters": [ + "", + "Pressed", + "0", + "0", + "" + ] }, { "type": { - "value": "Create" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, - "parameters": ["", "Pressed", "0", "0", ""] + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] }, { "type": { - "value": "Cache" + "value": "ResizableCapability::ResizableBehavior::SetSize" }, - "parameters": ["Hovered"] + "parameters": [ + "Pressed", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Pressed"] + "parameters": [ + "Hovered" + ] }, { "type": { - "value": "ChangePlan" - }, - "parameters": ["Hovered", "=", "1"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" + "value": "Cache" }, - "parameters": ["", "Label", "0", "0", ""] + "parameters": [ + "Pressed" + ] }, { "type": { "value": "ChangePlan" }, - "parameters": ["Label", "=", "2"] + "parameters": [ + "Hovered", + "=", + "1" + ] }, { "type": { - "value": "TextObject::SetWrapping" + "value": "ChangePlan" }, - "parameters": ["Label", "yes"] + "parameters": [ + "Pressed", + "=", + "1" + ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, - "parameters": ["Object", ""] + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] } ] } @@ -22583,15 +22024,47 @@ "name": "onHotReloading", "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "PressedLabelOffsetY", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, - "parameters": ["Object", ""] + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] } ] } @@ -22631,8 +22104,7 @@ "textG": 0, "textR": 0 }, - "comment": "Show the right background accordingly to the new state.", - "comment2": "" + "comment": "Show the right background accordingly to the new state." }, { "type": "BuiltinCommonInstructions::Standard", @@ -22641,7 +22113,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -22653,25 +22128,31 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { "type": { "value": "Montre" }, - "parameters": ["Idle", ""] + "parameters": [ + "Idle", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Pressed"] + "parameters": [ + "Pressed" + ] } ], "events": [ @@ -22682,19 +22163,25 @@ "type": { "value": "Visible" }, - "parameters": ["Hovered"] + "parameters": [ + "Hovered" + ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, - "parameters": ["Object", ">", "0"] + "parameters": [ + "HoveredFadeOutDuration", + ">", + "0" + ] } ], "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -22702,7 +22189,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -22713,9 +22200,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, - "parameters": ["Object", "=", "0"] + "parameters": [ + "HoveredFadeOutDuration", + "=", + "0" + ] } ], "actions": [ @@ -22723,7 +22214,9 @@ "type": { "value": "Cache" }, - "parameters": ["Hovered"] + "parameters": [ + "Hovered" + ] } ] } @@ -22734,9 +22227,14 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, - "parameters": ["Hovered", "=", "0"] + "parameters": [ + "Hovered", + "Opacity", + "=", + "0" + ] } ], "actions": [ @@ -22744,13 +22242,20 @@ "type": { "value": "Cache" }, - "parameters": ["Hovered"] + "parameters": [ + "Hovered" + ] }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, - "parameters": ["Hovered", "=", "255"] + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] } ] }, @@ -22761,7 +22266,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -22773,43 +22281,60 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { "type": { "value": "Cache" }, - "parameters": ["Idle"] + "parameters": [ + "Idle" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Hovered", ""] + "parameters": [ + "Hovered", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Pressed"] + "parameters": [ + "Pressed" + ] }, { "type": { "value": "Tween::RemoveTween" }, - "parameters": ["Hovered", "Tween", "\"Fadeout\""] + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, - "parameters": ["Hovered", "=", "255"] + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] } ] }, @@ -22820,7 +22345,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -22832,31 +22360,39 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + "PressedLabelOffsetY", + "" ] }, { "type": { "value": "Cache" }, - "parameters": ["Idle"] + "parameters": [ + "Idle" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Hovered"] + "parameters": [ + "Hovered" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Pressed", ""] + "parameters": [ + "Pressed", + "" + ] } ] }, @@ -22867,7 +22403,10 @@ "type": { "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" }, - "parameters": ["Object", "ButtonFSM"] + "parameters": [ + "Object", + "ButtonFSM" + ] }, { "type": { @@ -22879,140 +22418,39 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { "type": { "value": "Cache" }, - "parameters": ["Idle"] - }, - { - "type": { - "value": "Montre" - }, - "parameters": ["Hovered", ""] - }, - { - "type": { - "value": "Cache" - }, - "parameters": ["Pressed"] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": ["Idle", "Width", "=", "Object.Width()"] - }, - { - "type": { - "value": "ModVarObjet" - }, "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" + "Idle" ] }, { "type": { - "value": "PanelSpriteButton::Scale" - }, - "parameters": ["Object", "=", "1"] - }, - { - "type": { - "value": "PanelSpriteObject::Width" + "value": "Montre" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" + "Hovered", + "" ] }, { "type": { - "value": "PanelSpriteObject::Height" + "value": "Cache" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" + "Pressed" ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": ["Object", ""] } ] } @@ -23028,22 +22466,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -23059,7 +22482,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsIdle" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -23067,7 +22494,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -23096,7 +22525,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsClicked" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -23104,7 +22537,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -23133,7 +22568,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsHovered" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -23141,7 +22580,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -23170,7 +22611,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsFocused" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -23178,7 +22623,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -23207,7 +22654,11 @@ "type": { "value": "PanelSpriteButton::ButtonFSM::IsPressed" }, - "parameters": ["Idle", "ButtonFSM", ""] + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -23215,47 +22666,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Change the text of the button label.", - "fullName": "Label text", - "functionType": "Action", - "name": "SetLabelText", - "sentence": "Change the text of _PARAM0_ to _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, "parameters": [ - "Label", - "=", - "GetArgumentAsString(\"LabelText\")" + "True" ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": ["Object", ""] } ] } @@ -23266,91 +22679,17 @@ "name": "Object", "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" - }, - { - "description": "", - "name": "LabelText", - "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", + "description": "Change the text of the button label.", "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": ["Label.String()"] - } - ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", - "fullName": "", - "functionType": "Expression", - "name": "CenterWithPaddingY", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", "functionType": "Action", - "name": "CenterLabel", + "name": "SetLabelText", "private": true, - "sentence": "Center the label of _PARAM0_", + "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -23358,75 +22697,53 @@ "actions": [ { "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, - { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" - ] - }, - { - "type": { - "value": "SetCenterY" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } + "Labels", + "Text", + "=", + "Value" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" }, + { + "description": "Text", + "name": "Value", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": ["Object", ""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "MettreY" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" + "Labels", + "Text", + "=", + "Value" ] } ] @@ -23440,22 +22757,42 @@ "type": "object" } ], - "objectGroups": [ + "objectGroups": [] + }, + { + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", + "events": [ { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "Pressed" + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Labels.Text::Value()" + ] } ] } - ] + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] }, { "description": "De/activate interactions with the button.", @@ -23469,9 +22806,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -23479,7 +22820,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Idle", "ButtonFSM", "yes"] + "parameters": [ + "Idle", + "ButtonFSM", + "yes" + ] } ] }, @@ -23489,9 +22834,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -23499,7 +22848,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Idle", "ButtonFSM", "no"] + "parameters": [ + "Idle", + "ButtonFSM", + "no" + ] } ] } @@ -23533,7 +22886,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Idle", "ButtonFSM"] + "parameters": [ + "Idle", + "ButtonFSM" + ] } ], "actions": [ @@ -23541,7 +22897,90 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "LabelOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] } ] } @@ -23559,157 +22998,698 @@ ], "propertyDescriptors": [ { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "PressedLabelOffsetY" - }, - { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": ["Label"], - "hidden": false, - "name": "LeftPadding" + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": ["Label"], - "hidden": false, - "name": "RightPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": ["Label"], - "hidden": false, - "name": "TopPadding" + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { "value": "0", "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": ["Label"], - "hidden": false, - "name": "BottomPadding" + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "value": "0.25", - "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "HoveredFadeOutDuration" + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" + } + ], + "hidden": true, + "name": "_PropertyMapping" } ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "variants": [ + { + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Green Button With Stone Frame 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "LakkiReddy-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } ], - "effects": [], - "behaviors": [ + "layers": [ { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "f8a927cc-1139-440f-8a4e-bc8e56e322bf", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.0114942528735633, + "windowMask": false, + "selectedLayer": "" + } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "areaMaxX": 348, + "areaMaxY": 102, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "0364dbe0c9a504055bcfd65a3e898b58b0cb0aea76c15cc0b9961815b88ba4e6", + "assetStoreOriginalName": "Green Button With Stone Frame", + "name": "Green Button With Stone Frame", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "Roboto-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Idle.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Hovered.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 102, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "Green Button With Stone Frame_Pressed.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 348, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 61, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "f8a927cc-1139-440f-8a4e-bc8e56e322bf", + "width": 283, + "x": 32, + "y": 52, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -23720,12 +23700,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -23735,13 +23716,49 @@ "identifier": "PanelSpriteSlider", "name": "gdevelop-extension-store" }, - "tags": ["draggable", "slider", "ui", "widget"], + "tags": [ + "draggable", + "slider", + "ui", + "widget" + ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -23765,7 +23782,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyValue()"] + "parameters": [ + "CurrentValue" + ] } ] } @@ -23800,21 +23819,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "StepSize", + "=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -23824,21 +23846,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "StepSize", + "!=", + "0" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -23875,7 +23900,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMinValue()"] + "parameters": [ + "MinValue" + ] } ] } @@ -23911,13 +23938,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -23966,7 +23992,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyMaxValue()"] + "parameters": [ + "MaxValue" + ] } ] } @@ -24002,13 +24030,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -24097,7 +24124,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyStepSize()"] + "parameters": [ + "StepSize" + ] } ] } @@ -24133,13 +24162,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -24178,40 +24206,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Value" + "name": "CurrentValue" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -24231,512 +24243,464 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the cursor position is only checked once per frame.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior", "yes"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior", "no"] - } - ] + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - }, - { - "type": { - "value": "CollisionPoint" + "value": "StringVariable" }, "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "State", + "=", + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "yes"] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "HasAnyTouchOrMouseStarted" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [""] - } - ], - "actions": [ + "comment": "Make sure the cursor position is only checked once per frame." + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": ["Object", "Behavior", "=", "0"] + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ] } ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "Index", + "+", + "1" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": ["Object", "Behavior"] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": ["Object", "Behavior"] }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -24745,13 +24709,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ] @@ -24761,50 +24724,151 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "TouchIsInside", + "True", + "" ] }, { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -24834,15 +24898,23 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "TouchId", + "=", + "0" + ] } ] } @@ -24874,9 +24946,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Idle\""] + "parameters": [ + "State", + "=", + "\"Idle\"" + ] } ], "actions": [ @@ -24884,7 +24960,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -24916,9 +24994,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Validated\""] + "parameters": [ + "State", + "=", + "\"Validated\"" + ] } ], "actions": [ @@ -24926,7 +25008,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -24958,9 +25042,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -24968,7 +25056,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -25000,9 +25090,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Hovered\""] + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] } ], "actions": [ @@ -25010,7 +25104,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] }, @@ -25019,11 +25115,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -25034,7 +25129,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -25066,11 +25163,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -25081,7 +25177,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -25113,11 +25211,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -25128,7 +25225,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -25163,7 +25262,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["Object.Behavior::PropertyTouchId()"] + "parameters": [ + "TouchId" + ] } ] } @@ -25193,8 +25294,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -25202,14 +25301,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -25218,9 +25330,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -25228,9 +25337,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -25238,9 +25344,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -25248,9 +25351,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -25260,10 +25360,267 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -25271,31 +25628,28 @@ "name": "onCreated", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload.", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "ActivateBehavior" }, "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "Thumb", + "Draggable", + "" ] } ] @@ -25310,8 +25664,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances.", - "comment2": "" + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -25319,39 +25672,71 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": ["", "Background", "0", "0", ""] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "FillBar", "0", "0", ""] + "parameters": [ + "FillBar", + "Anchor", + "" + ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, - "parameters": ["", "Thumb", "0", "0", ""] + "parameters": [ + "Thumb", + "Anchor", + "" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Background", "=", "1"] + "parameters": [ + "BarLeftPlusRightMargin", + "=", + "Object.Width() - FillBar.Width()" + ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["FillBar", "=", "2"] - }, + "parameters": [ + "BarTopPlusBottomMargin", + "=", + "Object.Height() - FillBar.Height()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, - "parameters": ["Thumb", "=", "3"] + "parameters": [ + "PreviousInitialValue", + "=", + "InitialValue" + ] } ] }, @@ -25365,8 +25750,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the label that is displayed over the thumb.", - "comment2": "" + "comment": "Create the label that is displayed over the thumb." }, { "type": "BuiltinCommonInstructions::Standard", @@ -25376,25 +25760,21 @@ "type": { "value": "Create" }, - "parameters": ["", "Label", "0", "0", ""] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": ["Label", "=", "4"] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": ["Label", "no"] + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -25408,8 +25788,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass the configuration to the behavior.", - "comment2": "" + "comment": "Pass the configuration to the behavior." }, { "type": "BuiltinCommonInstructions::Standard", @@ -25419,7 +25798,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] }, { "type": { @@ -25428,7 +25810,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -25442,19 +25824,28 @@ "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["Thumb", ""] + "parameters": [ + "Thumb", + "" + ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, - "parameters": ["FillBar", ""] + "parameters": [ + "FillBar", + "" + ] } ] } @@ -25479,17 +25870,14 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] }, @@ -25498,24 +25886,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -25525,7 +25913,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -25549,86 +25937,323 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": ["Background", "ButtonFSM"] - } - ], - "actions": [], + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" + "value": "BehaviorActivated" }, - "parameters": ["Thumb", "Draggable"] - }, + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [], + "events": [ { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + "value": "DraggableBehavior::Dragged" }, - "parameters": ["Background", "ButtonFSM", ""] - }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" }, - "parameters": ["Object"] + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] } ], "actions": [ @@ -25636,302 +26261,62 @@ "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] }, { "type": { "value": "ResetObjectTimer" }, - "parameters": ["Label", "\"HideBack\""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "CompareObjectTimer" }, - "parameters": ["Object"] + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": ["Thumb", "Draggable"] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": ["Object"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": ["Label", ""] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": ["Label"] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": ["Label", "\"HideBack\""] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" - ] - } - ] } ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": ["Object", "=", "1"] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, "parameters": [] } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": ["Object", ""] - } ] } ], @@ -25966,19 +26351,30 @@ "type": { "value": "DraggableBehavior::Dragged" }, - "parameters": ["Thumb", "Draggable"] + "parameters": [ + "Thumb", + "Draggable" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressed" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] }, { "type": { "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" }, - "parameters": ["Background", "ButtonFSM", ""] + "parameters": [ + "Background", + "ButtonFSM", + "" + ] } ] } @@ -25988,7 +26384,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -26018,7 +26416,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::Value()"] + "parameters": [ + "FillBar.Slider::Value()" + ] } ] } @@ -26055,7 +26455,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -26063,7 +26463,10 @@ "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -26100,7 +26503,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MinValue()"] + "parameters": [ + "FillBar.Slider::MinValue()" + ] } ] } @@ -26137,21 +26542,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -26188,7 +26590,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::MaxValue()"] + "parameters": [ + "FillBar.Slider::MaxValue()" + ] } ] } @@ -26225,21 +26629,18 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": ["Object", ""] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -26276,7 +26677,9 @@ "type": { "value": "SetReturnNumber" }, - "parameters": ["FillBar.Slider::StepSize()"] + "parameters": [ + "FillBar.Slider::StepSize()" + ] } ] } @@ -26313,7 +26716,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -26349,9 +26752,13 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, - "parameters": ["Object"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] } ], "actions": [ @@ -26359,7 +26766,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -26388,23 +26797,33 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "no"] + "parameters": [ + "ShowLabelAtChanges", + "False", + "" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] }, @@ -26413,23 +26832,34 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"Value\""] + "parameters": [ + "Value", + "True", + "" + ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, - "parameters": ["Object", "yes"] + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] }, { "type": { "value": "Montre" }, - "parameters": ["Label", ""] + "parameters": [ + "Label", + "" + ] } ] } @@ -26449,53 +26879,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -26511,7 +26894,13 @@ "type": { "value": "PanelSpriteSlider::Slider::Size" }, - "parameters": ["FillBar", "Slider", ">", "0", ""] + "parameters": [ + "FillBar", + "Slider", + ">", + "0", + "" + ] } ], "actions": [], @@ -26522,10 +26911,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -26543,14 +26933,18 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { "type": { "value": "SetCenterY" }, - "parameters": ["Thumb", "=", "FillBar.CenterY()"] + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] } ] }, @@ -26560,10 +26954,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -26572,7 +26967,11 @@ "type": { "value": "SetCenterX" }, - "parameters": ["Label", "=", "Thumb.CenterX()"] + "parameters": [ + "Label", + "=", + "Thumb.CenterX()" + ] }, { "type": { @@ -26581,14 +26980,18 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, - "parameters": ["Label", "=", "-Object.Angle()"] + "parameters": [ + "Label", + "=", + "-Object.Angle()" + ] } ] } @@ -26605,74 +27008,6 @@ ], "objectGroups": [] }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.PropertyBarLeftPadding()"] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "fullName": "", "functionType": "Expression", @@ -26689,7 +27024,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -26726,8 +27061,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass configuration to the behavior and update children.", - "comment2": "" + "comment": "Pass configuration to the behavior and update children." }, { "type": "BuiltinCommonInstructions::Standard", @@ -26740,9 +27074,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -26752,7 +27085,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -26763,7 +27096,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -26792,9 +27125,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -26802,13 +27139,21 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "yes"] + "parameters": [ + "Thumb", + "Draggable", + "yes" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "yes"] + "parameters": [ + "Background", + "ButtonFSM", + "yes" + ] } ] }, @@ -26818,9 +27163,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -26828,19 +27177,29 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Thumb", "Draggable", "no"] + "parameters": [ + "Thumb", + "Draggable", + "no" + ] }, { "type": { "value": "ActivateBehavior" }, - "parameters": ["Background", "ButtonFSM", "no"] + "parameters": [ + "Background", + "ButtonFSM", + "no" + ] }, { "type": { "value": "Cache" }, - "parameters": ["Label"] + "parameters": [ + "Label" + ] } ] } @@ -26874,7 +27233,10 @@ "type": { "value": "BehaviorActivated" }, - "parameters": ["Background", "ButtonFSM"] + "parameters": [ + "Background", + "ButtonFSM" + ] } ], "actions": [ @@ -26882,7 +27244,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -26903,100 +27267,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", - "extraInformation": ["Label", "FillBar"], - "hidden": false, + "extraInformation": [ + "Label", + "FillBar" + ], + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -27004,8 +27367,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -27014,8 +27375,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -27024,8 +27387,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["FillBar"], + "extraInformation": [ + "FillBar" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -27034,111 +27399,295 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Label"], + "extraInformation": [ + "Label" + ], + "choices": [], "hidden": true, "name": "ShowLabel" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "tags": "", - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "tags": "", - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" + } + ], + "variants": [ + { + "areaMaxX": 583, + "areaMaxY": 63, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "05b0eb2d13ff37b70927d0184d4705e9c39c0b8fece7463127c4fe9eb65bb422", + "assetStoreOriginalName": "Small Plastic Green Round Slider", + "name": "Small Plastic Green Round Slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 221, + "g": 221, + "r": 221 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "221;221;221" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 59, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "Small Plastic Green Round Slider Thumb.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 63, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 16, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "Transparent.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 16, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 31, + "height": 63, + "leftMargin": 31, + "name": "Background", + "rightMargin": 31, + "texture": "Small Plastic Green Round Slider Border.png", + "tiled": false, + "topMargin": 31, + "type": "PanelSpriteObject::PanelSprite", + "width": 583, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] } - ] + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Thumb", + "persistentUuid": "66c86c92-2307-478b-b235-9fd684f1b6dc", + "width": 0, + "x": 520, + "y": 2, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0.9961685823754789, + "height": 16, + "layer": "", + "name": "FillBar", + "persistentUuid": "8ab1d9ff-14ee-4041-930f-b3792501b635", + "width": 520, + "x": 31, + "y": 23, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } ] } @@ -27149,6 +27698,7 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Make objects orbit around a center object", + "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBkPSJNMTYsOWMtMy45LDAtNywzLjEtNyw3czMuMSw3LDcsN3M3LTMuMSw3LTdTMTkuOSw5LDE2LDl6Ii8+DQoJPHBhdGggZD0iTTI3LjcsOC4zQzI3LjksNy45LDI4LDcuNSwyOCw3YzAtMS43LTEuMy0zLTMtM2MtMC41LDAtMC45LDAuMS0xLjMsMC4zQzIxLjQsMi44LDE4LjgsMiwxNiwyQzguMywyLDIsOC4zLDIsMTYNCgkJczYuMywxNCwxNCwxNHMxNC02LjMsMTQtMTRDMzAsMTMuMiwyOS4yLDEwLjYsMjcuNyw4LjN6IE0xNiwyOEM5LjQsMjgsNCwyMi42LDQsMTZTOS40LDQsMTYsNGMyLjIsMCw0LjQsMC42LDYuMywxLjgNCgkJQzIyLjEsNi4xLDIyLDYuNiwyMiw3YzAsMS43LDEuMywzLDMsM2MwLjQsMCwwLjktMC4xLDEuMi0wLjNjMS4yLDEuOSwxLjgsNCwxLjgsNi4zQzI4LDIyLjYsMjIuNiwyOCwxNiwyOHoiLz4NCjwvZz4NCjwvc3ZnPg0K", "name": "OrbitingObjects", @@ -27195,6 +27745,8 @@ "IRIhkkTTl2UHhfjrLTTH5GYwkYu1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Move objects in orbit around a center object.", @@ -27228,8 +27780,7 @@ "textG": 0, "textR": 0 }, - "comment": "Note: Must use the Action form of \"Take into account\" so that this variable is set to 0 when there are no linked objects", - "comment2": "" + "comment": "Note: Must use the Action form of \"Take into account\" so that this variable is set to 0 when there are no linked objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27239,7 +27790,11 @@ "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, - "parameters": ["", "OrbitingObject", "CenterObject"] + "parameters": [ + "", + "OrbitingObject", + "CenterObject" + ] }, { "type": { @@ -27312,8 +27867,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create orbiting objects and link them to the center object", - "comment2": "" + "comment": "Create orbiting objects and link them to the center object" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27363,8 +27917,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update counter", - "comment2": "" + "comment": "Update counter" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27405,8 +27958,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reassign OrbitOrder", - "comment2": "" + "comment": "Reassign OrbitOrder" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27486,8 +28038,7 @@ "textG": 0, "textR": 0 }, - "comment": "Match the angle used by the rest of the orbiting objects", - "comment2": "" + "comment": "Match the angle used by the rest of the orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27517,8 +28068,7 @@ "textG": 0, "textR": 0 }, - "comment": "Spread out orbiting objects evenly", - "comment2": "" + "comment": "Spread out orbiting objects evenly" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27604,7 +28154,10 @@ "type": { "value": "Delete" }, - "parameters": ["OrbitingObject", ""] + "parameters": [ + "OrbitingObject", + "" + ] } ] } @@ -27620,8 +28173,7 @@ "textG": 0, "textR": 0 }, - "comment": "Spread out orbiting objects evenly", - "comment2": "" + "comment": "Spread out orbiting objects evenly" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27630,7 +28182,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"ResetObjectsAfterDeletion\""] + "parameters": [ + "\"ResetObjectsAfterDeletion\"" + ] } ], "actions": [ @@ -27669,7 +28223,11 @@ "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, - "parameters": ["", "OrbitingObject", "CenterObject"] + "parameters": [ + "", + "OrbitingObject", + "CenterObject" + ] } ], "actions": [], @@ -27684,8 +28242,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate new angle for this frame", - "comment2": "" + "comment": "Calculate new angle for this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27714,8 +28271,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep the angle between (0 to 360)", - "comment2": "" + "comment": "Keep the angle between (0 to 360)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27756,8 +28312,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move object to new angle", - "comment2": "" + "comment": "Move object to new angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27786,8 +28341,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle of rotating objects", - "comment2": "" + "comment": "Change angle of rotating objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27815,8 +28369,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save the current angle so it can be used for new orbiting objects", - "comment2": "" + "comment": "Save the current angle so it can be used for new orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27932,8 +28485,7 @@ "textG": 0, "textR": 0 }, - "comment": "Note: Use the Action (instead of a Condition) for \"Take into account\" to make the action run even when there are no linked objects", - "comment2": "" + "comment": "Note: Use the Action (instead of a Condition) for \"Take into account\" to make the action run even when there are no linked objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -27943,7 +28495,11 @@ "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, - "parameters": ["", "OrbitingObject", "CenterObject"] + "parameters": [ + "", + "OrbitingObject", + "CenterObject" + ] }, { "type": { @@ -28016,8 +28572,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create orbiting objects and link them to the center object", - "comment2": "" + "comment": "Create orbiting objects and link them to the center object" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28057,8 +28612,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update counter", - "comment2": "" + "comment": "Update counter" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28099,8 +28653,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reassign OrbitOrder", - "comment2": "" + "comment": "Reassign OrbitOrder" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28180,8 +28733,7 @@ "textG": 0, "textR": 0 }, - "comment": "Match the angle used by the rest of the orbiting objects", - "comment2": "" + "comment": "Match the angle used by the rest of the orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28211,8 +28763,7 @@ "textG": 0, "textR": 0 }, - "comment": "Spread out orbiting objects evenly", - "comment2": "" + "comment": "Spread out orbiting objects evenly" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28298,7 +28849,10 @@ "type": { "value": "Delete" }, - "parameters": ["OrbitingObject", ""] + "parameters": [ + "OrbitingObject", + "" + ] } ] } @@ -28314,8 +28868,7 @@ "textG": 0, "textR": 0 }, - "comment": "Spread out orbiting objects evenly", - "comment2": "" + "comment": "Spread out orbiting objects evenly" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28324,7 +28877,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"ResetObjectsAfterDeletion\""] + "parameters": [ + "\"ResetObjectsAfterDeletion\"" + ] } ], "actions": [ @@ -28363,7 +28918,11 @@ "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, - "parameters": ["", "OrbitingObject", "CenterObject"] + "parameters": [ + "", + "OrbitingObject", + "CenterObject" + ] } ], "actions": [], @@ -28378,8 +28937,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate new angle for this frame", - "comment2": "" + "comment": "Calculate new angle for this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28408,8 +28966,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep the angle between (0 to 360)", - "comment2": "" + "comment": "Keep the angle between (0 to 360)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28450,8 +29007,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move object to new angle", - "comment2": "" + "comment": "Move object to new angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28481,8 +29037,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle of rotating objects", - "comment2": "" + "comment": "Change angle of rotating objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28510,8 +29065,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save the current angle so it can be used for new orbiting objects", - "comment2": "" + "comment": "Save the current angle so it can be used for new orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28549,8 +29103,7 @@ "textG": 0, "textR": 0 }, - "comment": "Foreground = Bottom (Default)", - "comment2": "" + "comment": "Foreground = Bottom (Default)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28607,8 +29160,7 @@ "textG": 0, "textR": 0 }, - "comment": "Foreground = Top", - "comment2": "" + "comment": "Foreground = Top" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28647,8 +29199,7 @@ "textG": 0, "textR": 0 }, - "comment": "Foreground = Left", - "comment2": "" + "comment": "Foreground = Left" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28687,8 +29238,7 @@ "textG": 0, "textR": 0 }, - "comment": "Foreground = Right", - "comment2": "" + "comment": "Foreground = Right" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28812,8 +29362,7 @@ "textG": 0, "textR": 0 }, - "comment": "Delete orbiting objects", - "comment2": "" + "comment": "Delete orbiting objects" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28822,7 +29371,11 @@ "type": { "value": "LinkedObjects::PickObjectsLinkedTo" }, - "parameters": ["", "OrbitingObject", "CenterObject"] + "parameters": [ + "", + "OrbitingObject", + "CenterObject" + ] } ], "actions": [ @@ -28830,7 +29383,10 @@ "type": { "value": "Delete" }, - "parameters": ["OrbitingObject", ""] + "parameters": [ + "OrbitingObject", + "" + ] } ] } @@ -28862,6 +29418,7 @@ "category": "Visual effect", "extensionNamespace": "", "fullName": "Shake Object (position, angle, scale)", + "gdevelopVersion": "", "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", "name": "ShakeObject", @@ -28904,8 +29461,12 @@ "rotate", "angle" ], - "authorIds": ["gqDaZjCfevOOxBYkK6zlhtZnXCg1"], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -28940,8 +29501,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start/Reset duration timer", - "comment2": "" + "comment": "Start/Reset duration timer" }, { "type": "BuiltinCommonInstructions::Standard", @@ -28968,8 +29528,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass input parameters to global variables so that onScenePostEvents can use them", - "comment2": "" + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29042,8 +29601,7 @@ "textG": 0, "textR": 0 }, - "comment": "Determine if the shake should keep going until stopped", - "comment2": "" + "comment": "Determine if the shake should keep going until stopped" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29068,7 +29626,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"ShakeForever\""] + "parameters": [ + "\"ShakeForever\"" + ] } ], "actions": [ @@ -29094,8 +29654,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add default values if none were provided", - "comment2": "" + "comment": "Add default values if none were provided" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29165,8 +29724,7 @@ "textG": 0, "textR": 0 }, - "comment": "If duration is less than a single shake, increase duration to make 1 full shake", - "comment2": "" + "comment": "If duration is less than a single shake, increase duration to make 1 full shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29207,8 +29765,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect initial shake", - "comment2": "" + "comment": "Detect initial shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29249,8 +29806,7 @@ "textG": 0, "textR": 0 }, - "comment": "Initiate the onScenePostEvents function", - "comment2": "" + "comment": "Initiate the onScenePostEvents function" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29370,8 +29926,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep object shaking forever (if desired)", - "comment2": "" + "comment": "Keep object shaking forever (if desired)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29429,8 +29984,7 @@ "textG": 0, "textR": 0 }, - "comment": "Run once before every shake movement", - "comment2": "" + "comment": "Run once before every shake movement" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29507,8 +30061,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29605,8 +30158,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29660,8 +30212,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Position Shake", - "comment2": "" + "comment": "Calculate Position Shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29709,8 +30260,7 @@ "textG": 0, "textR": 0 }, - "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]", - "comment2": "" + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" }, { "type": "BuiltinCommonInstructions::Comment", @@ -29722,8 +30272,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect", - "comment2": "" + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29812,8 +30361,7 @@ "textG": 0, "textR": 0 }, - "comment": "After initial shake pick a random direction", - "comment2": "" + "comment": "After initial shake pick a random direction" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29904,8 +30452,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Rotation (angle) shake ", - "comment2": "" + "comment": "Calculate Rotation (angle) shake " }, { "type": "BuiltinCommonInstructions::Standard", @@ -29934,8 +30481,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"even\" shake, rotate clockwise", - "comment2": "" + "comment": "Every \"even\" shake, rotate clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -29947,8 +30493,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -29988,8 +30533,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, rotate counter-clockwise", - "comment2": "" + "comment": "Every \"odd\" shake, rotate counter-clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -30001,8 +30545,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30044,8 +30587,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save that initial shake has been processed", - "comment2": "" + "comment": "Save that initial shake has been processed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30088,8 +30630,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate the fraction of shake that occured during this frame", - "comment2": "" + "comment": "Calculate the fraction of shake that occured during this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30118,8 +30659,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase change for the first half of the shake (move away from original values)", - "comment2": "" + "comment": "Increase change for the first half of the shake (move away from original values)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30148,8 +30688,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30218,8 +30757,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30261,8 +30799,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30301,8 +30838,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30335,8 +30871,7 @@ "textG": 0, "textR": 0 }, - "comment": "Decrease change the second half of the shake (return to original position)", - "comment2": "" + "comment": "Decrease change the second half of the shake (return to original position)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30364,8 +30899,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30434,8 +30968,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30477,8 +31010,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30517,8 +31049,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30568,8 +31099,7 @@ "textG": 0, "textR": 0 }, - "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)", - "comment2": "" + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30654,8 +31184,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30752,8 +31281,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30835,7 +31363,11 @@ "type": { "value": "ShakeObject::ShakeObject_PositionAngle::IsShaking" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "actions": [ @@ -30895,7 +31427,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -30951,8 +31485,7 @@ "textG": 0, "textR": 0 }, - "comment": "Start/Reset duration timer", - "comment2": "" + "comment": "Start/Reset duration timer" }, { "type": "BuiltinCommonInstructions::Standard", @@ -30979,8 +31512,7 @@ "textG": 0, "textR": 0 }, - "comment": "Pass input parameters to global variables so that onScenePostEvents can use them", - "comment2": "" + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31064,8 +31596,7 @@ "textG": 0, "textR": 0 }, - "comment": "Determine if the shake should keep going until stopped", - "comment2": "" + "comment": "Determine if the shake should keep going until stopped" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31090,7 +31621,9 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": ["\"ShakeForever\""] + "parameters": [ + "\"ShakeForever\"" + ] } ], "actions": [ @@ -31116,8 +31649,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add default values if none were provided", - "comment2": "" + "comment": "Add default values if none were provided" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31187,8 +31719,7 @@ "textG": 0, "textR": 0 }, - "comment": "If duration is less than a single shake, increase duration to make 1 full shake", - "comment2": "" + "comment": "If duration is less than a single shake, increase duration to make 1 full shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31229,8 +31760,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect initial shake", - "comment2": "" + "comment": "Detect initial shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31271,8 +31801,7 @@ "textG": 0, "textR": 0 }, - "comment": "Initiate the onScenePostEvents function", - "comment2": "" + "comment": "Initiate the onScenePostEvents function" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31398,8 +31927,7 @@ "textG": 0, "textR": 0 }, - "comment": "Keep object shaking forever (if desired)", - "comment2": "" + "comment": "Keep object shaking forever (if desired)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31457,8 +31985,7 @@ "textG": 0, "textR": 0 }, - "comment": "Run once before every shake movement", - "comment2": "" + "comment": "Run once before every shake movement" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31536,8 +32063,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" + "comment": "Move to correct any drift from previous shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31662,8 +32188,7 @@ "textG": 0, "textR": 0 }, - "comment": "Reset drift detection variables", - "comment2": "" + "comment": "Reset drift detection variables" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31728,8 +32253,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Position Shake", - "comment2": "" + "comment": "Calculate Position Shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31777,8 +32301,7 @@ "textG": 0, "textR": 0 }, - "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]", - "comment2": "" + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" }, { "type": "BuiltinCommonInstructions::Comment", @@ -31790,8 +32313,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect", - "comment2": "" + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31880,8 +32402,7 @@ "textG": 0, "textR": 0 }, - "comment": "After initial shake pick a random direction", - "comment2": "" + "comment": "After initial shake pick a random direction" }, { "type": "BuiltinCommonInstructions::Standard", @@ -31972,8 +32493,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Rotation (angle) shake ", - "comment2": "" + "comment": "Calculate Rotation (angle) shake " }, { "type": "BuiltinCommonInstructions::Standard", @@ -32002,8 +32522,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"even\" shake, rotate clockwise", - "comment2": "" + "comment": "Every \"even\" shake, rotate clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -32015,8 +32534,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32056,8 +32574,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, rotate counter-clockwise", - "comment2": "" + "comment": "Every \"odd\" shake, rotate counter-clockwise" }, { "type": "BuiltinCommonInstructions::Comment", @@ -32069,8 +32586,7 @@ "textG": 0, "textR": 0 }, - "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", - "comment2": "" + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32112,8 +32628,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate Scale shake", - "comment2": "" + "comment": "Calculate Scale shake" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32142,8 +32657,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate object scale displacement, with linear decay over time", - "comment2": "" + "comment": "Calculate object scale displacement, with linear decay over time" }, { "type": "BuiltinCommonInstructions::Comment", @@ -32155,8 +32669,7 @@ "textG": 0, "textR": 0 }, - "comment": "ScaleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100", - "comment2": "" + "comment": "ScaleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100" }, { "type": "BuiltinCommonInstructions::Comment", @@ -32168,8 +32681,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every even shake, increase scale", - "comment2": "" + "comment": "Every even shake, increase scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32209,8 +32721,7 @@ "textG": 0, "textR": 0 }, - "comment": "Every \"odd\" shake, decrease scale", - "comment2": "" + "comment": "Every \"odd\" shake, decrease scale" }, { "type": "BuiltinCommonInstructions::Comment", @@ -32222,8 +32733,7 @@ "textG": 0, "textR": 0 }, - "comment": "ScaleDisplacement = -1 * (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100", - "comment2": "" + "comment": "ScaleDisplacement = -1 * (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32265,8 +32775,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save that initial shake has been processed", - "comment2": "" + "comment": "Save that initial shake has been processed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32309,8 +32818,7 @@ "textG": 0, "textR": 0 }, - "comment": "Calculate the fraction of shake that occured during this frame", - "comment2": "" + "comment": "Calculate the fraction of shake that occured during this frame" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32339,8 +32847,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase change for the first half of the shake (move away from original values)", - "comment2": "" + "comment": "Increase change for the first half of the shake (move away from original values)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32369,8 +32876,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32439,8 +32945,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32482,8 +32987,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32522,8 +33026,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32554,8 +33057,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change scale", - "comment2": "" + "comment": "Change scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32594,8 +33096,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32628,8 +33129,7 @@ "textG": 0, "textR": 0 }, - "comment": "Decrease change the second half of the shake (return to original position)", - "comment2": "" + "comment": "Decrease change the second half of the shake (return to original position)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32657,8 +33157,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change position", - "comment2": "" + "comment": "Change position" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32727,8 +33226,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32770,8 +33268,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change angle", - "comment2": "" + "comment": "Change angle" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32810,8 +33307,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32842,8 +33338,7 @@ "textG": 0, "textR": 0 }, - "comment": "Change scale", - "comment2": "" + "comment": "Change scale" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32882,8 +33377,7 @@ "textG": 0, "textR": 0 }, - "comment": "Save movement to calculate drift", - "comment2": "" + "comment": "Save movement to calculate drift" }, { "type": "BuiltinCommonInstructions::Standard", @@ -32912,347 +33406,3146 @@ ] } ], - "parameters": [] + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop shaking", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"", + "Object.Variable(__ShakeObject_Duration)" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeCounter", + "=", + "0" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Correct for drift and reset drift tracking variables", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move to correct any drift from previous shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledY)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_AngleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerScale", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_ScaleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset drift detection variables" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ScaleTravelled", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop shaking an object.", + "fullName": "Stop shaking an object", + "functionType": "Action", + "name": "StopShaking", + "sentence": "Stop shaking _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::IsShaking" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is shaking.", + "fullName": "Check if an object is shaking", + "functionType": "Condition", + "name": "IsShaking", + "sentence": "_PARAM0_ is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Input", + "extensionNamespace": "", + "fullName": "Multitouch joystick and buttons (sprite)", + "gdevelopVersion": ">=5.5.222", + "helpPath": "/objects/multitouch-joystick", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", + "name": "SpriteMultitouchJoystick", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", + "shortDescription": "Joysticks or buttons for touchscreens.", + "version": "1.9.0", + "description": [ + "Multitouch joysticks are objects showing a joystick on the screen, useful for mobile. They work like a physical gamepad:", + "- 4 or 8 directions", + "- Analogus pads", + "- Player selection", + "- Automatic \"mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the virtual joystick (it works by reading the multitouch joystick state and simulating controls). No need for additional events to make it work once the behaviors are set up.", + "", + "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." + ], + "origin": { + "identifier": "SpriteMultitouchJoystick", + "name": "gdevelop-extension-store" + }, + "tags": [ + "multitouch", + "joystick", + "thumbstick", + "controller", + "touchscreen", + "twin stick", + "shooter", + "virtual", + "platformer", + "platform", + "top-down" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "1OgYzWp5UeVPbiWGJwI6vqfgZLC3", + "v0YRpdAnIucZFgiRCCecqVnGKno2", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [ + { + "name": "Controllers", + "type": "array", + "children": [ + { + "type": "structure", + "children": [ + { + "name": "Buttons", + "type": "array", + "children": [ + { + "type": "structure", + "children": [ + { + "name": "State", + "type": "string", + "value": "Idle" + } + ] + } + ] + }, + { + "name": "Joystick", + "type": "structure", + "children": [] + } + ] + } + ] + } + ], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "Accelerated speed", + "functionType": "Expression", + "name": "AcceleratedSpeed", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "CurrentSpeed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TargetedSpeed", + "<", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reduce the speed to match the stick force." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "TargetedSpeed" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "min(TargetedSpeed, CurrentSpeed + Acceleration * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "TargetedSpeed" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "-", + "Acceleration * TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Turn back at least as fast as it would stop." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "max(TargetedSpeed, CurrentSpeed - max(Acceleration , Deceleration) * TimeDelta())" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TargetedSpeed", + ">", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reduce the speed to match the stick force." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "TargetedSpeed" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "max(TargetedSpeed, CurrentSpeed - Acceleration * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "TargetedSpeed" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "+", + "Acceleration * TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Turn back at least as fast as it would stop." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "min(TargetedSpeed, CurrentSpeed + max(Acceleration , Deceleration) * TimeDelta())" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TargetedSpeed", + "=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "min(0, CurrentSpeed + Acceleration * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "CurrentSpeed", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "AcceleratedSpeed", + "=", + "max(0, CurrentSpeed - Acceleration * TimeDelta())" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "clamp(AcceleratedSpeed, -SpeedMax, SpeedMax)" + ] + } + ] + } + ], + "variables": [ + { + "name": "AcceleratedSpeed", + "type": "number", + "value": 0 + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Current speed", + "name": "CurrentSpeed", + "type": "expression" + }, + { + "description": "Targeted speed", + "name": "TargetedSpeed", + "type": "expression" + }, + { + "description": "Max speed", + "name": "SpeedMax", + "type": "expression" + }, + { + "description": "Acceleration", + "name": "Acceleration", + "type": "expression" + }, + { + "description": "Deceleration", + "name": "Deceleration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button was just pressed on a multitouch controller.", + "fullName": "Multitouch controller button just pressed", + "functionType": "Condition", + "name": "IsButtonJustPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ was just pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"JustPressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is pressed on a multitouch controller.", + "fullName": "Multitouch controller button pressed", + "functionType": "Condition", + "name": "IsButtonPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"JustPressed\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is released on a multitouch controller.", + "fullName": "Multitouch controller button released", + "functionType": "Condition", + "name": "IsButtonReleased", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "\"Released\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change a button state for a multitouch controller.", + "fullName": "Button state", + "functionType": "Action", + "name": "SetButtonState", + "private": true, + "sentence": "Mark _PARAM2_ button as _PARAM3_ for multitouch controller _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Buttons[Button].State", + "=", + "ButtonState" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "type": "string" + }, + { + "description": "Button state", + "name": "ButtonState", + "supplementaryInformation": "[\"Idle\",\"Pressed\",\"JustPressed\",\"Released\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the dead zone radius of a joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", + "fullName": "Dead zone radius", + "functionType": "Action", + "name": "SetDeadZone", + "private": true, + "sentence": "Change the dead zone of multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].DeadZone", + "=", + "DeadZoneRadius" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Dead zone radius", + "name": "DeadZoneRadius", + "supplementaryInformation": "[]", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the dead zone radius of a joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", + "fullName": "Dead zone radius", + "functionType": "Expression", + "name": "DeadZone", + "private": true, + "sentence": "Change multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ dead zone to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].DeadZone" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the direction index (left = 1, bottom = 1, right = 2, top = 3) for an angle (in degrees).", + "fullName": "Angle to 4-way index", + "functionType": "ExpressionAndCondition", + "name": "AngleTo4Way", + "private": true, + "sentence": "The angle _PARAM1_ 4-way index", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(round(Angle * 4 / 360), 4)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the direction index (left = 1, bottom-left = 1... top-left = 7) for an angle (in degrees).", + "fullName": "Angle to 8-way index", + "functionType": "ExpressionAndCondition", + "name": "AngleTo8Way", + "private": true, + "sentence": "The angle _PARAM1_ 8-way index", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(round(Angle * 8 / 360), 8)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if angle is in a given direction.", + "fullName": "Angle 4-way direction", + "functionType": "Condition", + "name": "IsAngleIn4WayDirection", + "private": true, + "sentence": "The angle _PARAM1_ is the 4-way direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "0", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Down\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "1", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "2", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Up\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "3", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if angle is in a given direction.", + "fullName": "Angle 8-way direction", + "functionType": "Condition", + "name": "IsAngleIn8WayDirection", + "private": true, + "sentence": "The angle _PARAM1_ is the 8-way direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "0", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"DownRight\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "1", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Down\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "2", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"DownLeft\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "3", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "4", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"UpLeft\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "5", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"Up\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "6", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "Direction", + "=", + "\"UpRight\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "7", + "Angle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the joystick has moved from center" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::JoystickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + }, + "parameters": [ + "", + "SpriteMultitouchJoystick::JoystickAngle(ControllerIdentifier, JoystickIdentifier)", + "Direction", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the joystick has moved from center" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::JoystickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" + }, + "parameters": [ + "", + "SpriteMultitouchJoystick::JoystickAngle(ControllerIdentifier, JoystickIdentifier)", + "Direction", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", + "fullName": "Joystick force (deprecated)", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "private": true, + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "", + "name": "Coucou", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the force of multitouch contoller stick (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "multitouch controller _PARAM1_ _PARAM2_ stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0, Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Force - SpriteMultitouchJoystick::DeadZone(ControllerIdentifier, JoystickIdentifier)) / (1 - SpriteMultitouchJoystick::DeadZone(ControllerIdentifier, JoystickIdentifier))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Stick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", + "fullName": "Joystick force", + "functionType": "Action", + "name": "SetJoystickForce", + "private": true, + "sentence": "Change the force of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Force", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle (deprecated)", + "functionType": "Expression", + "name": "JoystickAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the multitouch controller stick is pointing towards (Range: -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Angle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Action", + "name": "SetJoystickAngle", + "private": true, + "sentence": "Change the angle of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Angle", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the multitouch contoller stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "XFromAngleAndDistance(SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier), SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the multitouch contoller stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "YFromAngleAndDistance(SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier), SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a new touch has started on the right or left side of the screen.", + "fullName": "New touch on a screen side", + "functionType": "Condition", + "group": "Multitouch Joystick", + "name": "HasTouchStartedOnScreenSide", + "sentence": "A new touch has started on the _PARAM2_ side of the screen on _PARAM1_'s layer", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Side", + "=", + "\"Left\"" + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Stop shaking", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": { + "value": "TouchX" + }, + "parameters": [ + "", + "StartedTouchOrMouseId(0)", + "<", + "CameraCenterX(Object.Layer())", + "Object.Layer()", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Side", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "TouchX" + }, + "parameters": [ + "", + "StartedTouchOrMouseId(0)", + ">=", + "CameraCenterX(Object.Layer())", + "Object.Layer()", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch joystick", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "objectList" + }, + { + "description": "Screen side", + "name": "Side", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Joystick that can be controlled by interacting with a touchscreen.", + "fullName": "Multitouch Joystick", + "name": "MultitouchJoystick", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetDeadZone" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "DeadZoneRadius", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "HasGameJustResumed" }, - "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)", - "comment2": "" - }, + "parameters": [ + "" + ] + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "ObjectTimer" - }, - "parameters": [ - "Object", - "\"__ShakeObject_DurationTimer\"", - "Object.Variable(__ShakeObject_Duration)" - ] - }, - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_ShakeInProgress", - "=", - "-1" - ] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_ShakeInProgress", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_ShakeCounter", - "=", - "0" - ] - } - ], - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Correct for drift and reset drift tracking variables", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move to correct any drift from previous shake", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_PowerX", - "!=", - "0" - ] - }, - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_PowerY", - "!=", - "0" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreX" - }, - "parameters": [ - "Object", - "-", - "Object.Variable(__ShakeObject_DisplacementTravelledX)" - ] - }, - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Object", - "-", - "Object.Variable(__ShakeObject_DisplacementTravelledY)" - ] - } - ] - }, + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Manage touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarObjet" + "value": "NumberVariable" }, "parameters": [ - "Object", - "__ShakeObject_PowerAngle", - "!=", + "TouchId", + "=", "0" ] - } - ], - "actions": [ - { - "type": { - "value": "SetAngle" - }, - "parameters": [ - "Object", - "-", - "Object.Variable(__ShakeObject_AngleTravelled)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "VarObjet" + "value": "CollisionPoint" }, "parameters": [ "Object", - "__ShakeObject_PowerScale", - "!=", - "0" + "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "ChangeScale" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "-", - "Object.Variable(__ShakeObject_ScaleTravelled)" + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" ] } ] }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Reset drift detection variables", - "comment2": "" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_DisplacementTravelledX", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_DisplacementTravelledY", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "__ShakeObject_AngleTravelled", - "=", - "0" - ] - }, - { - "type": { - "value": "ModVarObjet" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "__ShakeObject_ScaleTravelled", - "=", - "0" + "TouchIndex", + "+", + "1" ] } ] } - ], - "parameters": [] + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update joystick position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "Object", + "Behavior", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", + "" + ] } ] } ], "parameters": [] } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick force (from 0 to 1).", + "fullName": "Joystick force", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "sentence": "the joystick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0, JoystickForce - DeadZoneRadius) / (1 - DeadZoneRadius)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickForce", + "name": "SetJoystickForce", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "JoystickForce", + "=", + "Value" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "JoystickForce", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "", + "name": "Parameter", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Expression", + "name": "JoystickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "JoystickAngle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Action", + "name": "SetJoystickAngle", + "private": true, + "sentence": "Change the joystick angle of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "JoystickAngle", + "=", + "Value" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "JoystickAngle", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Angle", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::JoystickForce() * cos(ToRad(Object.Behavior::JoystickAngle()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::JoystickForce() * sin(ToRad(Object.Behavior::JoystickAngle()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::JoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + }, + "parameters": [ + "", + "JoystickAngle", + "Direction", + "" + ] + } ], - "parameters": [] + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] } ], "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" } ], "objectGroups": [] }, { - "description": "Stop shaking an object.", - "fullName": "Stop shaking an object", - "functionType": "Action", - "name": "StopShaking", - "sentence": "Stop shaking _PARAM0_", + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ShakeObject::ShakeObject_PositionAngleScale::IsShaking" + "value": "SpriteMultitouchJoystick::MultitouchJoystick::JoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "", + "JoystickAngle", + "Direction", + "" + ] } ], "actions": [ { "type": { - "value": "ModVarObjet" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "__ShakeObject_ShakeInProgress", - "=", - "-1" + "True" ] } ] @@ -33262,37 +36555,41 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" } ], "objectGroups": [] }, { - "description": "Check if an object is shaking.", - "fullName": "Check if an object is shaking", + "description": "Check if a joystick is pressed.", + "fullName": "Joystick pressed", "functionType": "Condition", - "name": "IsShaking", - "sentence": "_PARAM0_ is shaking", + "name": "IsPressed", + "sentence": "Joystick _PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarObjet" + "value": "NumberVariable" }, "parameters": [ - "Object", - "__ShakeObject_ShakeInProgress", - "=", - "1" + "TouchId", + "!=", + "0" ] } ], @@ -33301,7 +36598,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -33310,1223 +36609,1118 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "Input", - "extensionNamespace": "", - "fullName": "Multitouch joystick and buttons (sprite)", - "helpPath": "/objects/multitouch-joystick", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", - "name": "SpriteMultitouchJoystick", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", - "shortDescription": "Joysticks or buttons for touchscreens.", - "version": "1.1.2", - "description": [ - "Multitouch joysticks can be used the same way as physical gamepads:", - "- 4 or 8 directions", - "- Analogus pads", - "- Player selection", - "- Controls mapping for top-down movement and platformer characters", - "", - "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." - ], - "origin": { - "identifier": "SpriteMultitouchJoystick", - "name": "gdevelop-extension-store" - }, - "tags": [ - "multitouch", - "joystick", - "thumbstick", - "controller", - "touchscreen", - "twin stick", - "shooter", - "virtual" - ], - "authorIds": [ - "gqDaZjCfevOOxBYkK6zlhtZnXCg1", - "1OgYzWp5UeVPbiWGJwI6vqfgZLC3", - "v0YRpdAnIucZFgiRCCecqVnGKno2", - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "eventsFunctions": [ - { - "description": "Check if a button is pressed on a gamepad.", - "fullName": "Multitouch controller button pressed", - "functionType": "Condition", - "name": "IsButtonPressed", - "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", - "=", - "\"Pressed\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" }, { - "description": "Button name", - "name": "Button", - "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Check if a button is released on a gamepad.", - "fullName": "Multitouch controller button released", - "functionType": "Condition", - "name": "IsButtonReleased", - "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is released", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "description": "Reset the joystick values (except for angle, which stays the same)", + "fullName": "Reset", + "functionType": "Action", + "name": "Reset", + "private": true, + "sentence": "Reset the joystick of _PARAM0_", + "events": [ { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", - "=", - "\"Released\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Button name", - "name": "Button", - "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Change a button state for a multitouch controller.", - "fullName": "Button state", - "functionType": "Action", - "name": "SetButtonState", - "private": true, - "sentence": "Mark _PARAM2_ button as _PARAM3_ for multitouch controller _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "parameters": [ { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", - "=", - "GetArgumentAsString(\"ButtonState\")" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Button name", - "name": "Button", - "type": "string" - }, - { - "description": "Button state", - "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Change the dead zone radius of a joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", - "fullName": "Dead zone radius", - "functionType": "Action", - "name": "SetDeadZone", - "private": true, - "sentence": "Change the dead zone of multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "description": "Object", + "name": "Object", + "type": "object" + }, { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].DeadZone", - "=", - "GetArgumentAsNumber(\"DeadZoneRadius\")" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Joystick name", - "name": "JoystickIdentifier", - "type": "string" + ], + "objectGroups": [] }, { - "description": "Dead zone radius", - "name": "DeadZoneRadius", - "supplementaryInformation": "[]", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Return the dead zone radius of a joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", - "fullName": "Dead zone radius", - "functionType": "Expression", - "name": "DeadZone", - "private": true, - "sentence": "Change multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ dead zone to _PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].DeadZone)" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "description": "the multitouch controller identifier.", + "fullName": "Multitouch controller identifier", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Joystick name", - "name": "JoystickIdentifier", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "the direction index (left = 1, bottom = 1, right = 2, top = 3) for an angle (in degrees).", - "fullName": "Angle to 4-way index", - "functionType": "ExpressionAndCondition", - "name": "AngleTo4Way", - "private": true, - "sentence": "The angle _PARAM1_ 4-way index", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "mod(round(GetArgumentAsNumber(\"Angle\") * 4 / 360), 4)" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Angle", - "name": "Angle", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "the direction index (left = 1, bottom-left = 1... top-left = 7) for an angle (in degrees).", - "fullName": "Angle to 8-way index", - "functionType": "ExpressionAndCondition", - "name": "AngleTo8Way", - "private": true, - "sentence": "The angle _PARAM1_ 8-way index", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "sentence": "the multitouch controller identifier", + "events": [ { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "mod(round(GetArgumentAsNumber(\"Angle\") * 8 / 360), 8)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ControllerIdentifier" + ] + } ] } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Angle", - "name": "Angle", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Check if angle is in a given direction.", - "fullName": "Angle 4-way direction", - "functionType": "Condition", - "name": "IsAngleIn4WayDirection", - "private": true, - "sentence": "The angle _PARAM1_ is the 4-way direction _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Right\"" - ] + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo4Way" - }, - "parameters": [ - "", - "=", - "0", - "GetArgumentAsNumber(\"Angle\")", - "" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Down\"" - ] - }, + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ControllerIdentifier", + "name": "SetControllerIdentifier", + "sentence": "", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo4Way" - }, - "parameters": [ - "", - "=", - "1", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ControllerIdentifier", + "=", + "Value" + ] + } ] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Left\"" - ] - }, + "description": "the joystick name.", + "fullName": "Joystick name", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "JoystickIdentifier", + "sentence": "the joystick name", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo4Way" - }, - "parameters": [ - "", - "=", - "2", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "JoystickIdentifier" + ] + } ] } ], - "actions": [ + "expressionType": { + "type": "string" + }, + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Up\"" - ] - }, + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickIdentifier", + "name": "SetJoystickIdentifier", + "sentence": "", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo4Way" - }, - "parameters": [ - "", - "=", - "3", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "JoystickIdentifier", + "=", + "Value" + ] + } ] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] - } - ], - "parameters": [ - { - "description": "Angle", - "name": "Angle", - "type": "expression" + ], + "objectGroups": [] }, { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Check if angle is in a given direction.", - "fullName": "Angle 8-way direction", - "functionType": "Condition", - "name": "IsAngleIn8WayDirection", - "private": true, - "sentence": "The angle _PARAM1_ is the 8-way direction _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Right\"" - ] - }, + "description": "the dead zone radius (range: 0 to 1) of the joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", + "fullName": "Dead zone radius", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "DeadZoneRadius", + "sentence": "the dead zone radius", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "0", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "DeadZoneRadius" + ] + } ] } ], - "actions": [ + "expressionType": { + "type": "expression" + }, + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"DownRight\"" - ] - }, + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DeadZoneRadius", + "name": "SetDeadZoneRadius", + "sentence": "", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "1", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "DeadZoneRadius", + "=", + "Value" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetDeadZone" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "Value", + "" + ] + } ] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" } - ] + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Down\"" - ] - }, + "description": "Force the joystick into the pressing state.", + "fullName": "Force start pressing", + "functionType": "Action", + "name": "ForceStartPressing", + "sentence": "Force start pressing _PARAM0_ with touch identifier: _PARAM2_", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "2", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "Value" + ] + } ] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Touch identifier", + "name": "Value", + "type": "expression" } - ] + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "value": "Primary", + "type": "String", + "label": "Joystick name", + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "type": "Number", + "label": "Dead zone radius (range: 0 to 1)", + "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", + "name": "DeadZoneRadius" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick angle (range: -180 to 180)", + "hidden": true, + "name": "JoystickAngle" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick force (range: 0 to 1)", + "hidden": true, + "name": "JoystickForce" + }, + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "TouchIndex" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", + "fullName": "Multitouch button", + "name": "MultitouchButton", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"DownLeft\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsReleased", + "False", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Idle\"", + "" + ] + } ] }, { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "3", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Pressed\"", + "" + ] + } ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Left\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer())", + "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer())" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Radius", + ">", + "DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer()), TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer()))" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(TouchIndex)" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"JustPressed\"", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchIndex", + "+", + "1" + ] + } + ] + } + ] + } ] }, { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "4", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Released\"", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "False", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"UpLeft\"" - ] + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "5", - "GetArgumentAsNumber(\"Angle\")", - "" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"Up\"" - ] - }, + "description": "Check if the button was just pressed.", + "fullName": "Button just pressed", + "functionType": "Condition", + "name": "IsJustPressed", + "sentence": "Button _PARAM0_ was just pressed", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "6", - "GetArgumentAsNumber(\"Angle\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsJustPressed", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [ { - "type": { - "value": "BuiltinCommonInstructions::CompareStrings" - }, - "parameters": [ - "GetArgumentAsString(\"Direction\")", - "=", - "\"UpRight\"" - ] + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "value": "SpriteMultitouchJoystick::AngleTo8Way" - }, - "parameters": [ - "", - "=", - "7", - "GetArgumentAsNumber(\"Angle\")", - "" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Angle", - "name": "Angle", - "type": "expression" - }, - { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Check if joystick is pushed in a given direction.", - "fullName": "Joystick pushed in a direction (4-way)", - "functionType": "Condition", - "name": "IsDirectionPushed4Way", - "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the joystick has moved from center", - "comment2": "" + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::JoystickForce" - }, - "parameters": [ - "", - ">", - "SpriteMultitouchJoystick::DeadZone(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", - "GetArgumentAsNumber(\"ControllerIdentifier\")", - "GetArgumentAsString(\"JoystickIdentifier\")", - "" - ] - }, + "description": "Check if the button is pressed.", + "fullName": "Button pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Button _PARAM0_ is pressed", + "events": [ { - "type": { - "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" - }, - "parameters": [ - "", - "SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", - "GetArgumentAsString(\"Direction\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Joystick name", - "name": "JoystickIdentifier", - "supplementaryInformation": "[\"Primary\",\"Secondary\"]", - "type": "stringWithSelector" - }, - { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Check if joystick is pushed in a given direction.", - "fullName": "Joystick pushed in a direction (8-way)", - "functionType": "Condition", - "name": "IsDirectionPushed8Way", - "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the joystick has moved from center", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [ { - "type": { - "value": "SpriteMultitouchJoystick::JoystickForce" - }, - "parameters": [ - "", - ">", - "SpriteMultitouchJoystick::DeadZone(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", - "GetArgumentAsNumber(\"ControllerIdentifier\")", - "GetArgumentAsString(\"JoystickIdentifier\")", - "" - ] + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": { - "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" - }, - "parameters": [ - "", - "SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", - "GetArgumentAsString(\"Direction\")", - "" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" } ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Joystick name", - "name": "JoystickIdentifier", - "supplementaryInformation": "[\"Primary\",\"Secondary\"]", - "type": "stringWithSelector" - }, - { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", - "fullName": "Joystick force", - "functionType": "ExpressionAndCondition", - "name": "JoystickForce", - "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ force", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force)" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" + "objectGroups": [] }, { - "description": "Joystick name", - "name": "JoystickIdentifier", - "supplementaryInformation": "[\"Primary\",\"Secondary\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Change the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", - "fullName": "Joystick force", - "functionType": "Action", - "name": "SetJoystickForce", - "private": true, - "sentence": "Change the force of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "description": "Check if the button is released.", + "fullName": "Button released", + "functionType": "Condition", + "name": "IsReleased", + "sentence": "Button _PARAM0_ is released", + "events": [ { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force", - "=", - "GetArgumentAsNumber(\"Value\")" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsReleased", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } ] } - ] - } - ], - "parameters": [ - { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" - }, - { - "description": "Joystick name", - "name": "JoystickIdentifier", - "type": "string" + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] }, { - "description": "Value", - "name": "Value", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", - "functionType": "Expression", - "name": "JoystickAngle", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "fullName": "Button state", + "functionType": "Action", + "name": "SetButtonState", + "private": true, + "sentence": "Mark the button _PARAM0_ as _PARAM2_", + "events": [ { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Angle)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetButtonState" + }, + "parameters": [ + "", + "ControllerIdentifier", + "ButtonIdentifier", + "ButtonState", + "" + ] + } ] } - ] + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + }, + { + "description": "Button state", + "name": "ButtonState", + "supplementaryInformation": "[\"Idle\",\"JustPressed\",\"Pressed\",\"Released\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] } ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + "propertyDescriptors": [ { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" }, { - "description": "Joystick name", - "name": "JoystickIdentifier", - "supplementaryInformation": "[\"Primary\",\"Secondary\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", - "functionType": "Action", - "name": "SetJoystickAngle", - "private": true, - "sentence": "Change the angle of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", - "events": [ + "value": "A", + "type": "String", + "label": "Button identifier", + "name": "ButtonIdentifier" + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Angle", - "=", - "GetArgumentAsNumber(\"Value\")" - ] - } - ] - } - ], - "parameters": [ + "value": "0", + "type": "Number", + "label": "TouchID", + "hidden": true, + "name": "TouchId" + }, { - "description": "Multitouch controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier", - "type": "expression" + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "TouchIndex" }, { - "description": "Joystick name", - "name": "JoystickIdentifier", - "type": "string" + "value": "", + "type": "Boolean", + "label": "Button released", + "hidden": true, + "name": "IsReleased" }, { - "description": "Value", - "name": "Value", - "type": "expression" + "value": "", + "type": "Boolean", + "label": "Button just pressed", + "hidden": true, + "name": "IsJustPressed" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Triggering circle radius", + "description": "This circle adds up to the object collision mask.", + "name": "Radius" } ], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [ + "sharedPropertyDescriptors": [] + }, { - "description": "Joystick that can be controlled by interacting with a touchscreen.", - "fullName": "Multitouch Joystick", - "name": "MultitouchJoystick", + "description": "Control a platformer character with a multitouch controller.", + "fullName": "Platformer multitouch controller mapper", + "name": "PlatformerMultitouchMapper", "objectType": "", - "private": true, + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "onCreated", + "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Left\"", + "" + ] + } + ], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::SetDeadZone" + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "Object.Behavior::PropertyDeadZoneRadius()", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Right\"", "" ] - }, + } + ], + "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + "value": "PlatformBehavior::SimulateRightKey" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Property" + ] } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "type": "object" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "Property" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "onDeActivate", - "sentence": "", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JoystickIdentifier", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + "value": "PlatformBehavior::SimulateJumpKey" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "Property" + ] } ] } @@ -34540,12 +37734,64 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::PlatformerMultitouchMapper", "type": "behavior" } ], "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platform character behavior", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "choices": [], + "name": "Property" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D platformer multitouch controller mapper", + "name": "Platformer3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ { "fullName": "", "functionType": "Action", @@ -34557,195 +37803,69 @@ "conditions": [ { "type": { - "value": "HasGameJustResumed" + "value": "SpriteMultitouchJoystick::StickForce" }, - "parameters": [""] + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] } ], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "Object", + "PhysicsCharacter3D", + "=", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" + ] }, { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" }, - "parameters": ["\"Resumed!!!\"", "", ""] + "parameters": [ + "Object", + "PhysicsCharacter3D", + "-90", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] } ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Manage touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" - }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "=", "0"] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex())" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" - }, - "parameters": ["Object", "Behavior", "+", "1"] - } - ] - } - ] - } - ] - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" }, - "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" - }, - "parameters": ["Object", "Behavior", ""] - } + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" ] } ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Update joystick position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" - }, - "parameters": [ - "Object", - "Behavior", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0))", - "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0))" - ] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)) / Object.Width(), 0, 1)", - "" - ] - } + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -34757,83 +37877,124 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", "type": "behavior" } ], "objectGroups": [] - }, + } + ], + "propertyDescriptors": [ { - "description": "the joystick force (range: 0 to 1).", - "fullName": "Joystick force", - "functionType": "ExpressionAndCondition", - "name": "JoystickForce", - "sentence": "the joystick force", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": ["Object.Behavior::PropertyJoystickForce()"] - } - ] - } + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ { - "description": "Object", - "name": "Object", - "type": "object" + "label": "Primary", + "value": "Primary" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", - "type": "behavior" + "label": "Secondary", + "value": "Secondary" } ], - "objectGroups": [] + "name": "JoystickIdentifier" }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D shooter multitouch controller mapper", + "name": "Shooter3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ { "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "JoystickForce", - "name": "SetJoystickForce", - "private": true, + "functionType": "Action", + "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" }, "parameters": [ "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + "PhysicsCharacter3D", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::SetJoystickForce" + "value": "SpriteMultitouchJoystick::IsButtonPressed" }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "Object.Behavior::PropertyJoystickForce()", - "" + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" ] } ] @@ -34848,35 +38009,151 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::Shooter3DMultitouchMapper", "type": "behavior" } ], "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" }, { - "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", - "functionType": "Expression", - "name": "JoystickAngle", + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control camera rotations with a multitouch controller.", + "fullName": "First person camera multitouch controller mapper", + "name": "FirstPersonMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO It's probably a bad idea to rotate the object around Y." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentRotationSpeedZ", + "=", + "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedZ, SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "+", + "CurrentRotationSpeedZ * TimeDelta()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentRotationSpeedY", + "=", + "SpriteMultitouchJoystick::AcceleratedSpeed(CurrentRotationSpeedY, SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Object", + "Object3D", + "+", + "CurrentRotationSpeedY * TimeDelta()" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "Object", + "Object3D", + "=", + "clamp(Object.Object3D::RotationY(), VerticalAngleMin, VerticalAngleMax)" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper::LookFromObjectEyes" }, - "parameters": ["Object.Behavior::PropertyJoystickAngle()"] + "parameters": [ + "Object", + "Behavior", + "" + ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -34886,19 +38163,20 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", + "description": "Move the camera to look though _PARAM1_ eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.", + "fullName": "Look through object eyes", "functionType": "Action", - "name": "SetJoystickAngle", + "group": "Layers and cameras", + "name": "LookFromObjectEyes", "private": true, - "sentence": "Change the joystick angle of _PARAM0_ to _PARAM2_", + "sentence": "Move the camera to look though _PARAM0_ eyes", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -34906,24 +38184,61 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" + "value": "CentreCamera" }, "parameters": [ + "", "Object", - "Behavior", + "", + "Object.Layer()", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraZ" + }, + "parameters": [ + "", "=", - "GetArgumentAsNumber(\"Value\")" + "Object.Object3D::Z() + Object.Object3D::Depth() + OffsetZ", + "", + "" ] }, { "type": { - "value": "SpriteMultitouchJoystick::SetJoystickAngle" + "value": "Scene3D::SetCameraRotationX" + }, + "parameters": [ + "", + "=", + "- Object.Object3D::RotationY() + 90", + "GetArgumentAsString(\"Layer\")", + "" + ] + }, + { + "type": { + "value": "Scene3D::SetCameraRotationY" + }, + "parameters": [ + "", + "=", + "Object.Object3D::RotationX()", + "GetArgumentAsString(\"Layer\")", + "" + ] + }, + { + "type": { + "value": "SetCameraAngle" }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "Object.Behavior::PropertyJoystickAngle()", + "=", + "Object.Angle() + 90", + "Object.Layer()", "" ] } @@ -34939,60 +38254,38 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" - }, - { - "description": "Angle", - "name": "Value", - "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if joystick is pushed in a given direction.", - "fullName": "Joystick pushed in a direction (4-way movement)", - "functionType": "Condition", - "name": "IsDirectionPushed4Way", - "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "description": "the maximum horizontal rotation speed of the object.", + "fullName": "Maximum horizontal rotation speed", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "HorizontalRotationSpeedMax", + "sentence": "the maximum horizontal rotation speed", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "Object.Behavior::PropertyDeadZoneRadius()" - ] - }, + "conditions": [], + "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + "value": "SetReturnNumber" }, "parameters": [ - "", - "Object.Behavior::JoystickAngle()", - "GetArgumentAsString(\"Direction\")", - "" + "HorizontalRotationSpeedMax" ] } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -35002,58 +38295,33 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" - }, - { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", - "type": "stringWithSelector" } ], "objectGroups": [] }, { - "description": "Check if joystick is pushed in a given direction.", - "fullName": "Joystick pushed in a direction (8-way movement)", - "functionType": "Condition", - "name": "IsDirectionPushed8Way", - "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HorizontalRotationSpeedMax", + "name": "SetHorizontalRotationSpeedMax", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyJoystickForce" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "Object.Behavior::PropertyDeadZoneRadius()" - ] - }, + "conditions": [], + "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" + "value": "SetNumberVariable" }, "parameters": [ - "", - "Object.Behavior::JoystickAngle()", - "GetArgumentAsString(\"Direction\")", - "" + "HorizontalRotationSpeedMax", + "=", + "Value" ] } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": ["True"] - } ] } ], @@ -35066,45 +38334,38 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" - }, - { - "description": "Direction", - "name": "Direction", - "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", - "type": "stringWithSelector" } ], "objectGroups": [] }, { - "description": "Check if a joystick is pressed.", - "fullName": "Joystick pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "Joystick _PARAM0_ is pressed", + "description": "the horizontal rotation acceleration of the object.", + "fullName": "Horizontal rotation acceleration", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "HorizontalRotationAcceleration", + "sentence": "the horizontal rotation acceleration", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" - }, - "parameters": ["Object", "Behavior", "!=", "0"] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, - "parameters": ["True"] + "parameters": [ + "HorizontalRotationAcceleration" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -35114,19 +38375,18 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Reset the joystick values (except for angle, which stays the same)", - "fullName": "Reset", - "functionType": "Action", - "name": "Reset", - "private": true, - "sentence": "Reset the joystick of _PARAM0_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HorizontalRotationAcceleration", + "name": "SetHorizontalRotationAcceleration", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -35134,15 +38394,13 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" - }, - "parameters": ["Object", "Behavior", "=", "0", ""] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "HorizontalRotationAcceleration", + "=", + "Value" + ] } ] } @@ -35156,19 +38414,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the multitouch controller identifier.", - "fullName": "Multitouch controller identifier", + "description": "the horizontal rotation deceleration of the object.", + "fullName": "Horizontal rotation deceleration", "functionType": "ExpressionAndCondition", - "group": "Multitouch Joystick configuration", - "name": "ControllerIdentifier", - "sentence": "the multitouch controller identifier", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", + "name": "HorizontalRotationDeceleration", + "sentence": "the horizontal rotation deceleration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -35179,7 +38437,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyControllerIdentifier()" + "HorizontalRotationDeceleration" ] } ] @@ -35197,7 +38455,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], @@ -35206,8 +38464,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "ControllerIdentifier", - "name": "SetControllerIdentifier", + "getterName": "HorizontalRotationDeceleration", + "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ { @@ -35216,13 +38474,12 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyControllerIdentifier" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "HorizontalRotationDeceleration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -35237,19 +38494,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the joystick name.", - "fullName": "Joystick name", + "description": "the maximum vertical rotation speed of the object.", + "fullName": "Maximum vertical rotation speed", "functionType": "ExpressionAndCondition", - "group": "Multitouch Joystick configuration", - "name": "JoystickIdentifier", - "sentence": "the joystick name", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalRotationSpeedMax", + "sentence": "the maximum vertical rotation speed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -35257,17 +38514,17 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyJoystickIdentifier()" + "VerticalRotationSpeedMax" ] } ] } ], "expressionType": { - "type": "string" + "type": "expression" }, "parameters": [ { @@ -35278,7 +38535,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], @@ -35287,8 +38544,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "JoystickIdentifier", - "name": "SetJoystickIdentifier", + "getterName": "VerticalRotationSpeedMax", + "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ { @@ -35297,13 +38554,12 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickIdentifier" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationSpeedMax", "=", - "GetArgumentAsString(\"Value\")" + "Value" ] } ] @@ -35318,19 +38574,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "the dead zone radius (range: 0 to 1) of the joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", - "fullName": "Dead zone radius", + "description": "the vertical rotation acceleration of the object.", + "fullName": "Vertical rotation acceleration", "functionType": "ExpressionAndCondition", - "group": "Multitouch Joystick configuration", - "name": "DeadZoneRadius", - "sentence": "the dead zone radius", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalRotationAcceleration", + "sentence": "the vertical rotation acceleration", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -35341,7 +38597,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyDeadZoneRadius()" + "VerticalRotationAcceleration" ] } ] @@ -35359,7 +38615,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], @@ -35368,8 +38624,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "DeadZoneRadius", - "name": "SetDeadZoneRadius", + "getterName": "VerticalRotationAcceleration", + "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ { @@ -35378,13 +38634,12 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyDeadZoneRadius" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "VerticalRotationAcceleration", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] } ] @@ -35399,245 +38654,153 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "1", - "type": "Number", - "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "String", - "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "JoystickIdentifier" - }, - { - "value": "0.4", - "type": "Number", - "label": "Dead zone radius (range: 0 to 1)", - "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "DeadZoneRadius" - }, - { - "value": "0", - "type": "Number", - "label": "Joystick angle (range: -180 to 180)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "JoystickAngle" - }, - { - "value": "0", - "type": "Number", - "label": "Joystick force (range: 0 to 1)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "JoystickForce" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" }, { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIndex" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "Detect button presses made on a touchscreen.", - "fullName": "Multitouch button", - "name": "MultitouchButton", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", + "description": "the vertical rotation deceleration of the object.", + "fullName": "Vertical rotation deceleration", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalRotationDeceleration", + "sentence": "the vertical rotation deceleration", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::IsReleased" + "value": "SetReturnNumber" }, - "parameters": ["Object", "Behavior", ""] + "parameters": [ + "VerticalRotationDeceleration" + ] } - ], + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalRotationDeceleration", + "name": "SetVerticalRotationDeceleration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" - }, - "parameters": ["Object", "Behavior", "no"] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "\"Idle\"", ""] + "parameters": [ + "VerticalRotationDeceleration", + "=", + "Value" + ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the minimum vertical camera angle of the object.", + "fullName": "Minimum vertical camera angle", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalAngleMin", + "sentence": "the minimum vertical camera angle", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" - }, - "parameters": ["Object", "Behavior", ""] - }, - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [""] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + "value": "SetReturnNumber" }, - "parameters": ["Object", "Behavior", "=", "0"] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex())" - ] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" - }, - "parameters": [ - "Object", - "Behavior", - "\"Pressed\"", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" - }, - "parameters": ["Object", "Behavior", "+", "1"] - } - ] - } + "parameters": [ + "VerticalAngleMin" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalAngleMin", + "name": "SetVerticalAngleMin", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" - }, - "parameters": ["Object", "Behavior", ""] - }, - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": ["", "Object.Behavior::PropertyTouchId()"] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" - }, - "parameters": ["Object", "Behavior", "\"Released\"", ""] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" - }, - "parameters": ["Object", "Behavior", "yes"] - }, - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "=", "0"] + "parameters": [ + "VerticalAngleMin", + "=", + "Value" + ] } ] } @@ -35651,39 +38814,38 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if button is released.", - "fullName": "Button released", - "functionType": "Condition", - "name": "IsReleased", - "sentence": "Button _PARAM0_ is released", + "description": "the maximum vertical camera angle of the object.", + "fullName": "Maximum vertical camera angle", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper vertical rotation configuration", + "name": "VerticalAngleMax", + "sentence": "the maximum vertical camera angle", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyIsReleased" - }, - "parameters": ["Object", "Behavior"] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, - "parameters": ["True"] + "parameters": [ + "VerticalAngleMax" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -35693,39 +38855,77 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if button is pressed.", - "fullName": "Button pressed", - "functionType": "Condition", - "name": "IsPressed", - "sentence": "Button _PARAM0_ is pressed", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "VerticalAngleMax", + "name": "SetVerticalAngleMax", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyTouchId" + "value": "SetNumberVariable" }, - "parameters": ["Object", "Behavior", "!=", "0"] + "parameters": [ + "VerticalAngleMax", + "=", + "Value" + ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the z position offset of the object.", + "fullName": "Z position offset", + "functionType": "ExpressionAndCondition", + "group": "First person camera multitouch controller mapper position configuration", + "name": "OffsetZ", + "sentence": "the z position offset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetReturnNumber" }, - "parameters": ["True"] + "parameters": [ + "OffsetZ" + ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -35735,18 +38935,18 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" } ], "objectGroups": [] }, { - "fullName": "Button state", - "functionType": "Action", - "name": "SetButtonState", - "private": true, - "sentence": "Mark the button _PARAM0_ as _PARAM2_", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "OffsetZ", + "name": "SetOffsetZ", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -35754,14 +38954,12 @@ "actions": [ { "type": { - "value": "SpriteMultitouchJoystick::SetButtonState" + "value": "SetNumberVariable" }, "parameters": [ - "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyButtonIdentifier()", - "GetArgumentAsString(\"ButtonState\")", - "" + "OffsetZ", + "=", + "Value" ] } ] @@ -35776,78 +38974,140 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "supplementaryInformation": "SpriteMultitouchJoystick::FirstPersonMultitouchMapper", "type": "behavior" - }, - { - "description": "Button state", - "name": "ButtonState", - "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", - "type": "stringWithSelector" } ], "objectGroups": [] } ], "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D capability", + "extraInformation": [ + "Scene3D::Base3DBehavior" + ], + "choices": [], + "name": "Object3D" + }, { "value": "1", "type": "Number", - "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, + "label": "Controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier" }, { - "value": "A", - "type": "String", - "label": "Button identifier", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "ButtonIdentifier" + "value": "Secondary", + "type": "Choice", + "label": "Camera joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "CameraStick" + }, + { + "value": "180", + "type": "Number", + "unit": "AngularSpeed", + "label": "Maximum rotation speed", + "group": "Horizontal rotation", + "name": "HorizontalRotationSpeedMax" + }, + { + "value": "360", + "type": "Number", + "label": "Rotation acceleration", + "group": "Horizontal rotation", + "name": "HorizontalRotationAcceleration" + }, + { + "value": "720", + "type": "Number", + "label": "Rotation deceleration", + "group": "Horizontal rotation", + "name": "HorizontalRotationDeceleration" + }, + { + "value": "120", + "type": "Number", + "unit": "AngularSpeed", + "label": "Maximum rotation speed", + "group": "Vertical rotation", + "name": "VerticalRotationSpeedMax" + }, + { + "value": "240", + "type": "Number", + "label": "Rotation acceleration", + "group": "Vertical rotation", + "name": "VerticalRotationAcceleration" + }, + { + "value": "480", + "type": "Number", + "label": "Rotation deceleration", + "group": "Vertical rotation", + "name": "VerticalRotationDeceleration" + }, + { + "value": "-90", + "type": "Number", + "unit": "DegreeAngle", + "label": "Minimum angle", + "group": "Vertical rotation", + "name": "VerticalAngleMin" + }, + { + "value": "90", + "type": "Number", + "unit": "DegreeAngle", + "label": "Maximum angle", + "group": "Vertical rotation", + "name": "VerticalAngleMax" }, { "value": "0", "type": "Number", - "label": "TouchID", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" + "unit": "Pixel", + "label": "Z position offset", + "group": "Position", + "name": "OffsetZ" }, { - "value": "", + "value": "0", "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], + "unit": "AngularSpeed", + "label": "Current rotation speed Z", "hidden": true, - "name": "TouchIndex" + "name": "CurrentRotationSpeedZ" }, { - "value": "", - "type": "Boolean", - "label": "Button released", - "description": "", - "group": "", - "extraInformation": [], + "value": "0", + "type": "Number", + "unit": "AngularSpeed", + "label": "Current rotation speed Y", "hidden": true, - "name": "IsReleased" + "name": "CurrentRotationSpeedY" } ], "sharedPropertyDescriptors": [] }, { - "description": "Control a platformer character with a multitouch controller.", - "fullName": "Platformer multitouch controller mapper", - "name": "PlatformerMultitouchMapper", + "description": "Control a 3D physics car with a multitouch controller.", + "fullName": "3D car multitouch controller mapper", + "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -35860,13 +39120,14 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "\"Left\"", + ">", + "0", + "ControllerIdentifier", + "SteerJoystickIdentifier", "" ] } @@ -35874,35 +39135,14 @@ "actions": [ { "type": { - "value": "PlatformBehavior::SimulateLeftKey" - }, - "parameters": ["Object", "Property"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + "value": "Physics3D::PhysicsCar3D::SimulateSteeringStick" }, "parameters": [ - "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "\"Right\"", - "" + "Object", + "PhysicsCar3D", + "SpriteMultitouchJoystick::StickForceX(ControllerIdentifier, \"Primary\")" ] } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateRightKey" - }, - "parameters": ["Object", "Property"] - } ] }, { @@ -35910,13 +39150,14 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + "value": "SpriteMultitouchJoystick::StickForce" }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "\"Up\"", + ">", + "0", + "ControllerIdentifier", + "SpeedJoystickIdentifier", "" ] } @@ -35924,41 +39165,14 @@ "actions": [ { "type": { - "value": "PlatformBehavior::SimulateUpKey" - }, - "parameters": ["Object", "Property"] - }, - { - "type": { - "value": "PlatformBehavior::SimulateLadderKey" - }, - "parameters": ["Object", "Property"] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + "value": "Physics3D::PhysicsCar3D::SimulateAcceleratorStick" }, "parameters": [ - "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", - "\"Down\"", - "" + "Object", + "PhysicsCar3D", + "-SpriteMultitouchJoystick::StickForceY(ControllerIdentifier, \"Secondary\")" ] } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateDownKey" - }, - "parameters": ["Object", "Property"] - } ] }, { @@ -35970,8 +39184,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJumpButton()", + "ControllerIdentifier", + "HandBrakeButton", "\"Down\"" ] } @@ -35979,9 +39193,12 @@ "actions": [ { "type": { - "value": "PlatformBehavior::SimulateJumpKey" + "value": "Physics3D::PhysicsCar3D::SimulateHandBrakeKey" }, - "parameters": ["Object", "Property"] + "parameters": [ + "Object", + "PhysicsCar3D" + ] } ] } @@ -35995,7 +39212,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::PlatformerMultitouchMapper", + "supplementaryInformation": "SpriteMultitouchJoystick::PhysicsCar3DMultitouchMapper", "type": "behavior" } ], @@ -36006,44 +39223,59 @@ { "value": "", "type": "Behavior", - "label": "Platform character behavior", - "description": "", - "group": "", + "label": "3D physics car", "extraInformation": [ - "PlatformBehavior::PlatformerObjectBehavior" + "Physics3D::PhysicsCar3D" ], - "hidden": false, - "name": "Property" + "choices": [], + "name": "PhysicsCar3D" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", - "label": "Joystick name", - "description": "", + "label": "Steer joystick", "group": "Controls", - "extraInformation": ["Primary", "Secondary"], - "hidden": false, - "name": "JoystickIdentifier" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SteerJoystickIdentifier" }, { - "value": "A", + "value": "Secondary", + "type": "Choice", + "label": "Speed joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "SpeedJoystickIdentifier" + }, + { + "value": "B", "type": "String", - "label": "Jump button name", - "description": "", + "label": "Hand brake button name", "group": "Controls", - "extraInformation": [], - "hidden": false, - "name": "JumpButton" + "name": "HandBrakeButton" } ], "sharedPropertyDescriptors": [] @@ -36053,6 +39285,7 @@ "fullName": "Top-down multitouch controller mapper", "name": "TopDownMultitouchMapper", "objectType": "", + "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { "fullName": "", @@ -36065,9 +39298,13 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"Analog\""] + "parameters": [ + "StickMode", + "=", + "\"Analog\"" + ] } ], "actions": [ @@ -36078,8 +39315,8 @@ "parameters": [ "Object", "TopDownMovement", - "SpriteMultitouchJoystick::JoystickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", - "SpriteMultitouchJoystick::JoystickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())" + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" ] } ] @@ -36089,9 +39326,13 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, - "parameters": ["Object", "Behavior", "=", "\"360°\""] + "parameters": [ + "StickMode", + "=", + "\"360°\"" + ] } ], "actions": [ @@ -36102,8 +39343,8 @@ "parameters": [ "Object", "TopDownMovement", - "SpriteMultitouchJoystick::JoystickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", - "sign(SpriteMultitouchJoystick::JoystickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier()))" + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", + "sign(SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier))" ] } ] @@ -36113,11 +39354,10 @@ "conditions": [ { "type": { - "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "StickMode", "=", "\"8 Directions\"" ] @@ -36133,7 +39373,10 @@ "inverted": true, "value": "TopDownMovementBehavior::DiagonalsAllowed" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ], "actions": [], @@ -36147,8 +39390,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Left\"", "" ] @@ -36159,7 +39402,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36172,8 +39418,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Right\"", "" ] @@ -36184,7 +39430,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36197,8 +39446,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Up\"", "" ] @@ -36209,7 +39458,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36222,8 +39474,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Down\"", "" ] @@ -36234,7 +39486,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] } @@ -36247,7 +39502,10 @@ "type": { "value": "TopDownMovementBehavior::DiagonalsAllowed" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ], "actions": [], @@ -36261,8 +39519,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Left\"", "" ] @@ -36273,7 +39531,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36286,8 +39547,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Right\"", "" ] @@ -36298,7 +39559,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36311,8 +39575,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Up\"", "" ] @@ -36323,7 +39587,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36336,8 +39603,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"Down\"", "" ] @@ -36348,7 +39615,10 @@ "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36361,8 +39631,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"UpLeft\"", "" ] @@ -36373,13 +39643,19 @@ "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] }, { "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36392,8 +39668,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"UpRight\"", "" ] @@ -36404,13 +39680,19 @@ "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] }, { "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36423,8 +39705,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"DownLeft\"", "" ] @@ -36435,13 +39717,19 @@ "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] }, { "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] }, @@ -36454,8 +39742,8 @@ }, "parameters": [ "", - "Object.Behavior::PropertyControllerIdentifier()", - "Object.Behavior::PropertyJoystickIdentifier()", + "ControllerIdentifier", + "JoystickIdentifier", "\"DownRight\"", "" ] @@ -36466,13 +39754,19 @@ "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] }, { "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, - "parameters": ["Object", "TopDownMovement"] + "parameters": [ + "Object", + "TopDownMovement" + ] } ] } @@ -36502,54 +39796,178 @@ "value": "", "type": "Behavior", "label": "Top-down movement behavior", - "description": "", - "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], - "hidden": false, + "choices": [], "name": "TopDownMovement" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": ["Primary", "Secondary"], - "hidden": false, + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], "name": "JoystickIdentifier" }, { "value": "Analog", "type": "Choice", "label": "Stick mode", - "description": "", "group": "Controls", - "extraInformation": ["Analog", "360°", "8 Directions"], - "hidden": false, + "choices": [ + { + "label": "Analog", + "value": "Analog" + }, + { + "label": "360°", + "value": "360°" + }, + { + "label": "8 Directions", + "value": "8 Directions" + } + ], "name": "StickMode" } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "defaultName": "Joystick", - "description": "Joystick for touchscreens.", - "fullName": "Multitouch Joystick", - "name": "SpriteMultitouchJoystick", + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Joystick", + "description": "Joystick for touchscreens.", + "fullName": "Multitouch Joystick", + "isUsingLegacyInstancesRenderer": true, + "name": "SpriteMultitouchJoystick", + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Thumb", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Border", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "MultitouchJoystick", + "type": "SpriteMultitouchJoystick::MultitouchJoystick", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Primary", + "FloatingEnabled": false, + "DeadZoneRadius": 0.4, + "JoystickAngle": 0, + "JoystickForce": 0, + "TouchId": 0, + "TouchIndex": 0 + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Thumb" + }, + { + "objectName": "Border" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [], + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -36565,43 +39983,87 @@ "type": { "value": "Create" }, - "parameters": ["", "Border", "0", "0", ""] + "parameters": [ + "", + "Border", + "0", + "0", + "" + ] }, { "type": { "value": "Create" }, - "parameters": ["", "Thumb", "0", "0", ""] + "parameters": [ + "", + "Thumb", + "0", + "0", + "" + ] }, { "type": { "value": "ChangePlan" }, - "parameters": ["Border", "=", "1"] + "parameters": [ + "Border", + "=", + "1" + ] }, { "type": { "value": "ChangePlan" }, - "parameters": ["Thumb", "=", "2"] + "parameters": [ + "Thumb", + "=", + "2" + ] }, { "type": { "value": "SetCenter" }, - "parameters": ["Border", "=", "0", "=", "0"] + "parameters": [ + "Border", + "=", + "0", + "=", + "0" + ] }, { "type": { "value": "SetCenter" }, - "parameters": ["Thumb", "=", "0", "=", "0"] + "parameters": [ + "Thumb", + "=", + "0", + "=", + "0" + ] }, { "type": { "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "Thumb", + "" + ] } ] } @@ -36624,17 +40086,90 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "MettreAutour" + "inverted": true, + "value": "SpriteMultitouchJoystick::IsInGameEdition" }, "parameters": [ - "Thumb", - "Border", - "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", - "Border.MultitouchJoystick::JoystickAngle()" + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "Thumb", + "Border", + "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "True", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" + }, + "parameters": [ + "Object", + "no", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "False", + "" + ] + } ] } ] @@ -36664,7 +40199,10 @@ "type": { "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" }, - "parameters": ["Object", ""] + "parameters": [ + "Object", + "" + ] } ] } @@ -36699,7 +40237,7 @@ "Border", "MultitouchJoystick", "=", - "Object.PropertyControllerIdentifier()", + "ControllerIdentifier", "" ] }, @@ -36711,7 +40249,7 @@ "Border", "MultitouchJoystick", "=", - "Object.PropertyJoystickIdentifier()", + "JoystickIdentifier", "" ] }, @@ -36723,7 +40261,92 @@ "Border", "MultitouchJoystick", "=", - "Object.PropertyDeadZoneRadius()", + "DeadZoneRadius", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Show the joystick until it is released.", + "fullName": "Show and start pressing", + "functionType": "Action", + "name": "TeleportAndPress", + "sentence": "Show _PARAM0_ at the cursor position and start pressing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Object", + "=", + "Object.ParentTouchX(StartedTouchOrMouseId(0))", + "=", + "Object.ParentTouchY(StartedTouchOrMouseId(0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::ActivateControl" + }, + "parameters": [ + "Object", + "yes", + "" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "ShouldBeHiddenWhenReleased", + "True", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::ForceStartPressing" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "StartedTouchOrMouseId(0)", "" ] } @@ -36740,6 +40363,92 @@ ], "objectGroups": [] }, + { + "description": "Return the X position of a specified touch", + "fullName": "Touch X position (on parent)", + "functionType": "Expression", + "name": "ParentTouchX", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const touchId = eventsFunctionContext.getArgument(\"TouchId\");", + "eventsFunctionContext.returnValue = gdjs.evtTools.input.getTouchX(object.getInstanceContainer(), touchId, object.getLayer());" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Touch identifier", + "name": "TouchId", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the X position of a specified touch", + "fullName": "Touch X position (on parent)", + "functionType": "Expression", + "name": "ParentTouchY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const touchId = eventsFunctionContext.getArgument(\"TouchId\");", + "eventsFunctionContext.returnValue = gdjs.evtTools.input.getTouchY(object.getInstanceContainer(), touchId, object.getLayer());" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Touch identifier", + "name": "TouchId", + "type": "expression" + } + ], + "objectGroups": [] + }, { "description": "De/activate control of the joystick.", "fullName": "De/activate control", @@ -36753,9 +40462,13 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -36763,7 +40476,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Border", "MultitouchJoystick", "no"] + "parameters": [ + "Border", + "MultitouchJoystick", + "no" + ] } ] }, @@ -36772,9 +40489,13 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, - "parameters": ["\"ShouldActivate\""] + "parameters": [ + "ShouldActivate", + "True", + "" + ] } ], "actions": [ @@ -36782,7 +40503,11 @@ "type": { "value": "ActivateBehavior" }, - "parameters": ["Border", "MultitouchJoystick", "yes"] + "parameters": [ + "Border", + "MultitouchJoystick", + "yes" + ] } ] } @@ -36803,11 +40528,11 @@ "objectGroups": [] }, { - "description": "Check if a joystick is pressed.", - "fullName": "Joystick pressed", + "description": "Check if a stick is pressed.", + "fullName": "Stick pressed", "functionType": "Condition", "name": "IsPressed", - "sentence": "Joystick _PARAM0_ is pressed", + "sentence": "Stick _PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -36816,7 +40541,11 @@ "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsPressed" }, - "parameters": ["Border", "MultitouchJoystick", "!="] + "parameters": [ + "Border", + "MultitouchJoystick", + "!=" + ] } ], "actions": [ @@ -36824,7 +40553,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -36840,10 +40571,11 @@ "objectGroups": [] }, { - "description": "the joystick force (range: 0 to 1).", - "fullName": "Joystick force", + "description": "the joystick force (from 0 to 1).", + "fullName": "Joystick force (deprecated)", "functionType": "ExpressionAndCondition", "name": "JoystickForce", + "private": true, "sentence": "the joystick force", "events": [ { @@ -36855,7 +40587,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Border.MultitouchJoystick::PropertyJoystickForce()" + "Border.MultitouchJoystick::JoystickForce()" ] } ] @@ -36875,10 +40607,151 @@ "objectGroups": [] }, { - "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", - "fullName": "Joystick angle", + "description": "the strick force (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "the stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickForce()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "ExpressionAndCondition", + "name": "StickForceX", + "sentence": "the stick X force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "ExpressionAndCondition", + "name": "StickForceY", + "sentence": "the stick Y force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (from -180 to 180).", + "fullName": "Joystick angle (deprecated)", "functionType": "Expression", "name": "JoystickAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the stick is pointing towards (from -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", "sentence": "", "events": [ { @@ -36890,7 +40763,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Border.MultitouchJoystick::PropertyJoystickAngle()" + "Border.MultitouchJoystick::JoystickAngle()" ] } ] @@ -36926,7 +40799,7 @@ "parameters": [ "Border", "MultitouchJoystick", - "GetArgumentAsString(\"Direction\")", + "Direction", "" ] } @@ -36936,7 +40809,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -36974,7 +40849,7 @@ "parameters": [ "Border", "MultitouchJoystick", - "GetArgumentAsString(\"Direction\")", + "Direction", "" ] } @@ -36984,7 +40859,9 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": ["True"] + "parameters": [ + "True" + ] } ] } @@ -37060,7 +40937,7 @@ "Border", "MultitouchJoystick", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -37132,7 +41009,7 @@ "Border", "MultitouchJoystick", "=", - "GetArgumentAsString(\"Value\")", + "Value", "" ] } @@ -37204,7 +41081,7 @@ "Border", "MultitouchJoystick", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -37227,20 +41104,22 @@ "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", - "description": "", - "group": "", - "extraInformation": ["Primary", "Secondary"], - "hidden": false, + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], "name": "JoystickIdentifier" }, { @@ -37248,9 +41127,6 @@ "type": "Number", "label": "Dead zone radius (range: 0 to 1)", "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", - "group": "", - "extraInformation": [], - "hidden": false, "name": "DeadZoneRadius" }, { @@ -37258,8 +41134,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -37268,8 +41146,6 @@ "type": "Number", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -37278,8 +41154,10 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": ["Thumb"], + "extraInformation": [ + "Thumb" + ], + "choices": [], "hidden": true, "name": "ThumbIsScaledProportionally" }, @@ -37288,77 +41166,21 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", - "extraInformation": [], "hidden": true, "name": "ParentOrigin" - } - ], - "objects": [ - { - "assetStoreId": "", - "name": "Thumb", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] }, { - "assetStoreId": "", - "name": "Border", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "MultitouchJoystick", - "type": "SpriteMultitouchJoystick::MultitouchJoystick", - "ControllerIdentifier": 1, - "JoystickIdentifier": "Primary", - "FloatingEnabled": false, - "DeadZoneRadius": 0.4, - "JoystickAngle": 0, - "JoystickForce": 0, - "TouchId": 0, - "TouchIndex": 0 - } - ], - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [] - } - ] - } - ] + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "ShouldBeHiddenWhenReleased" } - ] + ], + "variants": [] } ] } ], - "externalLayouts": [], - "externalSourceFiles": [] -} + "externalLayouts": [] +} \ No newline at end of file diff --git a/examples/tween-test/tween-test.json b/examples/tween-test/tween-test.json index 3ac442c2b..d5a9e0208 100644 --- a/examples/tween-test/tween-test.json +++ b/examples/tween-test/tween-test.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 245, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -19,7 +19,6 @@ "sizeOnStartupMode": "adaptWidth", "templateSlug": "", "useDeprecatedZeroAsDefaultZOrder": true, - "useExternalSourceFiles": false, "version": "1.0.0", "name": "Tween", "description": "", @@ -54,7 +53,9 @@ "authorIds": [], "authorUsernames": [], "categories": [], - "playableDevices": [], + "playableDevices": [ + "mobile" + ], "extensionProperties": [], "platforms": [ { @@ -66,7 +67,6 @@ "resources": { "resources": [ { - "alwaysLoaded": false, "file": "Sprite-1.png", "kind": "image", "metadata": "", @@ -75,7 +75,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "Background-1.png", "kind": "image", "metadata": "", @@ -84,7 +83,6 @@ "userAdded": true }, { - "alwaysLoaded": false, "file": "assets/Blue Button_Hovered.png", "kind": "image", "metadata": "", @@ -97,7 +95,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Blue Button_Idle.png", "kind": "image", "metadata": "", @@ -110,7 +107,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Blue Button_Pressed.png", "kind": "image", "metadata": "", @@ -123,7 +119,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Slider Border.png", "kind": "image", "metadata": "", @@ -136,7 +131,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Slider Fill Bar.png", "kind": "image", "metadata": "", @@ -149,7 +143,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Square White Slider Thumb.png", "kind": "image", "metadata": "", @@ -173,7 +166,6 @@ } }, { - "alwaysLoaded": false, "file": "assets/Ground Green_Idle.png", "kind": "image", "metadata": "", @@ -185,8 +177,7 @@ "name": "Ground Green_Idle.png" } } - ], - "resourceFolders": [] + ] }, "objects": [], "objectsFolderStructure": { @@ -210,13 +201,16 @@ "gridType": "rectangular", "gridWidth": 10, "gridHeight": 10, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.25, "snap": true, "zoomFactor": 0.8890566637232372, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -1006,6 +1000,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Variable tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1050,6 +1066,28 @@ "b": 239, "g": 198, "r": 173 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "0", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "173;198;239" } }, { @@ -1071,6 +1109,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Position tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1156,6 +1216,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Position X tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1241,6 +1323,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Position Y\n tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1326,6 +1430,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Angle \ntweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1411,6 +1537,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Scale tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1496,6 +1644,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Scale-X tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1581,6 +1751,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Scale-Y\ntweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1666,6 +1858,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Opacity tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1751,6 +1965,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Colour tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1772,6 +2008,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "0", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -1985,6 +2243,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Height tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2006,6 +2286,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Width tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2027,6 +2329,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Character size", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2063,6 +2387,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Hello world", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -2109,7 +2455,9 @@ { "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "AllButton", + "persistentUuid": "e1e5da7c-ee9b-4118-9e18-aba7dfb0facd", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Blue Button 2", "variables": [], "effects": [], "behaviors": [], @@ -2119,60 +2467,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Tween all", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 99, - "g": 69, - "r": 28 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Tween all" } }, { "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", "name": "TimeScaleSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square white slider", "variables": [], "effects": [], "behaviors": [], @@ -2186,53 +2489,6 @@ "MaxValue": 2, "StepSize": 0.125, "InitialValue": 1 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 28, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square White Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 265 - }, - "FillBar": { - "bottomMargin": 2, - "height": 16, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Square White Slider Fill Bar.png", - "tiled": false, - "topMargin": 0, - "width": 16 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 221, - "g": 221, - "r": 221 - } - }, - "Thumb": { - "bottomMargin": 2, - "height": 36, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square White Slider Thumb.png", - "tiled": false, - "topMargin": 2, - "width": 22 - } } }, { @@ -2269,6 +2525,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Time scale", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } } ], @@ -3682,9 +3960,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -3760,13 +4040,16 @@ "gridType": "rectangular", "gridWidth": 10, "gridHeight": 10, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.25, "snap": true, "zoomFactor": 0.8890566637232372, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -4556,6 +4839,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Variable tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -4600,6 +4905,28 @@ "b": 239, "g": 198, "r": 173 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "0", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "173;198;239" } }, { @@ -4621,6 +4948,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Position tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -4706,6 +5055,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Position X tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -4791,6 +5162,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Position Y\n tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -4876,6 +5269,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Angle \ntweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -4961,6 +5376,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Scale tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5046,6 +5483,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Scale-X tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5131,6 +5590,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Scale-Y\ntweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5216,6 +5697,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Opacity tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5301,6 +5804,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Colour tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5322,6 +5847,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "0", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5535,6 +6082,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Height tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5556,6 +6125,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Width tweens", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5577,6 +6168,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Character size", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5613,6 +6226,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Hello world", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } }, { @@ -5660,6 +6295,7 @@ "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "AllButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Blue Button 2", "variables": [], "effects": [], "behaviors": [], @@ -5669,60 +6305,15 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Tween all", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 99, - "g": 69, - "r": 28 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Tween all" } }, { "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", "name": "TimeScaleSlider", "type": "PanelSpriteSlider::PanelSpriteSlider", + "variant": "Square white slider", "variables": [], "effects": [], "behaviors": [], @@ -5736,53 +6327,6 @@ "MaxValue": 2, "StepSize": 0.125, "InitialValue": 1 - }, - "childrenContent": { - "Background": { - "bottomMargin": 4, - "height": 28, - "leftMargin": 2, - "rightMargin": 2, - "texture": "Square White Slider Border.png", - "tiled": false, - "topMargin": 4, - "width": 265 - }, - "FillBar": { - "bottomMargin": 2, - "height": 16, - "leftMargin": 0, - "rightMargin": 0, - "texture": "Square White Slider Fill Bar.png", - "tiled": false, - "topMargin": 0, - "width": 16 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 221, - "g": 221, - "r": 221 - } - }, - "Thumb": { - "bottomMargin": 2, - "height": 36, - "leftMargin": 1, - "rightMargin": 1, - "texture": "Square White Slider Thumb.png", - "tiled": false, - "topMargin": 2, - "width": 22 - } } }, { @@ -5819,6 +6363,28 @@ "b": 255, "g": 255, "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Time scale", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" } } ], @@ -7239,9 +7805,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -7317,13 +7885,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.7921344117998224, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -7483,8 +8054,11 @@ ], "content": { "centerLocation": "ModelOrigin", + "crossfadeDuration": 0, "depth": 64, "height": 64, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Cherries.glb", @@ -7535,6 +8109,7 @@ "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "AllButton", "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Blue Button 2", "variables": [], "effects": [], "behaviors": [], @@ -7544,54 +8119,8 @@ "PressedLabelOffsetY": 10, "BottomPadding": 32, "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Tween all", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 99, - "g": 69, - "r": 28 - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 80, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Blue Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + "HoveredFadeOutDuration": 0.25, + "LabelText": "Tween all" } }, { @@ -7618,8 +8147,11 @@ ], "content": { "centerLocation": "ModelOrigin", + "crossfadeDuration": 0, "depth": 64, "height": 64, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Cherries.glb", @@ -7655,8 +8187,11 @@ ], "content": { "centerLocation": "ModelOrigin", + "crossfadeDuration": 0, "depth": 64, "height": 64, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Cherries.glb", @@ -7692,8 +8227,11 @@ ], "content": { "centerLocation": "ModelOrigin", + "crossfadeDuration": 0, "depth": 64, "height": 64, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Cherries.glb", @@ -7729,8 +8267,11 @@ ], "content": { "centerLocation": "ModelOrigin", + "crossfadeDuration": 0, "depth": 64, "height": 64, + "isCastingShadow": false, + "isReceivingShadow": false, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", "modelResourceName": "Cherries.glb", @@ -8378,9 +8919,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -8421,9 +8964,11 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -8497,12 +9042,13 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Slider", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/slider", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", "name": "PanelSpriteSlider", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", "shortDescription": "A draggable slider that users can move to select a numerical value.", - "version": "1.4.2", + "version": "2.0.1", "description": [ "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", "", @@ -8522,8 +9068,39 @@ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Sliders now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing sliders in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "Represent a value on a slider.", @@ -8548,7 +9125,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyValue()" + "CurrentValue" ] } ] @@ -8584,11 +9161,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", "0" ] @@ -8597,13 +9173,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(Value, MinValue, MaxValue)" ] } ] @@ -8613,11 +9188,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::Slider::PropertyStepSize" + "value": "NumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "!=", "0" ] @@ -8626,13 +9200,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "CurrentValue", "=", - "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + "clamp(round(Value / StepSize) * StepSize, MinValue, MaxValue)" ] } ] @@ -8670,7 +9243,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMinValue()" + "MinValue" ] } ] @@ -8707,13 +9280,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MinValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -8763,7 +9335,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyMaxValue()" + "MaxValue" ] } ] @@ -8800,13 +9372,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "MaxValue", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -8896,7 +9467,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyStepSize()" + "StepSize" ] } ] @@ -8933,13 +9504,12 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "StepSize", "=", - "GetArgumentAsNumber(\"Value\")" + "Value" ] }, { @@ -8978,40 +9548,24 @@ "value": "0", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Value" + "name": "CurrentValue" }, { "value": "0", "type": "Number", "label": "Minimum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "1", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "0", "type": "Number", "label": "Step size", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, "name": "StepSize" } ], @@ -9031,61 +9585,27 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "", + "" ] - }, + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Check position", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -9099,509 +9619,406 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the cursor position is only checked once per frame." + "comment": "The \"Validated\" state only last one frame." }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", - "no" + "State", + "=", + "\"Idle\"" ] } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior" - ] + "comment": "Make sure the cursor position is only checked once per frame." }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "parameters": [] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CollisionPoint" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", - "\"PressedInside\"" + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } ] } ] } ] } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Apply position changes", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "MouseIsInside", + "True", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" ] } ] @@ -9612,49 +10029,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] }, { "type": { - "inverted": true, - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -9684,22 +10240,20 @@ "actions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -9734,11 +10288,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -9783,11 +10336,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -9832,11 +10384,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9881,11 +10432,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -9907,11 +10457,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -9956,11 +10505,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -10005,11 +10553,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -10058,7 +10605,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyTouchId()" + "TouchId" ] } ] @@ -10089,8 +10636,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -10098,14 +10643,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -10114,9 +10672,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -10124,9 +10679,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -10134,9 +10686,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -10144,9 +10693,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -10156,41 +10702,296 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Slider", "description": "Let users select a numerical value by dragging a slider.", "fullName": "Slider", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteSlider", - "eventsFunctions": [ + "objects": [ { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This allows to detect a change of \"intial value\" on hot reload." + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" - }, - "parameters": [ - "Object", - "=", - "Object.PropertyInitialValue()" + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 44, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 236, + "x": 10, + "y": 10, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 230, + "y": -10, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Thumb", + "Draggable", + "" ] } ] @@ -10205,7 +11006,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create the child-object instances." + "comment": "Anchors won't work as there is an absolute margin and a proportional size at the same time" }, { "type": "BuiltinCommonInstructions::Standard", @@ -10213,68 +11014,70 @@ "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Background", - "0", - "0", - "" - ] - }, - { - "type": { - "value": "Create" + "value": "ActivateBehavior" }, "parameters": [ - "", "FillBar", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "Create" + "value": "ActivateBehavior" }, "parameters": [ - "", "Thumb", - "0", - "0", + "Anchor", "" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Background", + "BarLeftPlusRightMargin", "=", - "1" + "Object.Width() - FillBar.Width()" ] }, { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "FillBar", + "BarTopPlusBottomMargin", "=", - "2" + "Object.Height() - FillBar.Height()" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ChangePlan" + "value": "SetNumberVariable" }, "parameters": [ - "Thumb", + "PreviousInitialValue", "=", - "3" + "InitialValue" ] } ] @@ -10307,25 +11110,6 @@ "" ] }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Label", - "=", - "4" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "no" - ] - }, { "type": { "value": "Cache" @@ -10368,7 +11152,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -10428,15 +11212,6 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - }, { "type": { "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" @@ -10453,24 +11228,24 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + "value": "NumberVariable" }, "parameters": [ - "Object", + "InitialValue", "!=", - "Object.PropertyPreviousInitialValue()" + "PreviousInitialValue" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "PreviousInitialValue", "=", - "Object.PropertyInitialValue()" + "InitialValue" ] }, { @@ -10480,7 +11255,7 @@ "parameters": [ "Object", "=", - "Object.PropertyInitialValue()", + "InitialValue", "Object.PropertyInitialValue()" ] } @@ -10504,117 +11279,290 @@ "sentence": "", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touches", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BehaviorActivated" - }, - "parameters": [ - "Background", - "ButtonFSM" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - }, - { - "type": { - "inverted": true, - "value": "DraggableBehavior::Dropped" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressed" - }, - "parameters": [ - "Background", - "ButtonFSM", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" - }, - "parameters": [ - "Background", - "ButtonFSM", - "" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "OldParentWidth", + "!=", + "Object.Width()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OldParentWidth", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetHeight" + }, + "parameters": [ + "FillBar", + "Resizable", + "=", + "Object.Height() - BarTopPlusBottomMargin" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - LabelMargin" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" }, "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + "Background", + "ButtonFSM" ] } ], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" }, "parameters": [ - "Object" + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } ] } ], "actions": [ { "type": { - "value": "Montre" + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" }, "parameters": [ - "Label", - "" + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" ] - }, + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - FillBar.X()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ { "type": { "value": "ResetObjectTimer" @@ -10625,45 +11573,28 @@ ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DraggableBehavior::Dragged" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" - }, - "parameters": [ - "Object", - "=", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", - "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" - ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" + }, + "parameters": [ + "ShowLabelAtChanges", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" }, "parameters": [ - "Object" + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" ] } ], @@ -10676,280 +11607,58 @@ "Label", "" ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "DraggableBehavior::Dropped" - }, - "parameters": [ - "Thumb", - "Draggable" - ] - } - ], - "actions": [ - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" - }, - "parameters": [ - "Object" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Thumb", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Thumb.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Label", - "" - ] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"", - ">", - "0.5" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Label" - ] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Label", - "\"HideBack\"" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } ] } ] } ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Width", - "=", - "Object.Width()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Background", - "Height", - "=", - "Object.Height()" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" - }, - "parameters": [ - "Object", - "=", - "1" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Width" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Width)" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "Background", - "=", - "Background.Variable(Height)" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The parent size is not defined in onCreate so it needs to be done here." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, "parameters": [] } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" - }, - "parameters": [ - "Object", - "" - ] - } ] } ], @@ -11088,7 +11797,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] }, @@ -11175,16 +11884,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -11271,16 +11971,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", - "" - ] - }, - { - "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" - }, - "parameters": [ - "Object", + "Value", "" ] }, @@ -11367,7 +12058,7 @@ "FillBar", "Slider", "=", - "GetArgumentAsNumber(\"Value\")", + "Value", "" ] } @@ -11403,10 +12094,12 @@ "conditions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + "value": "BooleanVariable" }, "parameters": [ - "Object" + "ShowLabelAtChanges", + "True", + "" ] } ], @@ -11446,21 +12139,24 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "no" + "ShowLabelAtChanges", + "False", + "" ] }, { @@ -11478,21 +12174,24 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"Value\"" + "Value", + "True", + "" ] } ], "actions": [ { "type": { - "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + "value": "SetBooleanVariable" }, "parameters": [ - "Object", - "yes" + "ShowLabelAtChanges", + "True", + "" ] }, { @@ -11522,53 +12221,6 @@ ], "objectGroups": [] }, - { - "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "Update layout", - "functionType": "Action", - "name": "UpdateLayout", - "private": true, - "sentence": "Update layout of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "FillBar", - "=", - "Object.PropertyBarLeftPadding()", - "=", - "Object.PropertyBarTopPadding()" - ] - }, - { - "type": { - "value": "PanelSpriteObject::Height" - }, - "parameters": [ - "FillBar", - "=", - "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "description": "Update the thumb position according to the slider value.", "fullName": "Update thumb position", @@ -11601,10 +12253,11 @@ "actions": [ { "type": { - "value": "PanelSpriteObject::Width" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ "FillBar", + "Resizable", "=", "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" ] @@ -11622,7 +12275,7 @@ "parameters": [ "Thumb", "=", - "Object.FullBarLeft() + FillBar.Width()" + "FillBar.X() + FillBar.Width()" ] }, { @@ -11643,10 +12296,11 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "Label", + "Text", "=", "ToString(Object.Value())" ] @@ -11668,12 +12322,12 @@ "parameters": [ "Label", "=", - "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + "Thumb.Y() - Label.Height() - LabelMargin" ] }, { "type": { - "value": "TextObject::Angle" + "value": "SetAngle" }, "parameters": [ "Label", @@ -11696,76 +12350,6 @@ ], "objectGroups": [] }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarLeft", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.PropertyBarLeftPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Expression", - "name": "FullBarRight", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Background.Width() - Object.PropertyBarRightPadding()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", - "type": "object" - } - ], - "objectGroups": [] - }, { "fullName": "", "functionType": "Expression", @@ -11782,7 +12366,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + "Object.Width() - BarLeftPlusRightMargin" ] } ] @@ -11832,9 +12416,8 @@ "parameters": [ "Object", "=", - "Object.PropertyMinValue()", - "Object.PropertyMaxValue()", - "" + "MinValue", + "Object.PropertyMaxValue()" ] }, { @@ -11844,7 +12427,7 @@ "parameters": [ "Object", "=", - "Object.PropertyMaxValue()", + "MaxValue", "Object.PropertyMaxValue()" ] }, @@ -11855,7 +12438,7 @@ "parameters": [ "Object", "=", - "Object.PropertyStepSize()", + "StepSize", "Object.PropertyMaxValue()" ] } @@ -11884,10 +12467,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -11920,10 +12505,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -12022,112 +12609,99 @@ "value": "0", "type": "Number", "label": "Bar left margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarLeftPadding" }, { "value": "0", "type": "Number", "label": "Bar top margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarTopPadding" }, { "value": "0", "type": "Number", "label": "Bar right margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarRightPadding" }, { "value": "0", "type": "Number", "label": "Bar bottom margin", - "description": "", "group": "Bar", "extraInformation": [ "Label", "FillBar" ], - "hidden": false, + "choices": [], + "hidden": true, "name": "BarBottomPadding" }, { "value": "true", "type": "Boolean", "label": "Show the label when the value is changed", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "ShowLabelAtChanges" }, { "value": "8", "type": "Number", + "unit": "Pixel", "label": "Label margin", - "description": "", "group": "Label", - "extraInformation": [], - "hidden": false, "name": "LabelMargin" }, { "value": "0", "type": "Number", + "unit": "Dimensionless", "label": "Minimum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MinValue" }, { "value": "100", "type": "Number", + "unit": "Dimensionless", "label": "Maximum value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "MaxValue" }, { "value": "1", "type": "Number", + "unit": "Dimensionless", "label": "Step size", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "StepSize" }, { "value": "50", "type": "Number", + "unit": "Dimensionless", "label": "Initial value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "InitialValue" }, { @@ -12135,8 +12709,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -12145,10 +12717,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -12157,10 +12729,10 @@ "type": "String", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "FillBar" ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -12169,128 +12741,295 @@ "type": "Boolean", "label": "", "description": "Only used by the scene editor.", - "group": "", "extraInformation": [ "Label" ], + "choices": [], "hidden": true, "name": "ShowLabel" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "It displays the value when it changes.", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Thumb", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Draggable", - "type": "DraggableBehavior::Draggable", - "checkCollisionMask": false - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarLeftPlusRightMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "FillBar", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Slider", - "type": "PanelSpriteSlider::Slider", - "Value": 0, - "MinValue": 0, - "MaxValue": 1, - "StepSize": 1 - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "BarTopPlusBottomMargin" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Background", - "rightMargin": 0, - "texture": "", - "tiled": true, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "PanelSpriteSlider::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 0 - } - ] + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "OldParentWidth" } ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Thumb" - }, - { - "objectName": "FillBar" + "variants": [ + { + "areaMaxX": 265, + "areaMaxY": 28, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", + "assetStoreOriginalName": "Square white slider", + "name": "Square white slider", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 2, + "height": 36, + "leftMargin": 1, + "name": "Thumb", + "rightMargin": 2, + "texture": "Square White Slider Thumb.png", + "tiled": false, + "topMargin": 2, + "type": "PanelSpriteObject::PanelSprite", + "width": 22, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 2, + "height": 16, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "Square White Slider Fill Bar.png", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 16, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 4, + "height": 28, + "leftMargin": 2, + "name": "Background", + "rightMargin": 2, + "texture": "Square White Slider Border.png", + "tiled": false, + "topMargin": 4, + "type": "PanelSpriteObject::PanelSprite", + "width": 265, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] }, - { - "objectName": "Background" - } - ] - } + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 64, + "layer": "", + "name": "Background", + "persistentUuid": "7b36a716-8a01-496a-ad7d-0de60daff8f9", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 16, + "layer": "", + "name": "FillBar", + "persistentUuid": "e775f69e-7845-4103-8a05-5266aba60742", + "width": 253, + "x": 6, + "y": 6, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 84, + "layer": "", + "name": "Thumb", + "persistentUuid": "476a27da-e34f-451f-b660-04a6bbefddbe", + "width": 32, + "x": 248, + "y": -4, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] + } + ] } ] }, @@ -12299,14 +13038,15 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Panel sprite button", + "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", "shortDescription": "A button that can be customized.", - "version": "1.4.4", + "version": "2.1.1", "description": [ - "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." ], @@ -12321,409 +13061,111 @@ "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", "private": true, - "eventsFunctions": [ + "sentence": "Events are running for the editor", + "events": [ { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Finite state machine", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The \"Validated\" state only last one frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Validated\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Check position", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Make sure the cursor position is only checked once per frame." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "MouseOnlyCursorX(Object.Layer(), 0)", - "MouseOnlyCursorY(Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "no" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - }, - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", - "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasAnyTouchOrMouseStarted" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "StartedTouchOrMouseCount()", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Object", - "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", - "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyIndex" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "1" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "name": "ButtonFSM", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Apply position changes", + "name": "Finite state machine", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Hovered\"" + "\"Validated\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -12731,184 +13173,376 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior" + "comment": "Make sure the cursor position is only checked once per frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } ] }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Hovered\"" + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } ] } - ] + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" - }, - "parameters": [ - "Object", - "Behavior" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } ] }, - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedOutside\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"PressedInside\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Handle touch end", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "HasTouchEnded" - }, - "parameters": [ - "", - "Object.Behavior::PropertyTouchId()" - ] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", - "\"PressedInside\"" + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"Hovered\"" ] } ] @@ -12919,49 +13553,188 @@ { "type": { "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", "=", "\"PressedInside\"" ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] }, { "type": { - "inverted": true, - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Validated\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", - "\"Idle\"" + "\"PressedInside\"" ] } ] } - ] + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -13031,22 +13804,20 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] }, { "type": { - "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "Behavior", + "TouchId", "=", "0" ] @@ -13081,11 +13852,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Idle\"" ] @@ -13130,11 +13900,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Validated\"" ] @@ -13179,11 +13948,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -13228,11 +13996,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"Hovered\"" ] @@ -13254,11 +14021,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -13303,11 +14069,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedInside\"" ] @@ -13352,11 +14117,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::ButtonFSM::PropertyState" + "value": "StringVariable" }, "parameters": [ - "Object", - "Behavior", + "State", "=", "\"PressedOutside\"" ] @@ -13376,137 +14140,440 @@ ], "parameters": [ { - "description": "Object", - "name": "Object", - "type": "object" + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "Button", + "description": "A button that can be customized.", + "fullName": "Button (panel sprite)", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PanelSpriteButton", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "name": "Pressed" } - ], - "objectGroups": [] + ] }, { - "description": "the touch id that is using the button or 0 if none.", - "fullName": "Touch id", - "functionType": "ExpressionAndCondition", - "name": "TouchId", - "sentence": "the touch id", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyTouchId()" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ + "name": "Labels", + "objects": [ { - "description": "Object", - "name": "Object", - "type": "object" + "name": "Label" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", - "type": "behavior" + "name": "BitmapLabel" } - ], - "objectGroups": [] + ] } ], - "propertyDescriptors": [ - { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "ShouldCheckHovering" - }, - { - "value": "Idle", - "type": "Choice", - "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" - ], - "hidden": true, - "name": "State" - }, - { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" - }, - { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" - }, - { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" - }, + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [ - { - "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", - "name": "PanelSpriteButton", + "editionSettings": [], "eventsFunctions": [ { "fullName": "", @@ -13536,7 +14603,7 @@ }, "parameters": [ "", - "Idle", + "Hovered", "0", "0", "" @@ -13548,7 +14615,7 @@ }, "parameters": [ "", - "Hovered", + "Pressed", "0", "0", "" @@ -13556,14 +14623,24 @@ }, { "type": { - "value": "Create" + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" }, "parameters": [ - "", "Pressed", - "0", - "0", - "" + "Resizable", + "Idle.Width()", + "Idle.Height()" ] }, { @@ -13591,63 +14668,26 @@ "=", "1" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Place the label over the backgrounds." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Label", - "0", - "0", - "" - ] }, { "type": { "value": "ChangePlan" }, "parameters": [ - "Label", + "Pressed", "=", - "2" - ] - }, - { - "type": { - "value": "TextObject::SetWrapping" - }, - "parameters": [ - "Label", - "yes" + "1" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", - "" + "Labels", + "Text", + "=", + "LabelText" ] } ] @@ -13686,18 +14726,47 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ "Object", + "=", + "PressedLabelOffsetY", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] } ], "parameters": [ @@ -13759,12 +14828,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -13799,10 +14869,10 @@ }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", ">", "0" ] @@ -13811,7 +14881,7 @@ "actions": [ { "type": { - "value": "Tween::AddObjectOpacityTween" + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" }, "parameters": [ "Hovered", @@ -13819,7 +14889,7 @@ "\"Fadeout\"", "0", "\"linear\"", - "Object.PropertyHoveredFadeOutDuration() * 1000", + "HoveredFadeOutDuration", "" ] } @@ -13830,10 +14900,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + "value": "NumberVariable" }, "parameters": [ - "Object", + "HoveredFadeOutDuration", "=", "0" ] @@ -13857,10 +14927,11 @@ "conditions": [ { "type": { - "value": "PanelSpriteObject::Opacity" + "value": "OpacityCapability::OpacityBehavior::Value" }, "parameters": [ "Hovered", + "Opacity", "=", "0" ] @@ -13877,10 +14948,11 @@ }, { "type": { - "value": "PanelSpriteObject::SetOpacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Hovered", + "Opacity", "=", "255" ] @@ -13909,12 +14981,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "0", + "" ] }, { @@ -13939,84 +15012,28 @@ "value": "Cache" }, "parameters": [ - "Pressed" - ] - }, - { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Hovered", - "Tween", - "\"Fadeout\"" - ] - }, - { - "type": { - "value": "PanelSpriteObject::SetOpacity" - }, - "parameters": [ - "Hovered", - "=", - "255" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "ButtonFSM" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Idle" + "Pressed" ] }, { "type": { - "value": "Cache" + "value": "Tween::RemoveTween" }, "parameters": [ - "Hovered" + "Hovered", + "Tween", + "\"Fadeout\"" ] }, { "type": { - "value": "Montre" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ - "Pressed", - "" + "Hovered", + "Opacity", + "=", + "255" ] } ] @@ -14026,7 +15043,7 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" }, "parameters": [ "Object", @@ -14043,12 +15060,13 @@ "actions": [ { "type": { - "value": "SetCenterY" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Label", + "Object", "=", - "Object.CenterWithPaddingY()" + "PressedLabelOffsetY", + "" ] }, { @@ -14061,139 +15079,77 @@ }, { "type": { - "value": "Montre" + "value": "Cache" }, "parameters": [ - "Hovered", - "" + "Hovered" ] }, { "type": { - "value": "Cache" + "value": "Montre" }, "parameters": [ - "Pressed" + "Pressed", + "" ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Resize", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Width()", - "!=", - "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Height()", - "!=", - "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" + "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" }, "parameters": [ - "Idle", - "Width", - "=", - "Object.Width()" + "Object", + "ButtonFSM" ] }, { "type": { - "value": "ModVarObjet" + "value": "BuiltinCommonInstructions::Once" }, - "parameters": [ - "Idle", - "Height", - "=", - "Object.Height()" - ] - }, + "parameters": [] + } + ], + "actions": [ { "type": { - "value": "PanelSpriteButton::Scale" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ "Object", "=", - "1" + "0", + "" ] }, { "type": { - "value": "PanelSpriteObject::Width" + "value": "Cache" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Width)" + "Idle" ] }, { "type": { - "value": "PanelSpriteObject::Height" + "value": "Montre" }, "parameters": [ - "Background", - "=", - "Idle.Variable(Height)" + "Hovered", + "" ] }, { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + "value": "Cache" }, "parameters": [ - "Object", - "" + "Pressed" ] } ] @@ -14210,22 +15166,7 @@ "type": "object" } ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + "objectGroups": [] }, { "description": "Check if the button is not used.", @@ -14447,6 +15388,7 @@ "fullName": "Label text", "functionType": "Action", "name": "SetLabelText", + "private": true, "sentence": "Change the text of _PARAM0_ to _PARAM1_", "events": [ { @@ -14455,21 +15397,13 @@ "actions": [ { "type": { - "value": "TextObject::String" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", + "Text", "=", - "GetArgumentAsString(\"LabelText\")" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" - }, - "parameters": [ - "Object", - "" + "Value" ] } ] @@ -14484,17 +15418,17 @@ }, { "description": "Text", - "name": "LabelText", + "name": "Value", "type": "string" } ], "objectGroups": [] }, { - "description": "Return the label text.", - "fullName": "Label text", - "functionType": "StringExpression", - "name": "LabelText", + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", "sentence": "", "events": [ { @@ -14503,18 +15437,18 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label.String()" + "Labels", + "Text", + "=", + "Value" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", @@ -14526,12 +15460,11 @@ "objectGroups": [] }, { - "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", - "fullName": "", - "functionType": "Expression", - "name": "CenterWithPaddingY", - "private": true, - "sentence": "", + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14539,17 +15472,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + "Labels.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -14558,124 +15491,8 @@ "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", "type": "object" } - ], - "objectGroups": [] - }, - { - "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", - "fullName": "", - "functionType": "Action", - "name": "CenterLabel", - "private": true, - "sentence": "Center the label of _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "Label", - "=", - "Object.PropertyLeftPadding()", - "=", - "Object.PropertyTopPadding()" - ] - }, - { - "type": { - "value": "TextObject::WrappingWidth" - }, - "parameters": [ - "Label", - "=", - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" - ] - }, - { - "type": { - "value": "SetCenterY" - }, - "parameters": [ - "Label", - "=", - "Object.CenterWithPaddingY()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetCenterX" - }, - "parameters": [ - "Label", - "=", - "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" - }, - "parameters": [ - "Object", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Label", - "+", - "Object.PropertyPressedLabelOffsetY()" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", - "type": "object" - } - ], - "objectGroups": [ - { - "name": "Background", - "objects": [ - { - "name": "Idle" - }, - { - "name": "Hovered" - }, - { - "name": "Pressed" - } - ] - } - ] + ], + "objectGroups": [] }, { "description": "De/activate interactions with the button.", @@ -14689,10 +15506,12 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -14715,10 +15534,12 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "BooleanVariable" }, "parameters": [ - "\"ShouldActivate\"" + "ShouldActivate", + "True", + "" ] } ], @@ -14792,184 +15613,785 @@ } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "Label offset on Y axis when pressed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "PressedLabelOffsetY" }, { - "value": "0", - "type": "Number", - "label": "Left padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "LabelOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "LeftPadding" + "objectGroups": [] }, { - "value": "0", - "type": "Number", - "label": "Right padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } ], - "hidden": false, - "name": "RightPadding" + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" }, { - "value": "0", + "value": "0.25", "type": "Number", - "label": "Top padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "TopPadding" + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" }, { "value": "0", "type": "Number", - "label": "Bottom padding", - "description": "", - "group": "Padding", - "extraInformation": [ - "Label" - ], - "hidden": false, - "name": "BottomPadding" + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" }, { - "value": "0.25", + "value": "0", "type": "Number", - "label": "Hovered fade out duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "HoveredFadeOutDuration" - } - ], - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Label", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Text", - "font": "", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 0 - } + "unit": "Pixel", + "label": "", + "hidden": true, + "name": "LabelOffset" }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Idle", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [ + "value": "", + "type": "Choice", + "label": "", + "choices": [ { - "folded": true, - "name": "State", - "type": "string", - "value": "Idle" + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" } ], - "effects": [], - "behaviors": [ + "hidden": true, + "name": "_PropertyMapping" + } + ], + "variants": [ + { + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Blue Button 2", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 99, + "g": 69, + "r": 28 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 30, + "lineHeight": 0, + "color": "28;69;99" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Blue Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, { - "name": "ButtonFSM", - "type": "PanelSpriteButton::ButtonFSM", - "ShouldCheckHovering": true + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Blue Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Blue Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 81, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "13c57e74-5889-490a-b3fe-4856e2ee6a18", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "" + } }, { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Hovered", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [ + "areaMaxX": 256, + "areaMaxY": 106, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", + "assetStoreOriginalName": "Blue Button", + "name": "Blue Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Button", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 99, + "g": 69, + "r": 28 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 60, + "lineHeight": 0, + "color": "28;69;99" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Idle", + "rightMargin": 16, + "texture": "Blue Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "serializedBehavior": { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "name": "Hovered", + "rightMargin": 16, + "texture": "Blue Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior", + "serializedBehavior": { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "name": "Pressed", + "rightMargin": 16, + "texture": "Blue Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + }, + { + "objectName": "BitmapLabel" + } + ] + }, + "objectsGroups": [ { - "name": "Tween", - "type": "Tween::TweenBehavior" + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] } - ] - }, - { - "assetStoreId": "", - "bottomMargin": 0, - "height": 32, - "leftMargin": 0, - "name": "Pressed", - "rightMargin": 0, - "texture": "", - "tiled": false, - "topMargin": 0, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, - "variables": [], - "effects": [], - "behaviors": [] + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "depth": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 64, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 81, + "keepRatio": true, + "layer": "", + "name": "Label", + "persistentUuid": "13c57e74-5889-490a-b3fe-4856e2ee6a18", + "width": 240, + "x": 8, + "y": 48, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Label" - }, - { - "objectName": "Idle" - }, - { - "objectName": "Hovered" - }, - { - "objectName": "Pressed" - } - ] - } + ] } ] }, @@ -14978,6 +16400,7 @@ "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", + "gdevelopVersion": "", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", @@ -15012,6 +16435,8 @@ "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -16125,8 +17550,6 @@ "type": "Boolean", "label": "", "description": "Should check hovering", - "group": "", - "extraInformation": [], "hidden": true, "name": "ShouldCheckHovering" }, @@ -16134,14 +17557,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -16150,9 +17586,6 @@ "value": "0", "type": "Number", "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchId" }, @@ -16160,9 +17593,6 @@ "value": "", "type": "Boolean", "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TouchIsInside" }, @@ -16170,9 +17600,6 @@ "value": "", "type": "Boolean", "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "MouseIsInside" }, @@ -16180,9 +17607,6 @@ "value": "", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "Index" } @@ -16695,34 +18119,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], - "hidden": false, + "choices": [], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", - "description": "", "group": "Effects", - "extraInformation": [], - "hidden": false, "name": "IdleEffect" }, { @@ -16731,18 +18148,13 @@ "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", - "extraInformation": [], - "hidden": false, "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", - "description": "", "group": "Effects", - "extraInformation": [], - "hidden": false, "name": "PressedEffect" } ], @@ -17168,22 +18580,17 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", - "description": "", "group": "Animation", - "extraInformation": [], - "hidden": false, "name": "IdleAnimationName" }, { @@ -17192,18 +18599,13 @@ "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", - "extraInformation": [], - "hidden": false, "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", - "description": "", "group": "Animation", - "extraInformation": [], - "hidden": false, "name": "PressedAnimationName" } ], @@ -18606,34 +20008,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", - "description": "", - "group": "", "extraInformation": [ "EffectCapability::EffectBehavior" ], - "hidden": false, + "choices": [], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", - "description": "", "group": "Effect", - "extraInformation": [], - "hidden": false, "name": "EffectName" }, { @@ -18642,18 +20037,13 @@ "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", - "extraInformation": [], - "hidden": false, "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "IdleValue" }, { @@ -18662,106 +20052,295 @@ "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", - "description": "", "group": "Value", - "extraInformation": [], - "hidden": false, "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeOutEasing" }, { @@ -18769,10 +20348,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeInDuration" }, { @@ -18780,22 +20356,26 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -18804,9 +20384,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenInitialValue" }, @@ -18814,9 +20391,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTargetedValue" }, @@ -18824,9 +20398,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "TweenTime" }, @@ -18834,12 +20405,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -18848,9 +20426,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "EffectValue" } @@ -19827,24 +21402,20 @@ "value": "", "type": "Behavior", "label": "Button states behavior (required)", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], - "hidden": false, + "choices": [], "name": "Tween" }, { @@ -19852,10 +21423,7 @@ "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", - "description": "", "group": "Size", - "extraInformation": [], - "hidden": false, "name": "IdleScale" }, { @@ -19865,8 +21433,6 @@ "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", - "extraInformation": [], - "hidden": false, "name": "FocusedScale" }, { @@ -19874,10 +21440,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeInDuration" }, { @@ -19885,10 +21448,7 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeOutDuration" }, { @@ -19896,110 +21456,308 @@ "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", - "description": "", "group": "Size", - "extraInformation": [], - "hidden": false, "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeOutEasing" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -20973,34 +22731,27 @@ "value": "", "type": "Behavior", "label": "Button states", - "description": "", - "group": "", "extraInformation": [ "ButtonStates::ButtonFSM" ], - "hidden": false, + "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", - "description": "", - "group": "", "extraInformation": [ "Tween::TweenBehavior" ], - "hidden": false, + "choices": [], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", - "description": "", "group": "Color", - "extraInformation": [], - "hidden": false, "name": "IdleColorTint" }, { @@ -21009,18 +22760,13 @@ "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", - "extraInformation": [], - "hidden": false, "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", - "description": "", "group": "Color", - "extraInformation": [], - "hidden": false, "name": "PressedColorTint" }, { @@ -21028,10 +22774,7 @@ "type": "Number", "unit": "Second", "label": "Fade-in duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeInDuration" }, { @@ -21039,110 +22782,308 @@ "type": "Number", "unit": "Second", "label": "Fade-out duration", - "description": "", "group": "Speed", - "extraInformation": [], - "hidden": false, "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", - "description": "", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" - ], - "hidden": false, + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } + ], "name": "FadeOutEasing" }, { "value": "Idle", "type": "Choice", "label": "", - "description": "", - "group": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -21154,6 +23095,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/wave-defense-shooter/assets/rotate-screen-icon.png b/examples/wave-defense-shooter/assets/rotate-screen-icon.png index ba619fae3..a7726dee3 100644 Binary files a/examples/wave-defense-shooter/assets/rotate-screen-icon.png and b/examples/wave-defense-shooter/assets/rotate-screen-icon.png differ diff --git a/examples/wave-defense-shooter/wave-defense-shooter.json b/examples/wave-defense-shooter/wave-defense-shooter.json index bfdb51a55..b6faa348a 100644 --- a/examples/wave-defense-shooter/wave-defense-shooter.json +++ b/examples/wave-defense-shooter/wave-defense-shooter.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 237, + "build": 245, "major": 5, "minor": 5, "revision": 0 @@ -82,6 +82,7 @@ "authorUsernames": [], "categories": [], "playableDevices": [ + "mobile", "mobile" ], "extensionProperties": [], @@ -707,18 +708,6 @@ "smoothed": false, "userAdded": true }, - { - "file": "assets/rotate-screen-icon.png", - "kind": "image", - "metadata": "", - "name": "rotate-screen-icon.png", - "smoothed": false, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/assets/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", - "name": "rotate-screen-icon.png" - } - }, { "file": "assets/Flat Bar Red Fill Bar.png", "kind": "image", @@ -789,9 +778,20 @@ "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/5e2e3fcc57885d5e510934e621be5f8dd7a5b6425cf46ef38073e3d2c3b04048_Kenney Mini Square.ttf", "name": "Kenney Mini Square.ttf" } + }, + { + "file": "assets/rotate-screen-icon.png", + "kind": "image", + "metadata": "", + "name": "rotate-screen-icon.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Mobile Layouts/6a8102ce3340bf9f62300ee1a81ef0b2327b2c6e8d62d7dda68d547f5e2b5969_rotate-screen-icon.png", + "name": "rotate-screen-icon.png" + } } - ], - "resourceFolders": [] + ] }, "objects": [ { @@ -911,13 +911,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 0.6122095908431373, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -1169,22 +1172,6 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 432, - "layer": "Screen orientation checker", - "name": "ScreenOrientationChecker", - "persistentUuid": "8e638f14-77bd-4ca0-8b91-186b839b45ae", - "width": 768, - "x": 0, - "y": 0, - "zOrder": 13, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] } ], "objects": [ @@ -1588,10 +1575,10 @@ } }, { - "assetStoreId": "e5919fb86a559b00001678c710efe55f4e9f2e032a9ff9610087370f998d57de", + "assetStoreId": "2743bcd6cf431c6c00cda3a59684eb152b3a09d598b799b15383e4f77daf8b37", "name": "ScreenOrientationChecker", "type": "ScreenOrientationChecker::ScreenOrientationChecker", - "variant": "", + "variant": "Black screen orientation checker", "variables": [], "effects": [], "behaviors": [ @@ -1607,120 +1594,11 @@ } ], "content": { - "IsForceShown": false, - "BackgroundColor": "24;24;24", + "IsForceShown": true, + "BackgroundColor": "0;0;0", "CornerRadius": 8, - "Padding": 5 - }, - "childrenContent": { - "BackgroundPainter": { - "fillOpacity": 255, - "outlineSize": 0, - "outlineOpacity": 255, - "absoluteCoordinates": true, - "clearBetweenFrames": true, - "antialiasing": "none", - "fillColor": { - "r": 0, - "g": 0, - "b": 0 - }, - "outlineColor": { - "r": 0, - "g": 0, - "b": 0 - } - }, - "Icon": { - "adaptCollisionMaskAutomatically": true, - "updateIfNotVisible": false, - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "rotate-screen-icon.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 52.5, - "y": 56.5 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 1 - }, - { - "x": 105, - "y": 1 - }, - { - "x": 105, - "y": 113 - }, - { - "x": 0, - "y": 113 - } - ] - ] - } - ] - } - ] - } - ] - }, - "Text": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" - } - } + "Padding": 5, + "Message": "Rotate screen to play" } } ], @@ -2159,6 +2037,7 @@ "ambientLightColorB": 14020160, "ambientLightColorG": 0, "ambientLightColorR": 150995054, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -2187,6 +2066,7 @@ "ambientLightColorB": 14164184, "ambientLightColorG": 12, "ambientLightColorR": 6071152, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -2204,6 +2084,7 @@ "ambientLightColorB": 11611592, "ambientLightColorG": 12, "ambientLightColorR": 6070592, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -2221,6 +2102,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -2313,13 +2195,16 @@ "gridType": "rectangular", "gridWidth": 32, "gridHeight": 16, + "gridDepth": 32, "gridOffsetX": 0, "gridOffsetY": 0, + "gridOffsetZ": 0, "gridColor": 10401023, "gridAlpha": 0.2, "snap": true, "zoomFactor": 1.0615714305220083, - "windowMask": false + "windowMask": false, + "selectedLayer": "" }, "objectsGroups": [ { @@ -5023,6 +4908,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -5423,7 +5309,7 @@ "assetStoreId": "e5919fb86a559b00001678c710efe55f4e9f2e032a9ff9610087370f998d57de", "name": "ScreenOrientationChecker", "type": "ScreenOrientationChecker::ScreenOrientationChecker", - "variant": "", + "variant": "Black screen orientation checker", "variables": [], "effects": [], "behaviors": [ @@ -5443,116 +5329,6 @@ "BackgroundColor": "24;24;24", "CornerRadius": 8, "Padding": 5 - }, - "childrenContent": { - "BackgroundPainter": { - "fillOpacity": 255, - "outlineSize": 0, - "outlineOpacity": 255, - "absoluteCoordinates": true, - "clearBetweenFrames": true, - "antialiasing": "none", - "fillColor": { - "r": 0, - "g": 0, - "b": 0 - }, - "outlineColor": { - "r": 0, - "g": 0, - "b": 0 - } - }, - "Icon": { - "adaptCollisionMaskAutomatically": true, - "updateIfNotVisible": false, - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "rotate-screen-icon.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 52.5, - "y": 56.5 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 1 - }, - { - "x": 105, - "y": 1 - }, - { - "x": 105, - "y": 113 - }, - { - "x": 0, - "y": 113 - } - ] - ] - } - ] - } - ] - } - ] - }, - "Text": { - "bold": true, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" - } - } } } ], @@ -8022,6 +7798,7 @@ "ambientLightColorB": 0, "ambientLightColorG": 8042920, "ambientLightColorR": 16, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -8050,6 +7827,7 @@ "ambientLightColorB": 22831128, "ambientLightColorG": 6069792, "ambientLightColorR": 24523232, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -8067,6 +7845,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -8084,6 +7863,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -8101,6 +7881,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -8118,6 +7899,7 @@ "ambientLightColorB": 1701470831, "ambientLightColorG": 14969176, "ambientLightColorR": 6070032, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, @@ -11906,6 +11688,7 @@ "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], + "choices": [], "name": "Property" }, { @@ -11919,9 +11702,15 @@ "type": "Choice", "label": "Joystick name", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -12042,6 +11831,7 @@ "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { @@ -12055,9 +11845,15 @@ "type": "Choice", "label": "Walk joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -12167,6 +11963,7 @@ "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { @@ -12180,9 +11977,15 @@ "type": "Choice", "label": "Walk joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -13125,6 +12928,7 @@ "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { @@ -13138,9 +12942,15 @@ "type": "Choice", "label": "Camera joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "CameraStick" }, @@ -13356,6 +13166,7 @@ "extraInformation": [ "Physics3D::PhysicsCar3D" ], + "choices": [], "name": "PhysicsCar3D" }, { @@ -13369,9 +13180,15 @@ "type": "Choice", "label": "Steer joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "SteerJoystickIdentifier" }, @@ -13380,9 +13197,15 @@ "type": "Choice", "label": "Speed joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "SpeedJoystickIdentifier" }, @@ -13915,6 +13738,7 @@ "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], + "choices": [], "name": "TopDownMovement" }, { @@ -13927,9 +13751,15 @@ "value": "Primary", "type": "Choice", "label": "Joystick name", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -13938,10 +13768,19 @@ "type": "Choice", "label": "Stick mode", "group": "Controls", - "extraInformation": [ - "Analog", - "360°", - "8 Directions" + "choices": [ + { + "label": "Analog", + "value": "Analog" + }, + { + "label": "360°", + "value": "360°" + }, + { + "label": "8 Directions", + "value": "8 Directions" + } ], "name": "StickMode" } @@ -14040,6 +13879,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -14066,6 +13906,7 @@ } ], "instances": [], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -15190,9 +15031,15 @@ "value": "Primary", "type": "Choice", "label": "Joystick name", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -15211,6 +15058,7 @@ "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -15230,6 +15078,7 @@ "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbIsScaledProportionally" }, @@ -18599,12 +18448,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -18706,6 +18570,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -18845,6 +18710,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -18904,6 +18770,7 @@ "initialVariables": [] } ], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -20061,8 +19928,11 @@ "value": "", "type": "Choice", "label": "", - "extraInformation": [ - "Label.Text=LabelText" + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + } ], "hidden": true, "name": "_PropertyMapping" @@ -20130,6 +20000,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 45, + "lineHeight": 0, "color": "255;255;255" } }, @@ -20277,6 +20148,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -20336,7 +20208,8 @@ "stringProperties": [], "initialVariables": [] } - ] + ], + "editionSettings": {} } ] } @@ -21082,6 +20955,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -21206,6 +21080,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -21297,6 +21172,7 @@ "initialVariables": [] } ], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -22817,6 +22693,7 @@ "extraInformation": [ "Label" ], + "choices": [], "name": "ShowLabel" }, { @@ -22903,6 +22780,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 16, + "lineHeight": 0, "color": "255;255;255" } }, @@ -23027,6 +22905,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -23103,7 +22982,8 @@ "stringProperties": [], "initialVariables": [] } - ] + ], + "editionSettings": {} } ] } @@ -25527,12 +25407,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -25623,6 +25518,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -25754,6 +25650,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -25829,6 +25726,7 @@ "initialVariables": [] } ], + "editionSettings": {}, "eventsFunctions": [ { "fullName": "", @@ -27436,6 +27334,7 @@ "Label", "FillBar" ], + "choices": [], "hidden": true, "name": "BarLeftPadding" }, @@ -27448,6 +27347,7 @@ "Label", "FillBar" ], + "choices": [], "hidden": true, "name": "BarTopPadding" }, @@ -27460,6 +27360,7 @@ "Label", "FillBar" ], + "choices": [], "hidden": true, "name": "BarRightPadding" }, @@ -27472,6 +27373,7 @@ "Label", "FillBar" ], + "choices": [], "hidden": true, "name": "BarBottomPadding" }, @@ -27538,6 +27440,7 @@ "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -27549,6 +27452,7 @@ "extraInformation": [ "FillBar" ], + "choices": [], "hidden": true, "name": "ThumbAnchorTarget" }, @@ -27560,6 +27464,7 @@ "extraInformation": [ "Label" ], + "choices": [], "hidden": true, "name": "ShowLabel" }, @@ -27636,6 +27541,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -27767,6 +27673,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -27839,7 +27746,8 @@ "stringProperties": [], "initialVariables": [] } - ] + ], + "editionSettings": {} } ] } @@ -28980,12 +28888,27 @@ "value": "Idle", "type": "Choice", "label": "State", - "extraInformation": [ - "Idle", - "Hovered", - "PressedInside", - "PressedOutside", - "Validated" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } ], "hidden": true, "name": "State" @@ -29524,6 +29447,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -29533,6 +29457,7 @@ "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { @@ -29972,6 +29897,7 @@ "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], + "choices": [], "name": "Animation" }, { @@ -29981,6 +29907,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -31374,6 +31301,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -31383,6 +31311,7 @@ "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { @@ -31427,40 +31356,139 @@ "type": "Choice", "label": "Fade-in easing", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -31469,40 +31497,139 @@ "type": "Choice", "label": "Fade-out easing", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -31526,10 +31653,19 @@ "value": "Idle", "type": "Choice", "label": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -31559,10 +31695,19 @@ "value": "NoTween", "type": "Choice", "label": "", - "extraInformation": [ - "NoTween", - "FadeIn", - "FadeOut" + "choices": [ + { + "label": "NoTween", + "value": "NoTween" + }, + { + "label": "FadeIn", + "value": "FadeIn" + }, + { + "label": "FadeOut", + "value": "FadeOut" + } ], "hidden": true, "name": "TweenState" @@ -32517,6 +32662,7 @@ "extraInformation": [ "ScalableCapability::ScalableBehavior" ], + "choices": [], "name": "Scale" }, { @@ -32526,6 +32672,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -32535,6 +32682,7 @@ "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -32583,40 +32731,139 @@ "type": "Choice", "label": "Fade-in easing", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -32625,40 +32872,139 @@ "type": "Choice", "label": "Fade-out easing", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -32666,10 +33012,19 @@ "value": "Idle", "type": "Choice", "label": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -33631,6 +33986,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -33640,6 +33996,7 @@ "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -33685,40 +34042,139 @@ "type": "Choice", "label": "Fade-in easing", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeInEasing" }, @@ -33727,40 +34183,139 @@ "type": "Choice", "label": "Fade-out easing", "group": "Speed", - "extraInformation": [ - "linear", - "easeInQuad", - "easeOutQuad", - "easeInOutQuad", - "easeInCubic", - "easeOutCubic", - "easeInOutCubic", - "easeInQuart", - "easeOutQuart", - "easeInOutQuart", - "easeInQuint", - "easeOutQuint", - "easeInOutQuint", - "easeInOutSine", - "easeInExpo", - "easeOutExpo", - "easeInOutExpo", - "easeInCirc", - "easeOutCirc", - "easeInOutCirc", - "easeOutBounce", - "easeInBack", - "easeOutBack", - "easeInOutBack", - "elastic", - "swingFromTo", - "swingFrom", - "swingTo", - "bounce", - "bouncePast", - "easeFromTo", - "easeFrom", - "easeTo" + "choices": [ + { + "label": "linear", + "value": "linear" + }, + { + "label": "easeInQuad", + "value": "easeInQuad" + }, + { + "label": "easeOutQuad", + "value": "easeOutQuad" + }, + { + "label": "easeInOutQuad", + "value": "easeInOutQuad" + }, + { + "label": "easeInCubic", + "value": "easeInCubic" + }, + { + "label": "easeOutCubic", + "value": "easeOutCubic" + }, + { + "label": "easeInOutCubic", + "value": "easeInOutCubic" + }, + { + "label": "easeInQuart", + "value": "easeInQuart" + }, + { + "label": "easeOutQuart", + "value": "easeOutQuart" + }, + { + "label": "easeInOutQuart", + "value": "easeInOutQuart" + }, + { + "label": "easeInQuint", + "value": "easeInQuint" + }, + { + "label": "easeOutQuint", + "value": "easeOutQuint" + }, + { + "label": "easeInOutQuint", + "value": "easeInOutQuint" + }, + { + "label": "easeInOutSine", + "value": "easeInOutSine" + }, + { + "label": "easeInExpo", + "value": "easeInExpo" + }, + { + "label": "easeOutExpo", + "value": "easeOutExpo" + }, + { + "label": "easeInOutExpo", + "value": "easeInOutExpo" + }, + { + "label": "easeInCirc", + "value": "easeInCirc" + }, + { + "label": "easeOutCirc", + "value": "easeOutCirc" + }, + { + "label": "easeInOutCirc", + "value": "easeInOutCirc" + }, + { + "label": "easeOutBounce", + "value": "easeOutBounce" + }, + { + "label": "easeInBack", + "value": "easeInBack" + }, + { + "label": "easeOutBack", + "value": "easeOutBack" + }, + { + "label": "easeInOutBack", + "value": "easeInOutBack" + }, + { + "label": "elastic", + "value": "elastic" + }, + { + "label": "swingFromTo", + "value": "swingFromTo" + }, + { + "label": "swingFrom", + "value": "swingFrom" + }, + { + "label": "swingTo", + "value": "swingTo" + }, + { + "label": "bounce", + "value": "bounce" + }, + { + "label": "bouncePast", + "value": "bouncePast" + }, + { + "label": "easeFromTo", + "value": "easeFromTo" + }, + { + "label": "easeFrom", + "value": "easeFrom" + }, + { + "label": "easeTo", + "value": "easeTo" + } ], "name": "FadeOutEasing" }, @@ -33768,10 +34323,19 @@ "value": "Idle", "type": "Choice", "label": "", - "extraInformation": [ - "Idle", - "Focused", - "Pressed" + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Focused", + "value": "Focused" + }, + { + "label": "Pressed", + "value": "Pressed" + } ], "hidden": true, "name": "PreviousState" @@ -38193,6 +38757,7 @@ "extraInformation": [ "ScalableCapability::ScalableBehavior" ], + "choices": [], "name": "Scale" }, { @@ -51535,6 +52100,7 @@ "Linear", "Exponential" ], + "choices": [], "advanced": true, "name": "ExponentialCoolingRate" }, @@ -51571,7 +52137,7 @@ "name": "ScreenOrientationChecker", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/0126888931a4a4f82bb2824df9f096347ace1c47f510c44df42aa8dc9e49e24a_screen-rotation.svg", "shortDescription": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", - "version": "0.1.1", + "version": "0.2.1", "description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", "origin": { "identifier": "ScreenOrientationChecker", @@ -51594,6 +52160,28 @@ ], "sceneVariables": [], "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, { "fullName": "Get game target orientation", "functionType": "StringExpression", @@ -51712,6 +52300,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "255;255;255" } }, @@ -51771,44 +52360,7 @@ { "looping": false, "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "rotate-screen-icon.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 52.5, - "y": 56.5 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 1 - }, - { - "x": 105, - "y": 1 - }, - { - "x": 105, - "y": 113 - }, - { - "x": 0, - "y": 113 - } - ] - ] - } - ] + "sprites": [] } ] } @@ -51835,6 +52387,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -51896,22 +52449,68 @@ }, { "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, + "customSize": true, + "depth": 0.9624060150375939, + "height": 96, "layer": "", "name": "Icon", "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", - "width": 0, - "x": 204, - "y": 64, + "width": 96, + "x": 158, + "y": 16, "zOrder": 16, "numberProperties": [], "stringProperties": [], "initialVariables": [] } ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.75, + "windowMask": false, + "selectedLayer": "" + }, "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::ClearBetweenFrames" + }, + "parameters": [ + "BackgroundPainter", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, { "fullName": "", "functionType": "Action", @@ -51919,41 +52518,66 @@ "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check if the screen must be shown" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ScreenOrientationChecker::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SystemInfo::IsMobile" + "inverted": true, + "value": "ScreenOrientationChecker::IsInGameEdition" }, - "parameters": [] + "parameters": [ + "", + "" + ] } ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if the screen must be shown" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "SystemInfo::IsMobile" }, - "parameters": [ - "SceneWindowWidth()", - ">", - "SceneWindowHeight()" - ] + "parameters": [] } ], "actions": [], @@ -51963,24 +52587,69 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" + "SceneWindowWidth()", + ">", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "!=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] @@ -51990,127 +52659,146 @@ "conditions": [ { "type": { - "value": "StringVariable" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "TargetOrientation", - "!=", - "\"portrait\"" + "SceneWindowWidth()", + "<=", + "SceneWindowHeight()" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"landscape\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsShown", + "False", + "" + ] + } ] } ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show/hide the screen as needed" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "SceneWindowWidth()", - "<=", - "SceneWindowHeight()" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [], + "subInstructions": [ { "type": { - "value": "StringVariable" + "value": "BooleanVariable" }, "parameters": [ - "TargetOrientation", - "=", - "\"landscape\"" + "IsShown", + "True", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "SetBooleanVariable" + "value": "BooleanVariable" }, "parameters": [ - "IsShown", - "False", + "IsForceShown", + "True", "" ] } ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::DrawBackground" + }, + "parameters": [ + "Object", + "" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "TargetOrientation", - "=", - "\"portrait\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "IsShown", - "False", - "" - ] - } + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Show/hide the screen as needed" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { + "inverted": true, "value": "BooleanVariable" }, "parameters": [ @@ -52121,6 +52809,7 @@ }, { "type": { + "inverted": true, "value": "BooleanVariable" }, "parameters": [ @@ -52129,229 +52818,207 @@ "" ] } - ] - } - ], - "actions": [ - { - "type": { - "value": "PrimitiveDrawing::FillColor" - }, - "parameters": [ - "BackgroundPainter", - "BackgroundColor" + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + } ] }, { - "type": { - "value": "PrimitiveDrawing::RoundedRectangle" - }, - "parameters": [ - "BackgroundPainter", - "Padding", - "Padding", - "Object.Width()-Padding", - "Object.Height()-Padding", - "CornerRadius" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Icon", + "=", + "Text.Y() - 100" + ] + } ] }, { - "type": { - "value": "Montre" - }, - "parameters": [ - "Object", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "IsShown", - "True", - "" - ] + "comment": "Animate the icon" }, { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "IsForceShown", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Object" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreY" - }, - "parameters": [ - "Icon", - "=", - "Text.Y() - 100" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Animate the icon" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Tween::Exists" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + } ] }, { - "type": { - "inverted": true, - "value": "Tween::Exists" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Tween::HasFinished" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"", - "8", - "\"easeInOutQuad\"", - "2", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } ] }, { - "type": { - "value": "Tween::RemoveTween" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"", + "-8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Draw the background.", + "fullName": "Draw the background", + "functionType": "Action", + "name": "DrawBackground", + "private": true, + "sentence": "Draw the background of _PARAM0_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Tween::HasFinished" - }, - "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "Tween::TweenBehavior::AddObjectAngleTween2" - }, - "parameters": [ - "Icon", - "Tween", - "\"RotateBack\"", - "-8", - "\"easeInOutQuad\"", - "2", - "" - ] - }, - { - "type": { - "value": "Tween::RemoveTween" + "value": "PrimitiveDrawing::RoundedRectangle" }, "parameters": [ - "Icon", - "Tween", - "\"Rotate\"" + "BackgroundPainter", + "Padding", + "Padding", + "Object.Width()-Padding", + "Object.Height()-Padding", + "CornerRadius" ] } ] @@ -52371,7 +53038,6 @@ "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game.", "fullName": "Force show the screen", "functionType": "Condition", - "group": "Screen Orientation Checker configuration", "name": "IsForceShown", "sentence": "_PARAM0_ is forced to be shown", "events": [ @@ -52415,7 +53081,6 @@ "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game.", "fullName": "Force show the screen", "functionType": "Action", - "group": "Screen Orientation Checker configuration", "name": "SetIsForceShown", "sentence": "Force _PARAM0_ to be shown: _PARAM1_", "events": [ @@ -52491,6 +53156,76 @@ } ], "objectGroups": [] + }, + { + "description": "the message of the object.", + "fullName": "Message", + "functionType": "ExpressionAndCondition", + "name": "Message", + "sentence": "the message", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Text.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Message", + "name": "SetMessage", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Text", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -52524,16 +53259,278 @@ "description": "Corner radius for the background", "group": "Appearance", "name": "CornerRadius" - }, - { - "value": "0;0;0", - "type": "Color", - "label": "Background color", - "group": "Appearance", - "name": "BackgroundColor" } ], - "variants": [] + "variants": [ + { + "areaMaxX": 400, + "areaMaxY": 200, + "areaMaxZ": 0, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "2743bcd6cf431c6c00cda3a59684eb152b3a09d598b799b15383e4f77daf8b37", + "assetStoreOriginalName": "Black screen orientation checker", + "name": "Black screen orientation checker", + "objects": [ + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "BackgroundPainter", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 0, + "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 0, + "g": 0, + "b": 0 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "topEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "rotate-screen-icon.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 52.5, + "y": 56.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 105, + "y": 1 + }, + { + "x": 105, + "y": 113 + }, + { + "x": 0, + "y": 113 + } + ] + ] + } + ] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 35, + "keepRatio": true, + "layer": "", + "name": "Text", + "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", + "width": 207, + "x": 104, + "y": 120, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "BackgroundPainter", + "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", + "width": 0, + "x": 38, + "y": 17, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Icon", + "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", + "width": 0, + "x": 204, + "y": 64, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": {} + } + ] } ] }