diff --git a/__tests__/post-build/__snapshots__/exampleShortHeaders.json.spec.js.snap b/__tests__/post-build/__snapshots__/exampleShortHeaders.json.spec.js.snap index 098020501..88da91a17 100644 --- a/__tests__/post-build/__snapshots__/exampleShortHeaders.json.spec.js.snap +++ b/__tests__/post-build/__snapshots__/exampleShortHeaders.json.spec.js.snap @@ -95,7 +95,7 @@ Get as far as you can before you crash in to a wall, submit your score, and try "Starter", "Anchor", "Objects with animations", - "Event functions", + "Bitmap Text", "Sounds and music", "Layers and cameras", "Events and control flow", @@ -125,6 +125,7 @@ Get as far as you can before you crash in to a wall, submit your score, and try "Text object", "Tiled Sprite Object", "Tweening", + "Leaderboard dialog", "Ellipse movement", "Panel sprite button", "Shake object", diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index d5e4b2bac..6a5f31455 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 239, + "build": 242, "major": 5, "minor": 5, "revision": 0 @@ -87,7 +87,6 @@ "playableDevices": [ "keyboard", "gamepad", - "mobile", "mobile" ], "extensionProperties": [], @@ -644,6 +643,54 @@ "identifier": "https://asset-resources.gdevelop.io/staging/public-resources/Menu buttons/928c3ea4db1da835c9f8cc5b7089a47228350209d2ff489e1484c31e5ce41b3d_Yellow Button_Pressed.png", "name": "Yellow Button_Pressed.png" } + }, + { + "file": "assets/Cubemap_Sky_04-512x512_Back.png", + "kind": "image", + "metadata": "", + "name": "assets\\Cubemap_Sky_02-512x512_Back.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Cubemap_Sky_04-512x512_Bottom.png", + "kind": "image", + "metadata": "", + "name": "assets\\Cubemap_Sky_02-512x512_Bottom.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Cubemap_Sky_04-512x512_Front.png", + "kind": "image", + "metadata": "", + "name": "assets\\Cubemap_Sky_02-512x512_Front.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Cubemap_Sky_04-512x512_Left.png", + "kind": "image", + "metadata": "", + "name": "assets\\Cubemap_Sky_02-512x512_Left.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Cubemap_Sky_04-512x512_Right.png", + "kind": "image", + "metadata": "", + "name": "assets\\Cubemap_Sky_02-512x512_Right.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Cubemap_Sky_04-512x512_Top.png", + "kind": "image", + "metadata": "", + "name": "assets\\Cubemap_Sky_02-512x512_Top.png", + "smoothed": true, + "userAdded": false } ], "resourceFolders": [] @@ -1483,12 +1530,11 @@ "angle": 0, "customSize": true, "depth": 1, - "height": 203, - "keepRatio": true, + "height": 256, "layer": "Background", "name": "Sky", - "persistentUuid": "69a0e10c-4cb2-4f66-832f-e8590d4aac59", - "width": 1281, + "persistentUuid": "eda3eb60-593e-49f8-9c18-f5156990bbe7", + "width": 1280, "x": 0, "y": 0, "zOrder": 44, @@ -4309,7 +4355,7 @@ "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 3000, + "camera3DFarPlaneDistance": 5000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, "cameraType": "perspective", @@ -4359,7 +4405,7 @@ "density": 0.0006 }, "stringParameters": { - "color": "221;221;215" + "color": "239;254;255" }, "booleanParameters": {} }, @@ -4369,7 +4415,7 @@ "doubleParameters": { "elevation": 80, "intensity": 0.33, - "rotation": 300 + "rotation": 120 }, "stringParameters": { "groundColor": "128;128;128", @@ -4377,6 +4423,20 @@ "top": "Z+" }, "booleanParameters": {} + }, + { + "effectType": "Scene3D::Skybox", + "name": "Skybox", + "doubleParameters": {}, + "stringParameters": { + "backFaceResourceName": "assets\\Cubemap_Sky_02-512x512_Back.png", + "bottomFaceResourceName": "assets\\Cubemap_Sky_02-512x512_Bottom.png", + "frontFaceResourceName": "assets\\Cubemap_Sky_02-512x512_Front.png", + "leftFaceResourceName": "assets\\Cubemap_Sky_02-512x512_Left.png", + "rightFaceResourceName": "assets\\Cubemap_Sky_02-512x512_Right.png", + "topFaceResourceName": "assets\\Cubemap_Sky_02-512x512_Top.png" + }, + "booleanParameters": {} } ] }, @@ -4630,7 +4690,7 @@ "assetStoreId": "", "name": "LeaderboardDialog", "type": "LeaderboardDialog::LeaderboardDialog", - "variant": "", + "variant": "Grey and yellow", "variables": [], "effects": [], "behaviors": [ @@ -4647,7 +4707,9 @@ ], "content": { "LeaderboardId": "0d5ac561-afa4-45dc-bf58-561d557f7954", - "DefaultPlayerName": "" + "DefaultPlayerName": "", + "ScoreLabelText": "Time: ", + "Format": "MM:SS.ms" } }, { @@ -9155,6 +9217,7 @@ "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], + "choices": [], "name": "PlatformerCharacter" }, { @@ -9189,15 +9252,39 @@ "type": "Choice", "label": "Jump button", "group": "Controls", - "extraInformation": [ - "A or Cross", - "B or Circle", - "X or Square", - "Y or Triangle", - "LB or L1", - "RB or R1", - "LT or L2", - "RT or R2" + "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" } @@ -9329,6 +9416,7 @@ "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { @@ -9342,9 +9430,15 @@ "type": "Choice", "label": "Walk joystick", "group": "Controls", - "extraInformation": [ - "Left", - "Right" + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } ], "name": "JoystickIdentifier" }, @@ -9353,15 +9447,39 @@ "type": "Choice", "label": "Jump button", "group": "Controls", - "extraInformation": [ - "A or Cross", - "B or Circle", - "X or Square", - "Y or Triangle", - "LB or L1", - "RB or R1", - "LT or L2", - "RT or R2" + "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" } @@ -9482,6 +9600,7 @@ "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { @@ -9495,9 +9614,15 @@ "type": "Choice", "label": "Walk joystick", "group": "Controls", - "extraInformation": [ - "Left", - "Right" + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } ], "name": "WalkStick" }, @@ -9506,9 +9631,15 @@ "type": "Choice", "label": "Camera joystick", "group": "Controls", - "extraInformation": [ - "Left", - "Right" + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } ], "name": "CameraStick" }, @@ -9517,15 +9648,39 @@ "type": "Choice", "label": "Jump button", "group": "Controls", - "extraInformation": [ - "A or Cross", - "B or Circle", - "X or Square", - "Y or Triangle", - "LB or L1", - "RB or R1", - "LT or L2", - "RT or R2" + "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" } @@ -10461,6 +10616,7 @@ "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { @@ -10473,9 +10629,15 @@ "value": "Right", "type": "Choice", "label": "Camera joystick", - "extraInformation": [ - "Left", - "Right" + "choices": [ + { + "label": "Left", + "value": "Left" + }, + { + "label": "Right", + "value": "Right" + } ], "name": "CameraStick" }, @@ -10862,6 +11024,7 @@ "extraInformation": [ "Physics3D::PhysicsCar3D" ], + "choices": [], "name": "PhysicsCar3D" }, { @@ -10896,15 +11059,39 @@ "type": "Choice", "label": "Hand brake button", "group": "Controls", - "extraInformation": [ - "A or Cross", - "B or Circle", - "X or Square", - "Y or Triangle", - "LB or L1", - "RB or R1", - "LT or L2", - "RT or R2" + "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" } @@ -11501,6 +11688,7 @@ "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], + "choices": [], "name": "TopDownMovement" }, { @@ -11535,10 +11723,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" } @@ -15292,6 +15489,7 @@ "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], + "choices": [], "name": "Property" }, { @@ -15305,146 +15503,16 @@ "type": "Choice", "label": "Joystick name", "group": "Controls", - "extraInformation": [ - "Primary", - "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", - "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" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", - "type": "behavior" + "label": "Secondary", + "value": "Secondary" } ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "Behavior", - "label": "3D physics character", - "extraInformation": [ - "Physics3D::PhysicsCharacter3D" - ], - "name": "PhysicsCharacter3D" - }, - { - "value": "1", - "type": "Number", - "label": "Controller identifier (1, 2, 3, 4...)", - "name": "ControllerIdentifier" - }, - { - "value": "Primary", - "type": "Choice", - "label": "Walk joystick", - "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" - ], "name": "JoystickIdentifier" }, { @@ -15459,8 +15527,151 @@ }, { "description": "Control a 3D physics character with a multitouch controller.", - "fullName": "3D shooter multitouch controller mapper", - "name": "Shooter3DMultitouchMapper", + "fullName": "3D platformer multitouch controller mapper", + "name": "Platformer3DMultitouchMapper", + "objectType": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::StickForce" + }, + "parameters": [ + "", + ">", + "0", + "ControllerIdentifier", + "JoystickIdentifier", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SetForwardAngle" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "=", + "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())" + ] + }, + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateStick" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D", + "-90", + "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "ControllerIdentifier", + "JumpButton", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PhysicsCharacter3D" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::Platformer3DMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "3D physics character", + "extraInformation": [ + "Physics3D::PhysicsCharacter3D" + ], + "choices": [], + "name": "PhysicsCharacter3D" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Walk joystick", + "group": "Controls", + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } + ], + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "group": "Controls", + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a 3D physics character with a multitouch controller.", + "fullName": "3D shooter multitouch controller mapper", + "name": "Shooter3DMultitouchMapper", "objectType": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ @@ -15553,6 +15764,7 @@ "extraInformation": [ "Physics3D::PhysicsCharacter3D" ], + "choices": [], "name": "PhysicsCharacter3D" }, { @@ -15566,9 +15778,15 @@ "type": "Choice", "label": "Walk joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -16511,6 +16729,7 @@ "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { @@ -16524,9 +16743,15 @@ "type": "Choice", "label": "Camera joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "CameraStick" }, @@ -16742,6 +16967,7 @@ "extraInformation": [ "Physics3D::PhysicsCar3D" ], + "choices": [], "name": "PhysicsCar3D" }, { @@ -16755,9 +16981,15 @@ "type": "Choice", "label": "Steer joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "SteerJoystickIdentifier" }, @@ -16766,9 +16998,15 @@ "type": "Choice", "label": "Speed joystick", "group": "Controls", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "SpeedJoystickIdentifier" }, @@ -17301,6 +17539,7 @@ "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], + "choices": [], "name": "TopDownMovement" }, { @@ -17313,9 +17552,15 @@ "value": "Primary", "type": "Choice", "label": "Joystick name", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -17324,10 +17569,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" } @@ -18594,9 +18848,15 @@ "value": "Primary", "type": "Choice", "label": "Joystick name", - "extraInformation": [ - "Primary", - "Secondary" + "choices": [ + { + "label": "Primary", + "value": "Primary" + }, + { + "label": "Secondary", + "value": "Secondary" + } ], "name": "JoystickIdentifier" }, @@ -18615,6 +18875,7 @@ "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, @@ -18634,6 +18895,7 @@ "extraInformation": [ "Thumb" ], + "choices": [], "hidden": true, "name": "ThumbIsScaledProportionally" }, @@ -18848,6 +19110,7 @@ "extraInformation": [ "Physics3D::PhysicsCar3D" ], + "choices": [], "name": "PhysicsCar3D" }, { @@ -21631,6 +21894,7 @@ "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { @@ -24012,6 +24276,7 @@ "extraInformation": [ "Scene3D::Base3DBehavior" ], + "choices": [], "name": "Object3D" }, { @@ -34095,12 +34360,27 @@ "type": "Choice", "label": "Blending", "group": "Color", - "extraInformation": [ - "Normal", - "Additive", - "Subtractive", - "Multiply", - "None" + "choices": [ + { + "label": "Normal", + "value": "Normal" + }, + { + "label": "Additive", + "value": "Additive" + }, + { + "label": "Subtractive", + "value": "Subtractive" + }, + { + "label": "Multiply", + "value": "Multiply" + }, + { + "label": "None", + "value": "None" + } ], "name": "Blending" }, @@ -34109,9 +34389,15 @@ "type": "Choice", "label": "Gravity top", "group": "Speed", - "extraInformation": [ - "Y-", - "Z+" + "choices": [ + { + "label": "Y-", + "value": "Y-" + }, + { + "label": "Z+", + "value": "Z+" + } ], "name": "GravityTop" }, @@ -35465,12 +35751,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" @@ -36972,9 +37273,15 @@ "value": "", "type": "Choice", "label": "", - "extraInformation": [ - "Label.Text=LabelText", - "BitmapLabel.Text=LabelText" + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" + } ], "hidden": true, "name": "_PropertyMapping" @@ -40771,6 +41078,7 @@ "extraInformation": [ "Physics2::Physics2Behavior" ], + "choices": [], "name": "RequiredPhysicsBehavior" }, { @@ -42131,21 +42439,357 @@ "author": "", "category": "User interface", "extensionNamespace": "", - "fullName": "", + "fullName": "Leaderboard dialog", "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRyb3BoeSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCAyQzE3LjEgMiAxNiAzIDE2IDRIOEM4IDMgNi45IDIgNiAySDJWMTFDMiAxMiAzIDEzIDQgMTNINi4yQzYuNiAxNSA3LjkgMTYuNyAxMSAxN1YxOS4wOEM4IDE5LjU0IDggMjIgOCAyMkgxNkMxNiAyMiAxNiAxOS41NCAxMyAxOS4wOFYxN0MxNi4xIDE2LjcgMTcuNCAxNSAxNy44IDEzSDIwQzIxIDEzIDIyIDEyIDIyIDExVjJIMThNNiAxMUg0VjRINlYxMU0yMCAxMUgxOFY0SDIwVjExWiIgLz48L3N2Zz4=", "name": "LeaderboardDialog", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/4b89b420c0ed9c540a7f00c5735a31af0db2160679d3fab2170df3681c3ac38c_trophy.svg", - "shortDescription": "", - "version": "", - "description": "", - "tags": [], - "authorIds": [], + "shortDescription": "Display the player score and allow to submit it to a leaderboard.", + "version": "1.0.0", + "description": "Display the player score and allow to submit it to a leaderboard.", + "origin": { + "identifier": "LeaderboardDialog", + "name": "gdevelop-extension-store" + }, + "tags": [ + "" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], "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": [] + }, + { + "description": "Return a formated time for a given timestamp", + "fullName": "Format time", + "functionType": "StringExpression", + "name": "FormatTime", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(Time)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS.ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS.ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(floor(Time * 1000))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"HH:MM:SS.ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"HH:MM:SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Time", + "name": "Time", + "type": "expression" + }, + { + "description": "Format", + "name": "Format", + "supplementaryInformation": "[\"MM:SS.ms\",\"MM:SS\",\"SS\",\"SS.ms\",\"ms\",\"HH:MM:SS.ms\",\"HH:MM:SS\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Formats a number to a string with the specified number of decimal places.", + "fullName": "To fixed", + "functionType": "StringExpression", + "name": "ToFixed", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const valueToBeRounded = eventsFunctionContext.getArgument(\"ValueToBeRounded\");", + "const numberOfDecimalPlaces = eventsFunctionContext.getArgument(\"NumberOfDecimalPlaces\");", + "eventsFunctionContext.returnValue = valueToBeRounded.toFixed(numberOfDecimalPlaces);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "The value to be rounded", + "name": "ValueToBeRounded", + "type": "expression" + }, + { + "description": "Number of decimal places", + "name": "NumberOfDecimalPlaces", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Pad start", + "functionType": "StringExpression", + "name": "PadStart", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const value = eventsFunctionContext.getArgument(\"Value\");", + "const targetLength = eventsFunctionContext.getArgument(\"TargetLength\");", + "const padString = eventsFunctionContext.getArgument(\"PadString\");", + "eventsFunctionContext.returnValue = value.padStart(targetLength, padString);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Text", + "name": "Value", + "type": "string" + }, + { + "description": "Target length", + "name": "TargetLength", + "type": "expression" + }, + { + "description": "Pad string", + "name": "PadString", + "type": "string" + } + ], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -42173,8 +42817,8 @@ "variables": [], "effects": [], "behaviors": [], - "string": "Time:", - "font": "Chango-Regular.ttf", + "string": "Score:", + "font": "", "textAlignment": "", "characterSize": 40, "color": { @@ -42196,8 +42840,8 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Time:", - "font": "Chango-Regular.ttf", + "text": "Score:", + "font": "", "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, @@ -42226,7 +42870,7 @@ "content": { "initialValue": "", "placeholder": "PlayerName", - "fontResourceName": "Chango-Regular.ttf", + "fontResourceName": "", "fontSize": 40, "inputType": "text", "textColor": "72;72;79", @@ -42241,7 +42885,7 @@ }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "SubmitButton", + "name": "SubmitTextButton", "type": "PanelSpriteButton::PanelSpriteButton", "variant": "Yellow button 2", "variables": [], @@ -42339,7 +42983,7 @@ }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "RestartButton", + "name": "RetryTextButton", "type": "PanelSpriteButton::PanelSpriteButton", "variant": "Yellow button 2", "variables": [], @@ -42442,7 +43086,7 @@ "leftMargin": 16, "name": "Panel", "rightMargin": 16, - "texture": "assets\\Grey Button_Idle.png", + "texture": "", "tiled": false, "topMargin": 16, "type": "PanelSpriteObject::PanelSprite", @@ -42461,29 +43105,478 @@ "useLegacyBottomAndRightAnchors": false } ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Game over", + "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": "Game over", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [] + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BestScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Best:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "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": "Best:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } } ], "objectsFolderStructure": { "folderName": "__ROOT", "children": [ + { + "folderName": "Bitmap labels", + "children": [ + { + "objectName": "BitmapTitle" + }, + { + "objectName": "BitmapScoreLabel" + }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + { + "objectName": "Title" + }, { "objectName": "ScoreLabel" }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "Medal" + }, { "objectName": "PlayerNameInput" }, { - "objectName": "SubmitButton" + "objectName": "SubmitTextButton" }, { - "objectName": "RestartButton" + "objectName": "RetryTextButton" + }, + { + "objectName": "BackTextButton" + }, + { + "objectName": "NextTextButton" }, { "objectName": "Panel" } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "ActionTextButton", + "objects": [ + { + "name": "RetryTextButton" + }, + { + "name": "BackTextButton" + }, + { + "name": "NextTextButton" + } + ] + }, + { + "name": "Titles", + "objects": [ + { + "name": "Title" + }, + { + "name": "BitmapTitle" + } + ] + }, + { + "name": "ScoreLabels", + "objects": [ + { + "name": "ScoreLabel" + }, + { + "name": "BitmapScoreLabel" + } + ] + }, + { + "name": "BestScoreLabels", + "objects": [ + { + "name": "BestScoreLabel" + }, + { + "name": "BitmapBestScoreLabel" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -42551,7 +43644,7 @@ "customSize": false, "height": 0, "layer": "", - "name": "RestartButton", + "name": "RetryTextButton", "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", "width": 0, "x": 224, @@ -42567,7 +43660,7 @@ "depth": 48, "height": 106, "layer": "", - "name": "SubmitButton", + "name": "SubmitTextButton", "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", "width": 216, "x": 432, @@ -42626,14 +43719,6 @@ "DefaultPlayerName", "" ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] } ] }, @@ -42642,30 +43727,57 @@ "conditions": [ { "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" }, - "parameters": [] + "parameters": [ + "", + "" + ] } ], "actions": [ { "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" + "value": "PlayerAuthentication::DisplayAuthenticationBanner" }, "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" + "" ] - }, + } + ], + "events": [ { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + } ] } ] @@ -42692,96 +43804,23 @@ "conditions": [ { "type": { - "value": "PlayerAuthentication::HasPlayerLoggedIn" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" }, "parameters": [ + "", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Leaderboards::IsLeaderboardViewErrored" - }, - "parameters": [] - } ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "SubmitButton", - "" - ] - } - ], - "actions": [], - "events": [ + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" + "value": "PlayerAuthentication::HasPlayerLoggedIn" }, "parameters": [] } @@ -42789,12 +43828,30 @@ "actions": [ { "type": { - "value": "Leaderboards::SaveConnectedPlayerScore" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "", - "LeaderboardId", - "Score" + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + }, + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" ] } ] @@ -42804,8 +43861,7 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" + "value": "Leaderboards::IsLeaderboardViewErrored" }, "parameters": [] } @@ -42813,37 +43869,111 @@ "actions": [ { "type": { - "value": "Leaderboards::SavePlayerScore" + "value": "PlayerAuthentication::DisplayAuthenticationBanner" }, "parameters": [ - "", - "LeaderboardId", - "Score", - "PlayerNameInput.Text()" + "" ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, "parameters": [ + "SubmitTextButton", "" ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score" + ] + } + ] }, { - "type": { - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "LeaderboardId", - "yes" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score", + "PlayerNameInput.Text()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "LeaderboardId", + "yes" + ] + } ] } ] @@ -42909,10 +44039,10 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyScore" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "Score", "=", "Value" ] @@ -42922,21 +44052,178 @@ "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "ScoreLabel", + "ScoreLabels", "Text", "=", - "\"Time: \" + TimeFormatter::SecondsToHHMMSS000(Score)" + "ScoreLabelText + Object.FormatScore(Value)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the best score of the object.", + "fullName": "Best score", + "functionType": "ExpressionAndCondition", + "name": "BestScore", + "sentence": "the best score", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "BestScore" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "BestScore", + "name": "SetBestScore", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BestScore", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "BestScoreLabels", + "Text", + "=", + "BestScoreLabelText + Object.FormatScore(Value)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the formated score.", + "fullName": "Format score", + "functionType": "StringExpression", + "name": "FormatScore", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"Number\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Prefix + ToString(roundTo(Value, NumberDecimalPoint)) + Suffix" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "!=", + "\"Number\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Prefix + LeaderboardDialog::FormatTime(Value, Format) + Suffix" ] } ] } ], + "expressionType": { + "type": "string" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", "type": "object" + }, + { + "description": "Score", + "name": "Value", + "type": "expression" } ], "objectGroups": [] @@ -42989,10 +44276,10 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyDefaultPlayerName" + "value": "SetStringVariable" }, "parameters": [ - "Object", + "DefaultPlayerName", "=", "Value" ] @@ -43011,10 +44298,10 @@ }, { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::PropertyDefaultPlayerName" + "value": "StringVariable" }, "parameters": [ - "Object", + "DefaultPlayerName", "!=", "\"0\"" ] @@ -43095,7 +44382,107 @@ "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, "parameters": [ - "RestartButton", + "RetryTextButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the next button of the dialog is clicked.", + "fullName": "Next button clicked", + "functionType": "Condition", + "name": "IsNextClicked", + "sentence": "Next button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "NextTextButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the back button of the dialog is clicked.", + "fullName": "Back button clicked", + "functionType": "Condition", + "name": "IsBackClicked", + "sentence": "Back button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "BackTextButton", "" ] } @@ -43237,10 +44624,81 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyLeaderboardId" + "value": "SetStringVariable" }, "parameters": [ - "Object", + "LeaderboardId", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the title of the object.", + "fullName": "Title", + "functionType": "ExpressionAndCondition", + "name": "Title", + "private": true, + "sentence": "the title", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Title.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Title", + "name": "SetTitle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", "=", "Value" ] @@ -43279,9 +44737,983 @@ "label": "", "hidden": true, "name": "Score" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Best score", + "hidden": true, + "name": "BestScore" + }, + { + "value": "Number", + "type": "Choice", + "label": "Format", + "group": "Score format", + "choices": [ + { + "label": "Number", + "value": "Number" + }, + { + "label": "MM:SS.ms", + "value": "MM:SS.ms" + }, + { + "label": "MM:SS", + "value": "MM:SS" + }, + { + "label": "SS.ms", + "value": "SS.ms" + }, + { + "label": "SS", + "value": "SS" + }, + { + "label": "ms", + "value": "ms" + }, + { + "label": "HH:MM:SS.ms", + "value": "HH:MM:SS.ms" + }, + { + "label": "HH:MM:SS", + "value": "HH:MM:SS" + } + ], + "name": "Format" + }, + { + "value": "", + "type": "String", + "label": "Prefix", + "group": "Score format", + "name": "Prefix" + }, + { + "value": "", + "type": "String", + "label": "Suffix", + "group": "Score format", + "name": "Suffix" + }, + { + "value": "3", + "type": "Number", + "label": "Round to decimal point", + "group": "Score format", + "name": "NumberDecimalPoint" + }, + { + "value": "Score: ", + "type": "String", + "label": "Score label", + "name": "ScoreLabelText" + }, + { + "value": "Best: ", + "type": "String", + "label": "Best score label", + "name": "BestScoreLabelText" } ], - "variants": [] + "variants": [ + { + "areaMaxX": 688, + "areaMaxY": 480, + "areaMaxZ": 48, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Grey and yellow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Time:", + "font": "Chango-Regular.ttf", + "textAlignment": "", + "characterSize": 40, + "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": "Time:", + "font": "Chango-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "Chango-Regular.ttf", + "fontSize": 40, + "inputType": "text", + "textColor": "72;72;79", + "fillColor": "231;232;243", + "fillOpacity": 255, + "borderColor": "255;255;255", + "borderOpacity": 255, + "borderWidth": 6, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "SubmitTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Send" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "RetryTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 128, + "leftMargin": 16, + "name": "Panel", + "rightMargin": 16, + "texture": "assets\\Grey Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Game over", + "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": "Game over", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [] + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BestScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Best:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "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": "Best:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Bitmap labels", + "children": [ + { + "objectName": "BitmapTitle" + }, + { + "objectName": "BitmapScoreLabel" + }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + { + "objectName": "Title" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "Medal" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "SubmitTextButton" + }, + { + "objectName": "RetryTextButton" + }, + { + "objectName": "BackTextButton" + }, + { + "objectName": "NextTextButton" + }, + { + "objectName": "Panel" + } + ] + }, + "objectsGroups": [ + { + "name": "ActionTextButton", + "objects": [ + { + "name": "RetryTextButton" + }, + { + "name": "BackTextButton" + }, + { + "name": "NextTextButton" + } + ] + }, + { + "name": "Titles", + "objects": [ + { + "name": "Title" + }, + { + "name": "BitmapTitle" + } + ] + }, + { + "name": "ScoreLabels", + "objects": [ + { + "name": "ScoreLabel" + }, + { + "name": "BitmapScoreLabel" + } + ] + }, + { + "name": "BestScoreLabels", + "objects": [ + { + "name": "BestScoreLabel" + }, + { + "name": "BitmapBestScoreLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 71, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", + "width": 606, + "x": 36, + "y": 41, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 96, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", + "width": 360, + "x": 40, + "y": 160, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RetryTextButton", + "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", + "width": 0, + "x": 224, + "y": 320, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 48, + "height": 106, + "layer": "", + "name": "SubmitTextButton", + "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", + "width": 216, + "x": 432, + "y": 150, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 480, + "layer": "", + "name": "Panel", + "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", + "width": 688, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + } + ] } ] }, @@ -43601,6 +46033,7 @@ "extraInformation": [ "Physics3D::Physics3DBehavior" ], + "choices": [], "name": "Physics3D" }, { diff --git a/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Back.png b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Back.png new file mode 100644 index 000000000..16e34f3da Binary files /dev/null and b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Back.png differ diff --git a/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Bottom.png b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Bottom.png new file mode 100644 index 000000000..aa0891ef2 Binary files /dev/null and b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Bottom.png differ diff --git a/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Front.png b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Front.png new file mode 100644 index 000000000..ce5ae5d6f Binary files /dev/null and b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Front.png differ diff --git a/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Left.png b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Left.png new file mode 100644 index 000000000..497b38fe8 Binary files /dev/null and b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Left.png differ diff --git a/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Right.png b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Right.png new file mode 100644 index 000000000..a026e8faf Binary files /dev/null and b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Right.png differ diff --git a/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Top.png b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Top.png new file mode 100644 index 000000000..377476a78 Binary files /dev/null and b/examples/3d-car-coin-hunt/assets/Cubemap_Sky_04-512x512_Top.png differ diff --git a/examples/3d-lane-runner/3d-lane-runner.json b/examples/3d-lane-runner/3d-lane-runner.json index b0bb94821..2e47f25de 100644 --- a/examples/3d-lane-runner/3d-lane-runner.json +++ b/examples/3d-lane-runner/3d-lane-runner.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 237, + "build": 241, "major": 5, "minor": 5, "revision": 0 @@ -86,7 +86,6 @@ ], "playableDevices": [ "keyboard", - "mobile", "mobile" ], "extensionProperties": [], @@ -188,7 +187,7 @@ "file": "assets/Roboto-Bold.ttf", "kind": "font", "metadata": "", - "name": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "name": "Roboto-Bold.ttf", "userAdded": true, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", @@ -573,7 +572,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.296700446389139, + "zoomFactor": 0.45662317381491313, "windowMask": false }, "objectsGroups": [], @@ -660,7 +659,7 @@ } ], "string": "LANE RUNNER", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Roboto-Bold.ttf", "textAlignment": "center", "characterSize": 90, "color": { @@ -683,10 +682,11 @@ "smoothed": true, "underlined": false, "text": "LANE RUNNER", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Roboto-Bold.ttf", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 90, + "lineHeight": 0, "color": "236;159;61" } }, @@ -793,6 +793,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 80, + "lineHeight": 0, "color": "117;42;0" } }, @@ -1846,7 +1847,7 @@ "effects": [], "behaviors": [], "string": "Coins: 0", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Roboto-Bold.ttf", "textAlignment": "left", "characterSize": 50, "color": { @@ -1869,10 +1870,11 @@ "smoothed": true, "underlined": false, "text": "Coins: 0", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Roboto-Bold.ttf", "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 50, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1888,7 +1890,7 @@ "effects": [], "behaviors": [], "string": "HighScore: 0", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Roboto-Bold.ttf", "textAlignment": "left", "characterSize": 50, "color": { @@ -1911,10 +1913,11 @@ "smoothed": true, "underlined": false, "text": "HighScore: 0", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Roboto-Bold.ttf", "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 50, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1930,7 +1933,7 @@ "effects": [], "behaviors": [], "string": "Controls: Arrow keys and space bar.", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Roboto-Bold.ttf", "textAlignment": "left", "characterSize": 50, "color": { @@ -1953,10 +1956,11 @@ "smoothed": true, "underlined": false, "text": "Controls: Arrow keys and space bar.", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Roboto-Bold.ttf", "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 50, + "lineHeight": 0, "color": "255;255;255" } }, @@ -3480,7 +3484,7 @@ "assetStoreId": "", "name": "LeaderboardDialog", "type": "LeaderboardDialog::LeaderboardDialog", - "variant": "", + "variant": "Grey and yellow", "variables": [], "effects": [], "behaviors": [ @@ -3496,7 +3500,8 @@ } ], "content": { - "LeaderboardId": "2392ae63-5ed6-4d1b-9ca5-157d64602a81" + "LeaderboardId": "2392ae63-5ed6-4d1b-9ca5-157d64602a81", + "NumberDecimalPoint": 0 } }, { @@ -14452,12 +14457,27 @@ "type": "Choice", "label": "Blending", "group": "Color", - "extraInformation": [ - "Normal", - "Additive", - "Subtractive", - "Multiply", - "None" + "choices": [ + { + "label": "Normal", + "value": "Normal" + }, + { + "label": "Additive", + "value": "Additive" + }, + { + "label": "Subtractive", + "value": "Subtractive" + }, + { + "label": "Multiply", + "value": "Multiply" + }, + { + "label": "None", + "value": "None" + } ], "name": "Blending" }, @@ -14466,9 +14486,15 @@ "type": "Choice", "label": "Gravity top", "group": "Speed", - "extraInformation": [ - "Y-", - "Z+" + "choices": [ + { + "label": "Y-", + "value": "Y-" + }, + { + "label": "Z+", + "value": "Z+" + } ], "name": "GravityTop" }, @@ -16881,6 +16907,7 @@ "extraInformation": [ "Physics2::Physics2Behavior" ], + "choices": [], "name": "RequiredPhysicsBehavior" }, { @@ -18092,12 +18119,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" @@ -18199,6 +18241,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -19554,8 +19597,11 @@ "value": "", "type": "Choice", "label": "", - "extraInformation": [ - "Label.Text=LabelText" + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + } ], "hidden": true, "name": "_PropertyMapping" @@ -19594,7 +19640,7 @@ } ], "string": "Button", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Roboto-Bold.ttf", "textAlignment": "center", "characterSize": 60, "color": { @@ -19617,10 +19663,11 @@ "smoothed": true, "underlined": false, "text": "Button", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Roboto-Bold.ttf", "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 60, + "lineHeight": 0, "color": "139;87;42" } }, @@ -19881,6 +19928,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 60, + "lineHeight": 0, "color": "117;42;0" } }, @@ -20150,6 +20198,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 60, + "lineHeight": 0, "color": "139;87;42" } }, @@ -23418,6 +23467,7 @@ "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -24042,471 +24092,1835 @@ "author": "", "category": "User interface", "extensionNamespace": "", - "fullName": "", + "fullName": "Leaderboard dialog", "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRyb3BoeSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCAyQzE3LjEgMiAxNiAzIDE2IDRIOEM4IDMgNi45IDIgNiAySDJWMTFDMiAxMiAzIDEzIDQgMTNINi4yQzYuNiAxNSA3LjkgMTYuNyAxMSAxN1YxOS4wOEM4IDE5LjU0IDggMjIgOCAyMkgxNkMxNiAyMiAxNiAxOS41NCAxMyAxOS4wOFYxN0MxNi4xIDE2LjcgMTcuNCAxNSAxNy44IDEzSDIwQzIxIDEzIDIyIDEyIDIyIDExVjJIMThNNiAxMUg0VjRINlYxMU0yMCAxMUgxOFY0SDIwVjExWiIgLz48L3N2Zz4=", "name": "LeaderboardDialog", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/4b89b420c0ed9c540a7f00c5735a31af0db2160679d3fab2170df3681c3ac38c_trophy.svg", - "shortDescription": "", - "version": "", - "description": "", - "tags": [], - "authorIds": [], + "shortDescription": "Display the player score and allow to submit it to a leaderboard.", + "version": "1.0.0", + "description": "Display the player score and allow to submit it to a leaderboard.", + "origin": { + "identifier": "LeaderboardDialog", + "name": "gdevelop-extension-store" + }, + "tags": [ + "" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [], - "eventsBasedObjects": [ + "eventsFunctions": [ { - "areaMaxX": 688, - "areaMaxY": 480, - "areaMaxZ": 48, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "defaultName": "LeaderboardDialog", - "description": "Displays the player score and allows to submit it to a leaderboard.", - "fullName": "Leaderboard dialog", - "isInnerAreaFollowingParentSize": true, - "isUsingLegacyInstancesRenderer": false, - "name": "LeaderboardDialog", - "objects": [ + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "ScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Score", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "textAlignment": "", - "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": "Score", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 60, - "color": "72;72;79" - } - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Return a formated time for a given timestamp", + "fullName": "Format time", + "functionType": "StringExpression", + "name": "FormatTime", + "private": true, + "sentence": "", + "events": [ { - "assetStoreId": "", - "name": "PlayerNameInput", - "type": "TextInput::TextInputObject", - "variables": [], - "effects": [], - "behaviors": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(Time)" + ] } - ], - "content": { - "initialValue": "", - "placeholder": "PlayerName", - "fontResourceName": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "fontSize": 40, - "inputType": "text", - "textColor": "72;72;79", - "fillColor": "231;232;243", - "fillOpacity": 255, - "borderColor": "255;255;255", - "borderOpacity": 255, - "borderWidth": 6, - "readOnly": false, - "disabled": false - } + ] }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "SubmitButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 0, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS.ms\"" + ] } ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Send" - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Send", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 42, - "g": 87, - "r": 139 + "actions": [ + { + "type": { + "value": "SetReturnString" }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Send", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "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": true, - "topMargin": 32, - "width": 256 + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] } - } + ] }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "RestartButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS\"" + ] } ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Restart" - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Restart", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 42, - "g": 87, - "r": 139 + "actions": [ + { + "type": { + "value": "SetReturnString" }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Restart", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "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": true, - "topMargin": 32, - "width": 256 + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] } - } + ] }, { - "assetStoreId": "", - "bottomMargin": 32, - "height": 128, - "leftMargin": 16, - "name": "Panel", - "rightMargin": 16, - "texture": "assets\\Grey Button_Idle.png", - "tiled": false, - "topMargin": 16, - "type": "PanelSpriteObject::PanelSprite", - "width": 128, - "variables": [], - "effects": [], - "behaviors": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" + ] } ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "ScoreLabel" - }, - { - "objectName": "PlayerNameInput" - }, - { - "objectName": "SubmitButton" - }, - { - "objectName": "RestartButton" - }, - { - "objectName": "Panel" - } - ] - }, - "objectsGroups": [], - "layers": [ + }, { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS.ms\"" + ] } ], - "effects": [] - } - ], - "instances": [ - { - "angle": 0, - "customSize": false, - "height": 67, - "layer": "", - "name": "ScoreLabel", - "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", - "width": 384, - "x": 36, - "y": 41, - "zOrder": 18, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" + ] + } + ] }, { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 96, - "layer": "", - "name": "PlayerNameInput", - "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", - "width": 360, - "x": 40, - "y": 160, - "zOrder": 19, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(floor(Time * 1000))" + ] + } + ] }, { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "RestartButton", - "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", - "width": 0, - "x": 224, - "y": 320, - "zOrder": 35, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"HH:MM:SS.ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] + } + ] }, { - "angle": 0, - "customSize": true, - "depth": 48, - "height": 106, - "layer": "", - "name": "SubmitButton", - "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", - "width": 216, - "x": 432, - "y": 150, - "zOrder": 37, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"HH:MM:SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Time", + "name": "Time", + "type": "expression" }, { - "angle": 0, - "customSize": true, - "depth": 0, - "height": 480, - "layer": "", - "name": "Panel", - "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", - "width": 688, - "x": 0, - "y": 0, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "description": "Format", + "name": "Format", + "supplementaryInformation": "[\"MM:SS.ms\",\"MM:SS\",\"SS\",\"SS.ms\",\"ms\",\"HH:MM:SS.ms\",\"HH:MM:SS\"]", + "type": "stringWithSelector" } ], - "eventsFunctions": [ + "objectGroups": [] + }, + { + "description": "Formats a number to a string with the specified number of decimal places.", + "fullName": "To fixed", + "functionType": "StringExpression", + "name": "ToFixed", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const valueToBeRounded = eventsFunctionContext.getArgument(\"ValueToBeRounded\");", + "const numberOfDecimalPlaces = eventsFunctionContext.getArgument(\"NumberOfDecimalPlaces\");", + "eventsFunctionContext.returnValue = valueToBeRounded.toFixed(numberOfDecimalPlaces);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "The value to be rounded", + "name": "ValueToBeRounded", + "type": "expression" + }, + { + "description": "Number of decimal places", + "name": "NumberOfDecimalPlaces", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Pad start", + "functionType": "StringExpression", + "name": "PadStart", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const value = eventsFunctionContext.getArgument(\"Value\");", + "const targetLength = eventsFunctionContext.getArgument(\"TargetLength\");", + "const padString = eventsFunctionContext.getArgument(\"PadString\");", + "eventsFunctionContext.returnValue = value.padStart(targetLength, padString);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Text", + "name": "Value", + "type": "string" + }, + { + "description": "Target length", + "name": "TargetLength", + "type": "expression" + }, + { + "description": "Pad string", + "name": "PadString", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 688, + "areaMaxY": 480, + "areaMaxZ": 48, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "LeaderboardDialog", + "description": "Displays the player score and allows to submit it to a leaderboard.", + "fullName": "Leaderboard dialog", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "LeaderboardDialog", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Score:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "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": "Score:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "", + "fontSize": 40, + "inputType": "text", + "textColor": "72;72;79", + "fillColor": "231;232;243", + "fillOpacity": 255, + "borderColor": "255;255;255", + "borderOpacity": 255, + "borderWidth": 6, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "SubmitTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Send" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "RetryTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 128, + "leftMargin": 16, + "name": "Panel", + "rightMargin": 16, + "texture": "", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Game over", + "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": "Game over", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [] + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BestScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Best:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "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": "Best:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Bitmap labels", + "children": [ + { + "objectName": "BitmapTitle" + }, + { + "objectName": "BitmapScoreLabel" + }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + { + "objectName": "Title" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "Medal" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "SubmitTextButton" + }, + { + "objectName": "RetryTextButton" + }, + { + "objectName": "BackTextButton" + }, + { + "objectName": "NextTextButton" + }, + { + "objectName": "Panel" + } + ] + }, + "objectsGroups": [ + { + "name": "ActionTextButton", + "objects": [ + { + "name": "RetryTextButton" + }, + { + "name": "BackTextButton" + }, + { + "name": "NextTextButton" + } + ] + }, + { + "name": "Titles", + "objects": [ + { + "name": "Title" + }, + { + "name": "BitmapTitle" + } + ] + }, + { + "name": "ScoreLabels", + "objects": [ + { + "name": "ScoreLabel" + }, + { + "name": "BitmapScoreLabel" + } + ] + }, + { + "name": "BestScoreLabels", + "objects": [ + { + "name": "BestScoreLabel" + }, + { + "name": "BitmapBestScoreLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 71, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", + "width": 606, + "x": 36, + "y": 41, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 96, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", + "width": 360, + "x": 40, + "y": 160, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RetryTextButton", + "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", + "width": 0, + "x": 224, + "y": 320, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 48, + "height": 106, + "layer": "", + "name": "SubmitTextButton", + "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", + "width": 216, + "x": 432, + "y": 150, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 480, + "layer": "", + "name": "Panel", + "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", + "width": 688, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetScore" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + }, + "parameters": [ + "Object", + "=", + "DefaultPlayerName", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::HasPlayerLoggedIn" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + }, + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::IsLeaderboardViewErrored" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "SubmitTextButton", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score", + "PlayerNameInput.Text()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "LeaderboardId", + "yes" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the score.", + "fullName": "Score", + "functionType": "ExpressionAndCondition", + "name": "Score", + "sentence": "the score", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Score" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Score", + "name": "SetScore", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Score", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "ScoreLabels", + "Text", + "=", + "ScoreLabelText + Object.FormatScore(Value)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the best score of the object.", + "fullName": "Best score", + "functionType": "ExpressionAndCondition", + "name": "BestScore", + "sentence": "the best score", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "BestScore" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "BestScore", + "name": "SetBestScore", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BestScore", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "BestScoreLabels", + "Text", + "=", + "BestScoreLabelText + Object.FormatScore(Value)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the formated score.", + "fullName": "Format score", + "functionType": "StringExpression", + "name": "FormatScore", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"Number\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Prefix + ToString(roundTo(Value, NumberDecimalPoint)) + Suffix" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "!=", + "\"Number\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Prefix + LeaderboardDialog::FormatTime(Value, Format) + Suffix" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + }, + { + "description": "Score", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the default player name.", + "fullName": "Default player name", + "functionType": "ExpressionAndCondition", + "name": "DefaultPlayerName", + "sentence": "the default player name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "DefaultPlayerName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, { "fullName": "", - "functionType": "Action", - "name": "onCreated", + "functionType": "ActionWithOperator", + "getterName": "DefaultPlayerName", + "name": "SetDefaultPlayerName", "sentence": "", "events": [ { @@ -24515,32 +25929,12 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetScore" - }, - "parameters": [ - "Object", - "=", - "0", - "" - ] - }, - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + "value": "SetStringVariable" }, "parameters": [ - "Object", - "=", "DefaultPlayerName", - "" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" + "=", + "Value" ] } ] @@ -24550,9 +25944,20 @@ "conditions": [ { "type": { + "inverted": true, "value": "PlayerAuthentication::IsPlayerAuthenticated" }, "parameters": [] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "DefaultPlayerName", + "!=", + "\"0\"" + ] } ], "actions": [ @@ -24564,21 +25969,47 @@ "PlayerNameInput", "Text", "=", - "PlayerAuthentication::Username()" + "DefaultPlayerName" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the player name.", + "fullName": "Player name", + "functionType": "ExpressionAndCondition", + "name": "PlayerName", + "sentence": "the player name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "TextInput::TextInputObject::SetDisabled" + "value": "SetReturnString" }, "parameters": [ - "PlayerNameInput", - "yes" + "PlayerNameInput.Text::Value()" ] } ] } ], + "expressionType": { + "type": "string" + }, "parameters": [ { "description": "Object", @@ -24590,73 +26021,162 @@ "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", + "description": "Check if the restart button of the dialog is clicked.", + "fullName": "Restart button clicked", + "functionType": "Condition", + "name": "IsRestartClicked", + "sentence": "Restart button of _PARAM0_ is clicked", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PlayerAuthentication::HasPlayerLoggedIn" + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": [] + "parameters": [ + "RetryTextButton", + "" + ] } ], "actions": [ { "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" + "value": "PlayerAuthentication::HideAuthenticationBanner" }, "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" + "" ] }, { "type": { - "value": "TextInput::TextInputObject::SetDisabled" + "value": "SetReturnBoolean" }, "parameters": [ - "PlayerNameInput", - "yes" + "True" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the next button of the dialog is clicked.", + "fullName": "Next button clicked", + "functionType": "Condition", + "name": "IsNextClicked", + "sentence": "Next button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "NextTextButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" }, "parameters": [ "" ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the back button of the dialog is clicked.", + "fullName": "Back button clicked", + "functionType": "Condition", + "name": "IsBackClicked", + "sentence": "Back button of _PARAM0_ is clicked", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Leaderboards::IsLeaderboardViewErrored" + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": [] + "parameters": [ + "BackTextButton", + "" + ] } ], "actions": [ { "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" + "value": "PlayerAuthentication::HideAuthenticationBanner" }, "parameters": [ "" ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the score has been sucessfully submitted by the dialog.", + "fullName": "Score is submitted", + "functionType": "Condition", + "name": "IsScoreSubmitted", + "sentence": "_PARAM0_ submitted a score", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -24667,93 +26187,33 @@ "textG": 0, "textR": 0 }, - "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + "comment": "Allow to try and submit again in case of error." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "SubmitButton", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SaveConnectedPlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SavePlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score", - "PlayerNameInput.Text()" - ] - } - ] + "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + }, + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "LeaderboardId", - "yes" - ] - } + "type": { + "value": "Leaderboards::HasLastSaveSucceeded" + }, + "parameters": [ + "LeaderboardId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] @@ -24770,11 +26230,11 @@ "objectGroups": [] }, { - "description": "the score.", - "fullName": "Score", + "description": "the leaderboard of the object.", + "fullName": "Leaderboard", "functionType": "ExpressionAndCondition", - "name": "Score", - "sentence": "the score", + "name": "LeaderboardId", + "sentence": "the leaderboard", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -24782,17 +26242,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Score" + "LeaderboardId" ] } ] } ], "expressionType": { - "type": "expression" + "type": "leaderboardId" }, "parameters": [ { @@ -24807,8 +26267,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "Score", - "name": "SetScore", + "getterName": "LeaderboardId", + "name": "SetLeaderboardId", "sentence": "", "events": [ { @@ -24817,24 +26277,13 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyScore" + "value": "SetStringVariable" }, "parameters": [ - "Object", + "LeaderboardId", "=", "Value" ] - }, - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "ScoreLabel", - "Text", - "=", - "\"Score: \" + Score" - ] } ] } @@ -24850,11 +26299,12 @@ "objectGroups": [] }, { - "description": "the default player name.", - "fullName": "Default player name", + "description": "the title of the object.", + "fullName": "Title", "functionType": "ExpressionAndCondition", - "name": "DefaultPlayerName", - "sentence": "the default player name", + "name": "Title", + "private": true, + "sentence": "the title", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -24865,7 +26315,7 @@ "value": "SetReturnString" }, "parameters": [ - "DefaultPlayerName" + "Title.Text::Value()" ] } ] @@ -24887,8 +26337,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "DefaultPlayerName", - "name": "SetDefaultPlayerName", + "getterName": "Title", + "name": "SetTitle", "sentence": "", "events": [ { @@ -24896,300 +26346,1027 @@ "conditions": [], "actions": [ { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyDefaultPlayerName" - }, - "parameters": [ - "Object", - "=", - "Value" - ] + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "String", + "label": "Default player name", + "name": "DefaultPlayerName" + }, + { + "value": "", + "type": "LeaderboardId", + "label": "Leaderboard", + "name": "LeaderboardId" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "Score" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Best score", + "hidden": true, + "name": "BestScore" + }, + { + "value": "Number", + "type": "Choice", + "label": "Format", + "group": "Score format", + "choices": [ + { + "label": "Number", + "value": "Number" + }, + { + "label": "MM:SS.ms", + "value": "MM:SS.ms" + }, + { + "label": "MM:SS", + "value": "MM:SS" + }, + { + "label": "SS.ms", + "value": "SS.ms" + }, + { + "label": "SS", + "value": "SS" + }, + { + "label": "ms", + "value": "ms" + }, + { + "label": "HH:MM:SS.ms", + "value": "HH:MM:SS.ms" + }, + { + "label": "HH:MM:SS", + "value": "HH:MM:SS" + } + ], + "name": "Format" + }, + { + "value": "", + "type": "String", + "label": "Prefix", + "group": "Score format", + "name": "Prefix" + }, + { + "value": "", + "type": "String", + "label": "Suffix", + "group": "Score format", + "name": "Suffix" + }, + { + "value": "3", + "type": "Number", + "label": "Round to decimal point", + "group": "Score format", + "name": "NumberDecimalPoint" + }, + { + "value": "Score: ", + "type": "String", + "label": "Score label", + "name": "ScoreLabelText" + }, + { + "value": "Best: ", + "type": "String", + "label": "Best score label", + "name": "BestScoreLabelText" + } + ], + "variants": [ + { + "areaMaxX": 688, + "areaMaxY": 480, + "areaMaxZ": 48, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Grey and yellow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Score:", + "font": "Roboto-Bold.ttf", + "textAlignment": "", + "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": "Score:", + "font": "Roboto-Bold.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "Roboto-Bold.ttf", + "fontSize": 40, + "inputType": "text", + "textColor": "72;72;79", + "fillColor": "231;232;243", + "fillOpacity": 255, + "borderColor": "255;255;255", + "borderOpacity": 255, + "borderWidth": 6, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "SubmitTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Send" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "RetryTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 128, + "leftMargin": 16, + "name": "Panel", + "rightMargin": 16, + "texture": "assets\\Grey Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - }, + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Game over", + "font": "Chango-Regular.ttf", + "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": "Game over", + "font": "Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::PropertyDefaultPlayerName" - }, - "parameters": [ - "Object", - "!=", - "\"0\"" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [] + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "DefaultPlayerName" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } - ] - } - ], - "parameters": [ + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the player name.", - "fullName": "Player name", - "functionType": "ExpressionAndCondition", - "name": "PlayerName", - "sentence": "the player name", - "events": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BestScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Best:", + "font": "Chango-Regular.ttf", + "textAlignment": "", + "characterSize": 40, + "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": "Best:", + "font": "Chango-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "assetStoreId": "", + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "PlayerNameInput.Text::Value()" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } - ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ + ], + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } } ], - "objectGroups": [] - }, - { - "description": "Check if the restart button of the dialog is clicked.", - "fullName": "Restart button clicked", - "functionType": "Condition", - "name": "IsRestartClicked", - "sentence": "Restart button of _PARAM0_ is clicked", - "events": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Bitmap labels", + "children": [ + { + "objectName": "BitmapTitle" + }, + { + "objectName": "BitmapScoreLabel" + }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + { + "objectName": "Title" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "Medal" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "SubmitTextButton" + }, + { + "objectName": "RetryTextButton" + }, + { + "objectName": "BackTextButton" + }, + { + "objectName": "NextTextButton" + }, + { + "objectName": "Panel" + } + ] + }, + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "ActionTextButton", + "objects": [ { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "RestartButton", - "" - ] - } - ], - "actions": [ + "name": "RetryTextButton" + }, { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] + "name": "BackTextButton" }, { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "NextTextButton" } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the score has been sucessfully submitted by the dialog.", - "fullName": "Score is submitted", - "functionType": "Condition", - "name": "IsScoreSubmitted", - "sentence": "_PARAM0_ submitted a score", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Allow to try and submit again in case of error." }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "Titles", + "objects": [ { - "type": { - "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" - }, - "parameters": [] + "name": "Title" }, { - "type": { - "value": "Leaderboards::HasLastSaveSucceeded" - }, - "parameters": [ - "LeaderboardId" - ] + "name": "BitmapTitle" } - ], - "actions": [ + ] + }, + { + "name": "ScoreLabels", + "objects": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "ScoreLabel" + }, + { + "name": "BitmapScoreLabel" } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the leaderboard id of the object.", - "fullName": "Leaderboard id", - "functionType": "ExpressionAndCondition", - "name": "LeaderboardId", - "sentence": "the leaderboard id", - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "BestScoreLabels", + "objects": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardId" - ] + "name": "BestScoreLabel" + }, + { + "name": "BitmapBestScoreLabel" } ] } ], - "expressionType": { - "type": "leaderboardId" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "LeaderboardId", - "name": "SetLeaderboardId", - "sentence": "", - "events": [ + "layers": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyLeaderboardId" - }, - "parameters": [ - "Object", - "=", - "Value" - ] + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } - ] + ], + "effects": [] } ], - "parameters": [ + "instances": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "angle": 0, + "customSize": false, + "height": 71, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", + "width": 606, + "x": 36, + "y": 41, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 96, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", + "width": 360, + "x": 40, + "y": 160, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RetryTextButton", + "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", + "width": 0, + "x": 224, + "y": 320, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 48, + "height": 106, + "layer": "", + "name": "SubmitTextButton", + "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", + "width": 216, + "x": 432, + "y": 150, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 480, + "layer": "", + "name": "Panel", + "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", + "width": 688, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "String", - "label": "Default player name", - "name": "DefaultPlayerName" - }, - { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "", - "hidden": true, - "name": "Score" - }, - { - "value": "", - "type": "LeaderboardId", - "label": "Leaderboard", - "name": "LeaderboardId" + ] } - ], - "variants": [] + ] } ] } diff --git a/examples/run-dino-run/run-dino-run.json b/examples/run-dino-run/run-dino-run.json index b31b00cac..2175d210f 100644 --- a/examples/run-dino-run/run-dino-run.json +++ b/examples/run-dino-run/run-dino-run.json @@ -1,7 +1,7 @@ { "firstLayout": "Intro", "gdVersion": { - "build": 237, + "build": 241, "major": 5, "minor": 5, "revision": 0 @@ -89,7 +89,6 @@ ], "playableDevices": [ "keyboard", - "mobile", "mobile" ], "extensionProperties": [], @@ -1295,6 +1294,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -1831,6 +1831,7 @@ "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 100, + "lineHeight": 0, "color": "0;0;0" } }, @@ -1886,6 +1887,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 18, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2778,6 +2780,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 30, + "lineHeight": 0, "color": "139;87;42" } }, @@ -7000,7 +7003,7 @@ "persistentUuid": "2a63e8d6-84ec-4acc-a736-db69253545fe", "width": 0, "x": 224, - "y": 64, + "y": 96, "zOrder": 28, "numberProperties": [], "stringProperties": [], @@ -7012,12 +7015,13 @@ "assetStoreId": "", "name": "LeaderboardDialog", "type": "LeaderboardDialog::LeaderboardDialog", - "variant": "", + "variant": "Soil", "variables": [], "effects": [], "behaviors": [], "content": { - "LeaderboardId": "2dfc4fba-1e2b-4e07-b3f3-3ee9839ab0dd" + "LeaderboardId": "2dfc4fba-1e2b-4e07-b3f3-3ee9839ab0dd", + "NumberDecimalPoint": 0 } } ], @@ -7287,31 +7291,367 @@ "author": "", "category": "User interface", "extensionNamespace": "", - "fullName": "", + "fullName": "Leaderboard dialog", "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRyb3BoeSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCAyQzE3LjEgMiAxNiAzIDE2IDRIOEM4IDMgNi45IDIgNiAySDJWMTFDMiAxMiAzIDEzIDQgMTNINi4yQzYuNiAxNSA3LjkgMTYuNyAxMSAxN1YxOS4wOEM4IDE5LjU0IDggMjIgOCAyMkgxNkMxNiAyMiAxNiAxOS41NCAxMyAxOS4wOFYxN0MxNi4xIDE2LjcgMTcuNCAxNSAxNy44IDEzSDIwQzIxIDEzIDIyIDEyIDIyIDExVjJIMThNNiAxMUg0VjRINlYxMU0yMCAxMUgxOFY0SDIwVjExWiIgLz48L3N2Zz4=", "name": "LeaderboardDialog", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/4b89b420c0ed9c540a7f00c5735a31af0db2160679d3fab2170df3681c3ac38c_trophy.svg", - "shortDescription": "", - "version": "", - "description": "", - "tags": [], - "authorIds": [], + "shortDescription": "Display the player score and allow to submit it to a leaderboard.", + "version": "1.0.0", + "description": "Display the player score and allow to submit it to a leaderboard.", + "origin": { + "identifier": "LeaderboardDialog", + "name": "gdevelop-extension-store" + }, + "tags": [ + "" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], "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": [] + }, + { + "description": "Return a formated time for a given timestamp", + "fullName": "Format time", + "functionType": "StringExpression", + "name": "FormatTime", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(Time)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS.ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS.ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(floor(Time * 1000))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"HH:MM:SS.ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"HH:MM:SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Time", + "name": "Time", + "type": "expression" + }, + { + "description": "Format", + "name": "Format", + "supplementaryInformation": "[\"MM:SS.ms\",\"MM:SS\",\"SS\",\"SS.ms\",\"ms\",\"HH:MM:SS.ms\",\"HH:MM:SS\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Formats a number to a string with the specified number of decimal places.", + "fullName": "To fixed", + "functionType": "StringExpression", + "name": "ToFixed", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const valueToBeRounded = eventsFunctionContext.getArgument(\"ValueToBeRounded\");", + "const numberOfDecimalPlaces = eventsFunctionContext.getArgument(\"NumberOfDecimalPlaces\");", + "eventsFunctionContext.returnValue = valueToBeRounded.toFixed(numberOfDecimalPlaces);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "The value to be rounded", + "name": "ValueToBeRounded", + "type": "expression" + }, + { + "description": "Number of decimal places", + "name": "NumberOfDecimalPlaces", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Pad start", + "functionType": "StringExpression", + "name": "PadStart", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const value = eventsFunctionContext.getArgument(\"Value\");", + "const targetLength = eventsFunctionContext.getArgument(\"TargetLength\");", + "const padString = eventsFunctionContext.getArgument(\"PadString\");", + "eventsFunctionContext.returnValue = value.padStart(targetLength, padString);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Text", + "name": "Value", + "type": "string" + }, + { + "description": "Target length", + "name": "TargetLength", + "type": "expression" + }, + { + "description": "Pad string", + "name": "PadString", + "type": "string" + } + ], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [], "eventsBasedObjects": [ { - "areaMaxX": 512, - "areaMaxY": 320, + "areaMaxX": 688, + "areaMaxY": 480, "areaMaxZ": 48, "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, - "defaultName": "", + "defaultName": "LeaderboardDialog", "description": "Displays the player score and allows to submit it to a leaderboard.", "fullName": "Leaderboard dialog", "isInnerAreaFollowingParentSize": true, @@ -7320,61 +7660,143 @@ "objects": [ { "assetStoreId": "", - "name": "RestartButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Orange smooth button", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Score:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "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": "Score:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", "variables": [], "effects": [], "behaviors": [ { "name": "Anchor", "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "rightEdgeAnchor": 4, + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "", + "fontSize": 40, + "inputType": "text", + "textColor": "72;72;79", + "fillColor": "231;232;243", + "fillOpacity": 255, + "borderColor": "255;255;255", + "borderOpacity": 255, + "borderWidth": 6, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "SubmitTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false } ], "content": { - "HoveredFadeOutDuration": 0, - "LabelText": "RETRY" + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Send" }, "childrenContent": { "Hovered": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\RestartButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 }, "Idle": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\RestartButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 }, "Label": { "bold": false, "italic": false, "smoothed": true, "underlined": false, - "string": "RETRY", - "font": "Nathaniel-19.otf", + "string": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "center", - "characterSize": 30, + "characterSize": 40, "color": { - "b": 255, - "g": 255, - "r": 255 + "b": 42, + "g": 87, + "r": 139 }, "content": { "bold": false, @@ -7390,31 +7812,32 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "RETRY", - "font": "Nathaniel-19.otf", + "text": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "center", "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" } }, "Pressed": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\RestartButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 } } }, { - "assetStoreId": "", - "name": "ScoresButton", + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "RetryTextButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Green smooth button", + "variant": "Yellow button 2", "variables": [], "effects": [], "behaviors": [ @@ -7423,50 +7846,55 @@ "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 2, "leftEdgeAnchor": 4, - "rightEdgeAnchor": 4, "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false } ], "content": { - "HoveredFadeOutDuration": 0, - "LabelText": "SCORES" + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" }, "childrenContent": { "Hovered": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 17, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 }, "Idle": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 17, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 }, "Label": { "bold": false, "italic": false, "smoothed": true, "underlined": false, - "string": "SCORES", - "font": "Nathaniel-19.otf", + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "center", - "characterSize": 30, + "characterSize": 40, "color": { - "b": 255, - "g": 255, - "r": 255 + "b": 42, + "g": 87, + "r": 139 }, "content": { "bold": false, @@ -7482,31 +7910,113 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "SCORES", - "font": "Nathaniel-19.otf", + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "center", "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" } }, "Pressed": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 17, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 } } }, { "assetStoreId": "", - "name": "SubmitButton", + "bottomMargin": 32, + "height": 128, + "leftMargin": 16, + "name": "Panel", + "rightMargin": 16, + "texture": "", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Game over", + "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": "Game over", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Green smooth button", + "variant": "Yellow button 2", "variables": [], "effects": [], "behaviors": [ @@ -7515,50 +8025,55 @@ "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 2, "leftEdgeAnchor": 4, - "rightEdgeAnchor": 4, "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false } ], "content": { - "HoveredFadeOutDuration": 0, - "LabelText": "SUBMIT" + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" }, "childrenContent": { "Hovered": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 }, "Idle": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 }, "Label": { "bold": false, "italic": false, "smoothed": true, "underlined": false, - "string": "SUBMIT", - "font": "Nathaniel-19.otf", + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "center", - "characterSize": 30, + "characterSize": 40, "color": { - "b": 255, - "g": 255, - "r": 255 + "b": 42, + "g": 87, + "r": 139 }, "content": { "bold": false, @@ -7574,90 +8089,155 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "SUBMIT", - "font": "Nathaniel-19.otf", + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "center", "verticalTextAlignment": "top", - "characterSize": 30, - "color": "255;255;255" + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" } }, "Pressed": { - "bottomMargin": 11, - "height": 47, - "leftMargin": 20, - "rightMargin": 20, - "texture": "assets\\Buttons\\SubmitButton.png", - "tiled": false, - "topMargin": 11, - "width": 128 + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 } } }, { + "adaptCollisionMaskAutomatically": true, "assetStoreId": "", - "name": "PlayerNameInput", - "type": "TextInput::TextInputObject", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [] + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", "variables": [], "effects": [], "behaviors": [ { "name": "Anchor", "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, + "rightEdgeAnchor": 4, "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false } ], "content": { - "initialValue": "", - "placeholder": "PlayerName", - "fontResourceName": "Nathaniel-19.otf", - "fontSize": 30, - "inputType": "text", - "textColor": "0;0;0", - "fillColor": "245;166;35", - "fillOpacity": 255, - "borderColor": "245;166;35", - "borderOpacity": 255, - "borderWidth": 1, - "readOnly": false, - "disabled": false + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } } }, { "assetStoreId": "", "bold": false, "italic": false, - "name": "ScoreLabel", + "name": "BestScoreLabel", "smoothed": true, "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "string": "Score", - "font": "Nathaniel-19.otf", + "behaviors": [], + "string": "Best:", + "font": "", "textAlignment": "", "characterSize": 40, "color": { - "b": 255, - "g": 255, - "r": 255 + "b": 79, + "g": 72, + "r": 72 }, "content": { "bold": false, @@ -7673,66 +8253,182 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Score", - "font": "Nathaniel-19.otf", + "text": "Best:", + "font": "", "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, - "color": "255;255;255" + "lineHeight": 0, + "color": "72;72;79" } }, { "assetStoreId": "", - "bottomMargin": 64, - "height": 192, - "leftMargin": 64, - "name": "ScorePannel", - "rightMargin": 64, - "texture": "9patch_Desert Tile_all_64.png", - "tiled": true, - "topMargin": 64, - "type": "PanelSpriteObject::PanelSprite", - "width": 192, + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", "variables": [], "effects": [], "behaviors": [ { "name": "Anchor", "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, + "bottomEdgeAnchor": 0, "leftEdgeAnchor": 1, "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, + "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false } - ] - } - ], + ], + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + } + ], "objectsFolderStructure": { "folderName": "__ROOT", "children": [ { - "objectName": "ScorePannel" + "folderName": "Bitmap labels", + "children": [ + { + "objectName": "BitmapTitle" + }, + { + "objectName": "BitmapScoreLabel" + }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + { + "objectName": "Title" }, { "objectName": "ScoreLabel" }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "Medal" + }, { "objectName": "PlayerNameInput" }, { - "objectName": "SubmitButton" + "objectName": "SubmitTextButton" + }, + { + "objectName": "RetryTextButton" + }, + { + "objectName": "BackTextButton" }, { - "objectName": "ScoresButton" + "objectName": "NextTextButton" }, { - "objectName": "RestartButton" + "objectName": "Panel" } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "ActionTextButton", + "objects": [ + { + "name": "RetryTextButton" + }, + { + "name": "BackTextButton" + }, + { + "name": "NextTextButton" + } + ] + }, + { + "name": "Titles", + "objects": [ + { + "name": "Title" + }, + { + "name": "BitmapTitle" + } + ] + }, + { + "name": "ScoreLabels", + "objects": [ + { + "name": "ScoreLabel" + }, + { + "name": "BitmapScoreLabel" + } + ] + }, + { + "name": "BestScoreLabels", + "objects": [ + { + "name": "BestScoreLabel" + }, + { + "name": "BitmapBestScoreLabel" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -7766,29 +8462,14 @@ "instances": [ { "angle": 0, - "customSize": true, - "height": 320, - "layer": "", - "name": "ScorePannel", - "persistentUuid": "77a734d2-d847-4343-972a-471f5e3223d3", - "width": 512, - "x": 0, - "y": 0, - "zOrder": 16, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 35, + "customSize": false, + "height": 71, "layer": "", "name": "ScoreLabel", - "persistentUuid": "da22ceb1-621f-4f75-9541-63e68d15f504", - "width": 384, - "x": 64, - "y": 64, + "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", + "width": 606, + "x": 36, + "y": 41, "zOrder": 18, "numberProperties": [], "stringProperties": [], @@ -7797,13 +8478,14 @@ { "angle": 0, "customSize": true, - "height": 41, + "depth": 1, + "height": 96, "layer": "", "name": "PlayerNameInput", - "persistentUuid": "cce376dc-ab6a-4fd2-8e31-ad28038cd451", - "width": 320, - "x": 96, - "y": 117, + "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", + "width": 360, + "x": 40, + "y": 160, "zOrder": 19, "numberProperties": [], "stringProperties": [], @@ -7814,42 +8496,44 @@ "customSize": false, "height": 0, "layer": "", - "name": "SubmitButton", - "persistentUuid": "7627ff07-0177-47fb-8d4b-1ffce936bf3f", + "name": "RetryTextButton", + "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", "width": 0, - "x": 96, - "y": 192, - "zOrder": 26, + "x": 224, + "y": 320, + "zOrder": 35, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "depth": 48, + "height": 106, "layer": "", - "name": "ScoresButton", - "persistentUuid": "52cde598-c0f5-42e7-be21-28bdfc023938", - "width": 0, - "x": 288, - "y": 192, - "zOrder": 27, + "name": "SubmitTextButton", + "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", + "width": 216, + "x": 432, + "y": 150, + "zOrder": 37, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "depth": 0, + "height": 480, "layer": "", - "name": "RestartButton", - "persistentUuid": "5f42f66e-950b-42ba-b689-68761eeb6816", - "width": 0, - "x": 192, - "y": 256, - "zOrder": 28, + "name": "Panel", + "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", + "width": 688, + "x": 0, + "y": 0, + "zOrder": 1, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -7887,14 +8571,6 @@ "DefaultPlayerName", "" ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] } ] }, @@ -7903,30 +8579,57 @@ "conditions": [ { "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" }, - "parameters": [] + "parameters": [ + "", + "" + ] } ], "actions": [ { "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" + "value": "PlayerAuthentication::DisplayAuthenticationBanner" }, "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" + "" ] - }, + } + ], + "events": [ { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + } ] } ] @@ -7953,84 +8656,11 @@ "conditions": [ { "type": { - "value": "PlayerAuthentication::HasPlayerLoggedIn" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Leaderboards::IsLeaderboardViewErrored" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" }, "parameters": [ - "SubmitButton", + "", "" ] } @@ -8042,7 +8672,7 @@ "conditions": [ { "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" + "value": "PlayerAuthentication::HasPlayerLoggedIn" }, "parameters": [] } @@ -8050,12 +8680,30 @@ "actions": [ { "type": { - "value": "Leaderboards::SaveConnectedPlayerScore" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "", - "LeaderboardId", - "Score" + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + }, + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" ] } ] @@ -8065,8 +8713,7 @@ "conditions": [ { "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" + "value": "Leaderboards::IsLeaderboardViewErrored" }, "parameters": [] } @@ -8074,94 +8721,193 @@ "actions": [ { "type": { - "value": "Leaderboards::SavePlayerScore" + "value": "PlayerAuthentication::DisplayAuthenticationBanner" }, "parameters": [ - "", - "LeaderboardId", - "Score", - "PlayerNameInput.Text()" + "" ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, "parameters": [ + "SubmitTextButton", "" ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score" + ] + } + ] }, { - "type": { - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "LeaderboardId", - "yes" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score", + "PlayerNameInput.Text()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "LeaderboardId", + "yes" + ] + } ] } ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the score.", + "fullName": "Score", + "functionType": "ExpressionAndCondition", + "name": "Score", + "sentence": "the score", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "ScoresButton", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "Leaderboards::DisplayLeaderboard" + "value": "SetReturnNumber" }, "parameters": [ - "", - "\"2dfc4fba-1e2b-4e07-b3f3-3ee9839ab0dd\"", - "yes" + "Score" ] } ] - }, + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Score", + "name": "SetScore", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + "value": "SetNumberVariable" }, - "parameters": [] - } - ], - "actions": [ + "parameters": [ + "Score", + "=", + "Value" + ] + }, { "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "" + "ScoreLabels", + "Text", + "=", + "ScoreLabelText + Object.FormatScore(Value)" ] } ] @@ -8178,11 +8924,11 @@ "objectGroups": [] }, { - "description": "the score.", - "fullName": "Score", + "description": "the best score of the object.", + "fullName": "Best score", "functionType": "ExpressionAndCondition", - "name": "Score", - "sentence": "the score", + "name": "BestScore", + "sentence": "the best score", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -8193,7 +8939,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Score" + "BestScore" ] } ] @@ -8215,8 +8961,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "Score", - "name": "SetScore", + "getterName": "BestScore", + "name": "SetBestScore", "sentence": "", "events": [ { @@ -8225,10 +8971,10 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyScore" + "value": "SetNumberVariable" }, "parameters": [ - "Object", + "BestScore", "=", "Value" ] @@ -8238,21 +8984,98 @@ "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "ScoreLabel", + "BestScoreLabels", "Text", "=", - "\"Score: \" + Score" + "BestScoreLabelText + Object.FormatScore(Value)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the formated score.", + "fullName": "Format score", + "functionType": "StringExpression", + "name": "FormatScore", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"Number\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Prefix + ToString(roundTo(Value, NumberDecimalPoint)) + Suffix" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "!=", + "\"Number\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Prefix + LeaderboardDialog::FormatTime(Value, Format) + Suffix" ] } ] } ], + "expressionType": { + "type": "string" + }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", "type": "object" + }, + { + "description": "Score", + "name": "Value", + "type": "expression" } ], "objectGroups": [] @@ -8305,10 +9128,10 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyDefaultPlayerName" + "value": "SetStringVariable" }, "parameters": [ - "Object", + "DefaultPlayerName", "=", "Value" ] @@ -8327,10 +9150,10 @@ }, { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::PropertyDefaultPlayerName" + "value": "StringVariable" }, "parameters": [ - "Object", + "DefaultPlayerName", "!=", "\"0\"" ] @@ -8411,7 +9234,7 @@ "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, "parameters": [ - "RestartButton", + "RetryTextButton", "" ] } @@ -8447,36 +9270,136 @@ "objectGroups": [] }, { - "description": "Check if the score has been sucessfully submitted by the dialog.", - "fullName": "Score is submitted", + "description": "Check if the next button of the dialog is clicked.", + "fullName": "Next button clicked", "functionType": "Condition", - "name": "IsScoreSubmitted", - "sentence": "_PARAM0_ submitted a score", + "name": "IsNextClicked", + "sentence": "Next button of _PARAM0_ is clicked", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Allow to try and submit again in case of error." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "parameters": [] - }, - { - "type": { - "value": "Leaderboards::HasLastSaveSucceeded" + "parameters": [ + "NextTextButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the back button of the dialog is clicked.", + "fullName": "Back button clicked", + "functionType": "Condition", + "name": "IsBackClicked", + "sentence": "Back button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "BackTextButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the score has been sucessfully submitted by the dialog.", + "fullName": "Score is submitted", + "functionType": "Condition", + "name": "IsScoreSubmitted", + "sentence": "_PARAM0_ submitted a score", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Allow to try and submit again in case of error." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + }, + "parameters": [] + }, + { + "type": { + "value": "Leaderboards::HasLastSaveSucceeded" }, "parameters": [ "LeaderboardId" @@ -8553,10 +9476,81 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyLeaderboardId" + "value": "SetStringVariable" }, "parameters": [ - "Object", + "LeaderboardId", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the title of the object.", + "fullName": "Title", + "functionType": "ExpressionAndCondition", + "name": "Title", + "private": true, + "sentence": "the title", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Title.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Title", + "name": "SetTitle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Title", + "Text", "=", "Value" ] @@ -8566,38 +9560,994 @@ ], "parameters": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "String", + "label": "Default player name", + "name": "DefaultPlayerName" + }, + { + "value": "", + "type": "LeaderboardId", + "label": "Leaderboard", + "name": "LeaderboardId" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "Score" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Best score", + "hidden": true, + "name": "BestScore" + }, + { + "value": "Number", + "type": "Choice", + "label": "Format", + "group": "Score format", + "choices": [ + { + "label": "Number", + "value": "Number" + }, + { + "label": "MM:SS.ms", + "value": "MM:SS.ms" + }, + { + "label": "MM:SS", + "value": "MM:SS" + }, + { + "label": "SS.ms", + "value": "SS.ms" + }, + { + "label": "SS", + "value": "SS" + }, + { + "label": "ms", + "value": "ms" + }, + { + "label": "HH:MM:SS.ms", + "value": "HH:MM:SS.ms" + }, + { + "label": "HH:MM:SS", + "value": "HH:MM:SS" + } + ], + "name": "Format" + }, + { + "value": "", + "type": "String", + "label": "Prefix", + "group": "Score format", + "name": "Prefix" + }, + { + "value": "", + "type": "String", + "label": "Suffix", + "group": "Score format", + "name": "Suffix" + }, + { + "value": "3", + "type": "Number", + "label": "Round to decimal point", + "group": "Score format", + "name": "NumberDecimalPoint" + }, + { + "value": "Score: ", + "type": "String", + "label": "Score label", + "name": "ScoreLabelText" + }, + { + "value": "Best: ", + "type": "String", + "label": "Best score label", + "name": "BestScoreLabelText" + } + ], + "variants": [ + { + "areaMaxX": 512, + "areaMaxY": 320, + "areaMaxZ": 48, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Soil", + "objects": [ + { + "assetStoreId": "", + "name": "RetryTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Orange smooth button", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "rightEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "HoveredFadeOutDuration": 0, + "LabelText": "RETRY" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\RestartButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 + }, + "Idle": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\RestartButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "RETRY", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "RETRY", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" + } + }, + "Pressed": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\RestartButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 + } + } + }, + { + "assetStoreId": "", + "name": "SubmitTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Green smooth button", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "rightEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "HoveredFadeOutDuration": 0, + "LabelText": "SUBMIT" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 + }, + "Idle": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "SUBMIT", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "SUBMIT", + "font": "Nathaniel-19.otf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" + } + }, + "Pressed": { + "bottomMargin": 11, + "height": 47, + "leftMargin": 20, + "rightMargin": 20, + "texture": "assets\\Buttons\\SubmitButton.png", + "tiled": false, + "topMargin": 11, + "width": 128 + } + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "Nathaniel-19.otf", + "fontSize": 30, + "inputType": "text", + "textColor": "0;0;0", + "fillColor": "245;166;35", + "fillOpacity": 255, + "borderColor": "245;166;35", + "borderOpacity": 255, + "borderWidth": 1, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Score", + "font": "Nathaniel-19.otf", + "textAlignment": "", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Score", + "font": "Nathaniel-19.otf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bottomMargin": 64, + "height": 192, + "leftMargin": 64, + "name": "Panel", + "rightMargin": 64, + "texture": "9patch_Desert Tile_all_64.png", + "tiled": true, + "topMargin": 64, + "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": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Game over", + "font": "Chango-Regular.ttf", + "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": "Game over", + "font": "Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [] + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BestScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Best:", + "font": "Chango-Regular.ttf", + "textAlignment": "", + "characterSize": 40, + "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": "Best:", + "font": "Chango-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Panel" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "SubmitTextButton" + }, + { + "objectName": "RetryTextButton" + }, + { + "objectName": "Title" + }, + { + "objectName": "BackTextButton" + }, + { + "objectName": "Medal" + }, + { + "objectName": "NextTextButton" + }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "BitmapTitle" + }, + { + "objectName": "BitmapScoreLabel" + }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + "objectsGroups": [ + { + "name": "ActionTextButton", + "objects": [ + { + "name": "RetryTextButton" + }, + { + "name": "BackTextButton" + }, + { + "name": "NextTextButton" + } + ] + }, + { + "name": "Titles", + "objects": [ + { + "name": "Title" + }, + { + "name": "BitmapTitle" + } + ] + }, + { + "name": "ScoreLabels", + "objects": [ + { + "name": "ScoreLabel" + }, + { + "name": "BitmapScoreLabel" + } + ] + }, + { + "name": "BestScoreLabels", + "objects": [ + { + "name": "BestScoreLabel" + }, + { + "name": "BitmapBestScoreLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "height": 320, + "layer": "", + "name": "Panel", + "persistentUuid": "77a734d2-d847-4343-972a-471f5e3223d3", + "width": 512, + "x": 0, + "y": 0, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 35, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "da22ceb1-621f-4f75-9541-63e68d15f504", + "width": 384, + "x": 64, + "y": 64, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 41, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "cce376dc-ab6a-4fd2-8e31-ad28038cd451", + "width": 320, + "x": 96, + "y": 140, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "SubmitTextButton", + "persistentUuid": "7627ff07-0177-47fb-8d4b-1ffce936bf3f", + "width": 0, + "x": 292, + "y": 220, + "zOrder": 26, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RetryTextButton", + "persistentUuid": "5f42f66e-950b-42ba-b689-68761eeb6816", + "width": 0, + "x": 96, + "y": 220, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "String", - "label": "Default player name", - "name": "DefaultPlayerName" - }, - { - "value": "", - "type": "LeaderboardId", - "label": "Leaderboard", - "name": "LeaderboardId" - }, - { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "", - "hidden": true, - "name": "Score" + ] } - ], - "variants": [] + ] } ] }, @@ -11043,6 +12993,7 @@ "extraInformation": [ "Physics2::Physics2Behavior" ], + "choices": [], "name": "RequiredPhysicsBehavior" }, { @@ -12254,12 +14205,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" @@ -12361,6 +14327,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -13716,8 +15683,11 @@ "value": "", "type": "Choice", "label": "", - "extraInformation": [ - "Label.Text=LabelText" + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + } ], "hidden": true, "name": "_PropertyMapping" @@ -13783,6 +15753,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -14040,6 +16011,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 24, + "lineHeight": 0, "color": "255;255;255" } }, @@ -16471,12 +18443,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" @@ -17015,6 +19002,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -17024,6 +19012,7 @@ "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { @@ -17463,6 +19452,7 @@ "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], + "choices": [], "name": "Animation" }, { @@ -17472,6 +19462,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -18865,6 +20856,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -18874,6 +20866,7 @@ "extraInformation": [ "EffectCapability::EffectBehavior" ], + "choices": [], "name": "Effect" }, { @@ -18918,40 +20911,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" }, @@ -18960,40 +21052,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" }, @@ -19017,10 +21208,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" @@ -19050,10 +21250,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" @@ -20008,6 +22217,7 @@ "extraInformation": [ "ScalableCapability::ScalableBehavior" ], + "choices": [], "name": "Scale" }, { @@ -20017,6 +22227,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -20026,6 +22237,7 @@ "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -20074,40 +22286,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" }, @@ -20116,40 +22427,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" }, @@ -20157,10 +22567,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" @@ -21122,6 +23541,7 @@ "extraInformation": [ "ButtonStates::ButtonFSM" ], + "choices": [], "name": "ButtonFSM" }, { @@ -21131,6 +23551,7 @@ "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "Tween" }, { @@ -21176,40 +23597,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" }, @@ -21218,40 +23738,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" }, @@ -21259,10 +23878,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" diff --git a/examples/tappy-plane/assets/04B_19__.TTF b/examples/tappy-plane/assets/04B_19.ttf similarity index 100% rename from examples/tappy-plane/assets/04B_19__.TTF rename to examples/tappy-plane/assets/04B_19.ttf diff --git a/examples/tappy-plane/tappy-plane.json b/examples/tappy-plane/tappy-plane.json index 62af20767..44b036e4a 100644 --- a/examples/tappy-plane/tappy-plane.json +++ b/examples/tappy-plane/tappy-plane.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 237, + "build": 241, "major": 5, "minor": 5, "revision": 0 @@ -90,7 +90,6 @@ ], "playableDevices": [ "keyboard", - "mobile", "mobile" ], "extensionProperties": [], @@ -104,10 +103,10 @@ "resources": { "resources": [ { - "file": "assets/04B_19__.TTF", + "file": "assets/04B_19.ttf", "kind": "font", "metadata": "", - "name": "04B_19__.TTF", + "name": "04B_19.ttf", "userAdded": true }, { @@ -763,6 +762,7 @@ "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 20, + "lineHeight": 0, "color": "255;255;255" } }, @@ -836,6 +836,7 @@ "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -863,7 +864,7 @@ "effects": [], "behaviors": [], "string": "TAPPY", - "font": "04B_19__.TTF", + "font": "04B_19.ttf", "textAlignment": "center", "characterSize": 70, "color": { @@ -886,10 +887,11 @@ "smoothed": true, "underlined": false, "text": "TAPPY", - "font": "04B_19__.TTF", + "font": "04B_19.ttf", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 70, + "lineHeight": 0, "color": "234;0;49" } } @@ -1480,12 +1482,14 @@ "assetStoreId": "", "name": "LeaderboardDialog", "type": "LeaderboardDialog::LeaderboardDialog", - "variant": "", + "variant": "Yellow and white", "variables": [], "effects": [], "behaviors": [], "content": { - "LeaderboardId": "33ae5fd6-a214-4948-99da-3edd4d363ca3" + "LeaderboardId": "33ae5fd6-a214-4948-99da-3edd4d363ca3", + "NumberDecimalPoint": 0, + "BestScoreLabelText": "Highscore: " } }, { @@ -1925,7 +1929,7 @@ "effects": [], "behaviors": [], "string": "0", - "font": "04B_19__.TTF", + "font": "04B_19.ttf", "textAlignment": "center", "characterSize": 40, "color": { @@ -1948,10 +1952,11 @@ "smoothed": true, "underlined": false, "text": "0", - "font": "04B_19__.TTF", + "font": "04B_19.ttf", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -2136,7 +2141,7 @@ "effects": [], "behaviors": [], "string": "GAME OVER", - "font": "04B_19__.TTF", + "font": "04B_19.ttf", "textAlignment": "left", "characterSize": 70, "color": { @@ -2159,10 +2164,11 @@ "smoothed": true, "underlined": false, "text": "GAME OVER", - "font": "04B_19__.TTF", + "font": "04B_19.ttf", "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 70, + "lineHeight": 0, "color": "177;71;104" } } @@ -3177,10 +3183,48 @@ }, "comment": "A sub event is needed to use the objects from the external layout." }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GroupExists" + }, + "parameters": [ + "\"save\"", + "\"high_score\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ReadNumberFromStorage" + }, + "parameters": [ + "\"save\"", + "\"high_score\"", + "", + "PreviousBestScore" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + }, + "parameters": [ + "LeaderboardDialog", + "=", + "PlayerName", + "" + ] + }, { "type": { "value": "LeaderboardDialog::LeaderboardDialog::SetScore" @@ -3194,15 +3238,76 @@ }, { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + "value": "LeaderboardDialog::LeaderboardDialog::SetBestScore" }, "parameters": [ "LeaderboardDialog", "=", - "PlayerName", + "PreviousBestScore", + "" + ] + }, + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetTitle" + }, + "parameters": [ + "LeaderboardDialog", + "=", + "\"\"", "" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Score", + ">", + "PreviousBestScore" + ] + } + ], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetTitle" + }, + "parameters": [ + "LeaderboardDialog", + "=", + "\"New Highscore!\"", + "" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PreviousBestScore", + "=", + "Score" + ] + }, + { + "type": { + "value": "EcrireFichierExp" + }, + "parameters": [ + "\"save\"", + "\"high_score\"", + "Score" + ] + } + ] + } ] } ] @@ -3421,715 +3526,1747 @@ "author": "", "category": "User interface", "extensionNamespace": "", - "fullName": "", + "fullName": "Leaderboard dialog", "gdevelopVersion": "", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRyb3BoeSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCAyQzE3LjEgMiAxNiAzIDE2IDRIOEM4IDMgNi45IDIgNiAySDJWMTFDMiAxMiAzIDEzIDQgMTNINi4yQzYuNiAxNSA3LjkgMTYuNyAxMSAxN1YxOS4wOEM4IDE5LjU0IDggMjIgOCAyMkgxNkMxNiAyMiAxNiAxOS41NCAxMyAxOS4wOFYxN0MxNi4xIDE2LjcgMTcuNCAxNSAxNy44IDEzSDIwQzIxIDEzIDIyIDEyIDIyIDExVjJIMThNNiAxMUg0VjRINlYxMU0yMCAxMUgxOFY0SDIwVjExWiIgLz48L3N2Zz4=", "name": "LeaderboardDialog", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/4b89b420c0ed9c540a7f00c5735a31af0db2160679d3fab2170df3681c3ac38c_trophy.svg", - "shortDescription": "", - "version": "", - "description": "", - "tags": [], - "authorIds": [], + "shortDescription": "Display the player score and allow to submit it to a leaderboard.", + "version": "1.0.0", + "description": "Display the player score and allow to submit it to a leaderboard.", + "origin": { + "identifier": "LeaderboardDialog", + "name": "gdevelop-extension-store" + }, + "tags": [ + "" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [], - "eventsBasedObjects": [ + "eventsFunctions": [ { - "areaMaxX": 300, - "areaMaxY": 256, - "areaMaxZ": 48, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "defaultName": "", - "description": "Displays the player score and allows to submit it to a leaderboard.", - "fullName": "Leaderboard dialog", - "isInnerAreaFollowingParentSize": true, - "isUsingLegacyInstancesRenderer": false, - "name": "LeaderboardDialog", - "objects": [ + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ { - "assetStoreId": "", - "name": "SubmitButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow blocky button", - "variables": [], - "effects": [], - "behaviors": [ + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Return a formated time for a given timestamp", + "fullName": "Format time", + "functionType": "StringExpression", + "name": "FormatTime", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 0, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(Time)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS.ms\"" + ] } ], - "content": { - "TopPadding": 4, - "LeftPadding": 4, - "RightPadding": 4, - "BottomPadding": 8, - "HoveredFadeOutDuration": 0, - "LabelText": "Submit" - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 - }, - "Idle": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Submit", - "font": "04B_19__.TTF", - "textAlignment": "center", - "characterSize": 15, - "color": { - "b": 255, - "g": 255, - "r": 255 + "actions": [ + { + "type": { + "value": "SetReturnString" }, - "content": { - "bold": false, - "isOutlineEnabled": true, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "0;0;0", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Submit", - "font": "04B_19__.TTF", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 15, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] } - } + ] }, { - "assetStoreId": "", - "name": "PlayerNameInput", - "type": "TextInput::TextInputObject", - "variables": [], - "effects": [], - "behaviors": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS\"" + ] } ], - "content": { - "initialValue": "", - "placeholder": "Touch to start typing", - "fontResourceName": "04B_19__.TTF", - "fontSize": 20, - "inputType": "text", - "textColor": "0;0;0", - "fillColor": "255;255;255", - "fillOpacity": 255, - "borderColor": "0;0;0", - "borderOpacity": 255, - "borderWidth": 1, - "readOnly": false, - "disabled": false - } + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] + } + ] }, { - "assetStoreId": "", - "name": "RestartButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow blocky button", - "variables": [], - "effects": [], - "behaviors": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 0, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS\"" + ] } ], - "content": { - "TopPadding": 4, - "LeftPadding": 4, - "RightPadding": 4, - "BottomPadding": 8, - "HoveredFadeOutDuration": 0, - "LabelText": "Restart" - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 - }, - "Idle": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Restart", - "font": "04B_19__.TTF", - "textAlignment": "center", - "characterSize": 15, - "color": { - "b": 255, - "g": 255, - "r": 255 + "actions": [ + { + "type": { + "value": "SetReturnString" }, - "content": { - "bold": false, - "isOutlineEnabled": true, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "0;0;0", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Restart", - "font": "04B_19__.TTF", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 15, - "color": "255;255;255" - } - }, - "Pressed": { - "bottomMargin": 0, - "height": 40, - "leftMargin": 0, - "rightMargin": 0, - "texture": "assets\\buttonSmall.png", - "tiled": false, - "topMargin": 0, - "width": 68 + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" + ] } - } + ] }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "HighScoreChanged", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "ShakeObject_PositionAngle", - "type": "ShakeObject::ShakeObject_PositionAngle" + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS.ms\"" + ] } ], - "string": "New Highscore!", - "font": "04B_19__.TTF", - "textAlignment": "", - "characterSize": 20, - "color": { - "b": 0, - "g": 0, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "New Highscore!", - "font": "04B_19__.TTF", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 20, - "color": "255;0;0" - } - }, - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "Medal", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ + "actions": [ { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "assets\\medalGold.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" ] } ] }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "ScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"ms\"" + ] } ], - "string": "Score: 0", - "font": "04B_19__.TTF", - "textAlignment": "", - "characterSize": 22, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": true, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "0;0;0", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Score: 0", - "font": "04B_19__.TTF", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 22, - "color": "255;255;255" - } + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(floor(Time * 1000))" + ] + } + ] }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "HighScore", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"HH:MM:SS.ms\"" + ] } ], - "string": "Highscore: 0", - "font": "04B_19__.TTF", - "textAlignment": "", - "characterSize": 22, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": true, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "0;0;0", - "outlineThickness": 2, - "shadowAngle": 90, + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"HH:MM:SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Time", + "name": "Time", + "type": "expression" + }, + { + "description": "Format", + "name": "Format", + "supplementaryInformation": "[\"MM:SS.ms\",\"MM:SS\",\"SS\",\"SS.ms\",\"ms\",\"HH:MM:SS.ms\",\"HH:MM:SS\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Formats a number to a string with the specified number of decimal places.", + "fullName": "To fixed", + "functionType": "StringExpression", + "name": "ToFixed", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const valueToBeRounded = eventsFunctionContext.getArgument(\"ValueToBeRounded\");", + "const numberOfDecimalPlaces = eventsFunctionContext.getArgument(\"NumberOfDecimalPlaces\");", + "eventsFunctionContext.returnValue = valueToBeRounded.toFixed(numberOfDecimalPlaces);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "The value to be rounded", + "name": "ValueToBeRounded", + "type": "expression" + }, + { + "description": "Number of decimal places", + "name": "NumberOfDecimalPlaces", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Pad start", + "functionType": "StringExpression", + "name": "PadStart", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const value = eventsFunctionContext.getArgument(\"Value\");", + "const targetLength = eventsFunctionContext.getArgument(\"TargetLength\");", + "const padString = eventsFunctionContext.getArgument(\"PadString\");", + "eventsFunctionContext.returnValue = value.padStart(targetLength, padString);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Text", + "name": "Value", + "type": "string" + }, + { + "description": "Target length", + "name": "TargetLength", + "type": "expression" + }, + { + "description": "Pad string", + "name": "PadString", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 688, + "areaMaxY": 480, + "areaMaxZ": 48, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "LeaderboardDialog", + "description": "Displays the player score and allows to submit it to a leaderboard.", + "fullName": "Leaderboard dialog", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "LeaderboardDialog", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Score:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "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": "Highscore: 0", - "font": "04B_19__.TTF", + "text": "Score:", + "font": "", "textAlignment": "", "verticalTextAlignment": "top", - "characterSize": 22, - "color": "255;255;255" + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" } }, { "assetStoreId": "", - "bottomMargin": 10, - "height": 32, - "leftMargin": 10, - "name": "GameOverBackground", - "rightMargin": 10, - "texture": "assets\\UIbg.png", - "tiled": true, - "topMargin": 10, - "type": "PanelSpriteObject::PanelSprite", - "width": 32, + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", "variables": [], "effects": [], "behaviors": [ { "name": "Anchor", "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "topEdgeAnchor": 1, + "bottomEdgeAnchor": 0, "leftEdgeAnchor": 1, "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false } - ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "GameOverBackground" - }, - { - "objectName": "Medal" - }, - { - "objectName": "HighScore" - }, - { - "objectName": "ScoreLabel" - }, - { - "objectName": "HighScoreChanged" - }, - { - "objectName": "PlayerNameInput" - }, - { - "objectName": "RestartButton" - }, - { - "objectName": "SubmitButton" + ], + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "", + "fontSize": 40, + "inputType": "text", + "textColor": "72;72;79", + "fillColor": "231;232;243", + "fillOpacity": 255, + "borderColor": "255;255;255", + "borderOpacity": 255, + "borderWidth": 6, + "readOnly": false, + "disabled": false } - ] - }, - "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": [ + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "SubmitTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "effects": [] - } - ], - "instances": [ - { - "angle": 0, - "customSize": true, - "height": 256, - "layer": "", - "name": "GameOverBackground", - "persistentUuid": "03fc6fee-1fae-442a-b01b-60c427ea3ff7", - "width": 300, - "x": 0, - "y": 0, - "zOrder": 0, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 24, - "layer": "", - "name": "HighScore", - "persistentUuid": "5e642467-3a13-4ee5-b78d-a527b3d2408f", - "width": 162, - "x": 135, - "y": 26, - "zOrder": 6, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 27, - "layer": "", - "name": "ScoreLabel", - "persistentUuid": "75cf5a86-ba1b-46ac-80ee-a9bec1727479", - "width": 161, - "x": 135, - "y": 63, - "zOrder": 7, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 60, - "layer": "", - "name": "Medal", - "persistentUuid": "771fefe5-b035-4ded-93c7-b93c07dfdbaa", - "width": 57, - "x": 15, - "y": 15, - "zOrder": 10, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Send" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "RetryTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 128, + "leftMargin": 16, + "name": "Panel", + "rightMargin": 16, + "texture": "", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Game over", + "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": "Game over", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [] + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BestScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Best:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "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": "Best:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Bitmap labels", + "children": [ + { + "objectName": "BitmapTitle" + }, + { + "objectName": "BitmapScoreLabel" + }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + { + "objectName": "Title" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "Medal" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "SubmitTextButton" + }, + { + "objectName": "RetryTextButton" + }, + { + "objectName": "BackTextButton" + }, + { + "objectName": "NextTextButton" + }, + { + "objectName": "Panel" + } + ] + }, + "objectsGroups": [ + { + "name": "ActionTextButton", + "objects": [ + { + "name": "RetryTextButton" + }, + { + "name": "BackTextButton" + }, + { + "name": "NextTextButton" + } + ] + }, + { + "name": "Titles", + "objects": [ + { + "name": "Title" + }, + { + "name": "BitmapTitle" + } + ] + }, + { + "name": "ScoreLabels", + "objects": [ + { + "name": "ScoreLabel" + }, + { + "name": "BitmapScoreLabel" + } + ] + }, + { + "name": "BestScoreLabels", + "objects": [ + { + "name": "BestScoreLabel" + }, + { + "name": "BitmapBestScoreLabel" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 71, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", + "width": 606, + "x": 36, + "y": 41, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 96, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", + "width": 360, + "x": 40, + "y": 160, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RetryTextButton", + "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", + "width": 0, + "x": 224, + "y": 320, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 48, + "height": 106, + "layer": "", + "name": "SubmitTextButton", + "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", + "width": 216, + "x": 432, + "y": 150, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 480, + "layer": "", + "name": "Panel", + "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", + "width": 688, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetScore" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + }, + "parameters": [ + "Object", + "=", + "DefaultPlayerName", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::HasPlayerLoggedIn" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + }, + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::IsLeaderboardViewErrored" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "SubmitTextButton", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score", + "PlayerNameInput.Text()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "LeaderboardId", + "yes" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 20, - "layer": "", - "name": "HighScoreChanged", - "persistentUuid": "1f108654-2a5b-4d13-879b-5865dd45d792", - "width": 161, - "x": 135, - "y": 100, - "zOrder": 13, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "description": "the score.", + "fullName": "Score", + "functionType": "ExpressionAndCondition", + "name": "Score", + "sentence": "the score", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Score" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "RestartButton", - "persistentUuid": "5c42ce36-97f5-4c77-8e1b-6562b86407b4", - "width": 0, - "x": 25, - "y": 202, - "zOrder": 25, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Score", + "name": "SetScore", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Score", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "ScoreLabels", + "Text", + "=", + "ScoreLabelText + Object.FormatScore(Value)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "angle": 0, - "customSize": true, - "height": 30, - "layer": "", - "name": "PlayerNameInput", - "persistentUuid": "56f0bab1-1656-4999-85c4-9e24cfac73bc", - "width": 250, - "x": 25, - "y": 150, - "zOrder": 24, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "description": "the best score of the object.", + "fullName": "Best score", + "functionType": "ExpressionAndCondition", + "name": "BestScore", + "sentence": "the best score", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "BestScore" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "BestScore", + "name": "SetBestScore", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BestScore", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "BestScoreLabels", + "Text", + "=", + "BestScoreLabelText + Object.FormatScore(Value)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "SubmitButton", - "persistentUuid": "65924bc8-c391-4021-95a0-912fac6a4866", - "width": 0, - "x": 207, - "y": 202, - "zOrder": 26, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - } - ], - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "onCreated", + "description": "Return the formated score.", + "fullName": "Format score", + "functionType": "StringExpression", + "name": "FormatScore", + "private": true, "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + "value": "StringVariable" }, "parameters": [ - "Object", + "Format", "=", - "DefaultPlayerName", - "" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" + "\"Number\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "Cache" + "value": "SetReturnString" }, "parameters": [ - "HighScoreChanged" + "Prefix + ToString(roundTo(Value, NumberDecimalPoint)) + Suffix" ] } ] @@ -4139,35 +5276,70 @@ "conditions": [ { "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" + "value": "StringVariable" }, - "parameters": [] + "parameters": [ + "Format", + "!=", + "\"Number\"" + ] } ], "actions": [ { "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" + "value": "SetReturnString" }, "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" + "Prefix + LeaderboardDialog::FormatTime(Value, Format) + Suffix" ] - }, + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + }, + { + "description": "Score", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the default player name.", + "fullName": "Default player name", + "functionType": "ExpressionAndCondition", + "name": "DefaultPlayerName", + "sentence": "the default player name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "TextInput::TextInputObject::SetDisabled" + "value": "SetReturnString" }, "parameters": [ - "PlayerNameInput", - "yes" + "DefaultPlayerName" ] } ] } ], + "expressionType": { + "type": "string" + }, "parameters": [ { "description": "Object", @@ -4180,47 +5352,23 @@ }, { "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", + "functionType": "ActionWithOperator", + "getterName": "DefaultPlayerName", + "name": "SetDefaultPlayerName", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::HasPlayerLoggedIn" - }, - "parameters": [] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" + "value": "SetStringVariable" }, "parameters": [ - "PlayerNameInput", - "Text", + "DefaultPlayerName", "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" + "Value" ] } ] @@ -4230,119 +5378,117 @@ "conditions": [ { "type": { - "value": "Leaderboards::IsLeaderboardViewErrored" + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" }, "parameters": [] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "DefaultPlayerName", + "!=", + "\"0\"" + ] } ], "actions": [ { "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "" + "PlayerNameInput", + "Text", + "=", + "DefaultPlayerName" ] } ] - }, + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." - }, + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the player name.", + "fullName": "Player name", + "functionType": "ExpressionAndCondition", + "name": "PlayerName", + "sentence": "the player name", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "SetReturnString" }, "parameters": [ - "SubmitButton", - "" + "PlayerNameInput.Text::Value()" ] } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SaveConnectedPlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score" - ] - } - ] - }, + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the restart button of the dialog is clicked.", + "fullName": "Restart button clicked", + "functionType": "Condition", + "name": "IsRestartClicked", + "sentence": "Restart button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SavePlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score", - "PlayerNameInput.Text()" - ] - } + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "RetryTextButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "LeaderboardId", - "yes" - ] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] @@ -4359,30 +5505,45 @@ "objectGroups": [] }, { - "description": "the score.", - "fullName": "Score", - "functionType": "ExpressionAndCondition", - "name": "Score", - "sentence": "the score", + "description": "Check if the next button of the dialog is clicked.", + "fullName": "Next button clicked", + "functionType": "Condition", + "name": "IsNextClicked", + "sentence": "Next button of _PARAM0_ is clicked", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "NextTextButton", + "" + ] + } + ], "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "PlayerAuthentication::HideAuthenticationBanner" }, "parameters": [ - "Score" + "" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -4394,39 +5555,62 @@ "objectGroups": [] }, { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "Score", - "name": "SetScore", - "sentence": "", + "description": "Check if the back button of the dialog is clicked.", + "fullName": "Back button clicked", + "functionType": "Condition", + "name": "IsBackClicked", + "sentence": "Back button of _PARAM0_ is clicked", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "BackTextButton", + "" + ] + } + ], "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyScore" + "value": "PlayerAuthentication::HideAuthenticationBanner" }, "parameters": [ - "Object", - "=", - "Value" + "" ] }, { "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" + "value": "SetReturnBoolean" }, "parameters": [ - "ScoreLabel", - "Text", - "=", - "\"Score: \" + Score" + "True" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the score has been sucessfully submitted by the dialog.", + "fullName": "Score is submitted", + "functionType": "Condition", + "name": "IsScoreSubmitted", + "sentence": "_PARAM0_ submitted a score", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -4437,106 +5621,103 @@ "textG": 0, "textR": 0 }, - "comment": "Read the previous best score from the storage" + "comment": "Allow to try and submit again in case of error." }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GroupExists" - }, - "parameters": [ - "\"save\"", - "\"high_score\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ReadNumberFromStorage" - }, - "parameters": [ - "\"save\"", - "\"high_score\"", - "", - "PreviousBestScore" - ] - }, - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "HighScore", - "Text", - "=", - "\"Best: \" + PreviousBestScore" - ] - } - ] - }, + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" }, - "comment": "Check if this is a new best score" + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::Score" - }, - "parameters": [ - "Object", - ">=", - "PreviousBestScore", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "EcrireFichierExp" - }, - "parameters": [ - "\"save\"", - "\"high_score\"", - "Score" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "HighScoreChanged", - "" - ] - } + "type": { + "value": "Leaderboards::HasLastSaveSucceeded" + }, + "parameters": [ + "LeaderboardId" ] } ], - "variables": [ + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the leaderboard of the object.", + "fullName": "Leaderboard", + "functionType": "ExpressionAndCondition", + "name": "LeaderboardId", + "sentence": "the leaderboard", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardId" + ] + } + ] + } + ], + "expressionType": { + "type": "leaderboardId" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LeaderboardId", + "name": "SetLeaderboardId", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "PreviousBestScore", - "type": "number", - "value": 0 + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LeaderboardId", + "=", + "Value" + ] } ] } @@ -4552,11 +5733,12 @@ "objectGroups": [] }, { - "description": "the default player name.", - "fullName": "Default player name", + "description": "the title of the object.", + "fullName": "Title", "functionType": "ExpressionAndCondition", - "name": "DefaultPlayerName", - "sentence": "the default player name", + "name": "Title", + "private": true, + "sentence": "the title", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -4567,7 +5749,7 @@ "value": "SetReturnString" }, "parameters": [ - "DefaultPlayerName" + "Title.Text::Value()" ] } ] @@ -4589,8 +5771,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "DefaultPlayerName", - "name": "SetDefaultPlayerName", + "getterName": "Title", + "name": "SetTitle", "sentence": "", "events": [ { @@ -4599,299 +5781,1094 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyDefaultPlayerName" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Object", + "Title", + "Text", "=", "Value" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "String", + "label": "Default player name", + "name": "DefaultPlayerName" + }, + { + "value": "", + "type": "LeaderboardId", + "label": "Leaderboard", + "name": "LeaderboardId" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "Score" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Best score", + "hidden": true, + "name": "BestScore" + }, + { + "value": "Number", + "type": "Choice", + "label": "Format", + "group": "Score format", + "choices": [ + { + "label": "Number", + "value": "Number" + }, + { + "label": "MM:SS.ms", + "value": "MM:SS.ms" + }, + { + "label": "MM:SS", + "value": "MM:SS" + }, + { + "label": "SS.ms", + "value": "SS.ms" + }, + { + "label": "SS", + "value": "SS" + }, + { + "label": "ms", + "value": "ms" + }, + { + "label": "HH:MM:SS.ms", + "value": "HH:MM:SS.ms" + }, + { + "label": "HH:MM:SS", + "value": "HH:MM:SS" + } + ], + "name": "Format" + }, + { + "value": "", + "type": "String", + "label": "Prefix", + "group": "Score format", + "name": "Prefix" + }, + { + "value": "", + "type": "String", + "label": "Suffix", + "group": "Score format", + "name": "Suffix" + }, + { + "value": "3", + "type": "Number", + "label": "Round to decimal point", + "group": "Score format", + "name": "NumberDecimalPoint" + }, + { + "value": "Score: ", + "type": "String", + "label": "Score label", + "name": "ScoreLabelText" + }, + { + "value": "Best: ", + "type": "String", + "label": "Best score label", + "name": "BestScoreLabelText" + } + ], + "variants": [ + { + "areaMaxX": 300, + "areaMaxY": 256, + "areaMaxZ": 48, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Yellow and white", + "objects": [ + { + "assetStoreId": "", + "name": "SubmitTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow blocky button", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "TopPadding": 4, + "LeftPadding": 4, + "RightPadding": 4, + "BottomPadding": 8, + "HoveredFadeOutDuration": 0, + "LabelText": "Submit" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 + }, + "Idle": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Submit", + "font": "04B_19__.TTF", + "textAlignment": "center", + "characterSize": 15, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Submit", + "font": "04B_19__.TTF", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 15, + "lineHeight": 0, + "color": "255;255;255" + } + }, + "Pressed": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 + } + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "initialValue": "", + "placeholder": "Touch to start typing", + "fontResourceName": "04B_19.ttf", + "fontSize": 20, + "inputType": "text", + "textColor": "0;0;0", + "fillColor": "255;255;255", + "fillOpacity": 255, + "borderColor": "0;0;0", + "borderOpacity": 255, + "borderWidth": 1, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "", + "name": "RetryTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow blocky button", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "TopPadding": 4, + "LeftPadding": 4, + "RightPadding": 4, + "BottomPadding": 8, + "HoveredFadeOutDuration": 0, + "LabelText": "Restart" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 + }, + "Idle": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "04B_19__.TTF", + "textAlignment": "center", + "characterSize": 15, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "04B_19__.TTF", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 15, + "lineHeight": 0, + "color": "255;255;255" + } + }, + "Pressed": { + "bottomMargin": 0, + "height": 40, + "leftMargin": 0, + "rightMargin": 0, + "texture": "assets\\buttonSmall.png", + "tiled": false, + "topMargin": 0, + "width": 68 + } + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "New Highscore!", + "font": "04B_19.ttf", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "New Highscore!", + "font": "04B_19.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 20, + "lineHeight": 0, + "color": "255;0;0" + } + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\medalGold.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Score: 0", + "font": "04B_19.ttf", + "textAlignment": "", + "characterSize": 22, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Score: 0", + "font": "04B_19.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 22, + "lineHeight": 0, + "color": "255;255;255" + } }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - }, + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::PropertyDefaultPlayerName" - }, - "parameters": [ - "Object", - "!=", - "\"0\"" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "DefaultPlayerName" - ] + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the player name.", - "fullName": "Player name", - "functionType": "ExpressionAndCondition", - "name": "PlayerName", - "sentence": "the player name", - "events": [ + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "assetStoreId": "", + "bottomMargin": 10, + "height": 32, + "leftMargin": 10, + "name": "Panel", + "rightMargin": 10, + "texture": "assets\\UIbg.png", + "tiled": true, + "topMargin": 10, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "PlayerNameInput.Text::Value()" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "topEdgeAnchor": 1, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false } ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the restart button of the dialog is clicked.", - "fullName": "Restart button clicked", - "functionType": "Condition", - "name": "IsRestartClicked", - "sentence": "Restart button of _PARAM0_ is clicked", - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "RestartButton", - "" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "139;87;42" + } }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BestScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Highscore: 0", + "font": "04B_19.ttf", + "textAlignment": "", + "characterSize": 22, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Highscore: 0", + "font": "04B_19.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 22, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } - ] - } - ], - "parameters": [ + ], + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } } ], - "objectGroups": [] - }, - { - "description": "Check if the score has been sucessfully submitted by the dialog.", - "fullName": "Score is submitted", - "functionType": "Condition", - "name": "IsScoreSubmitted", - "sentence": "_PARAM0_ submitted a score", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Panel" + }, + { + "objectName": "Medal" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "Title" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "RetryTextButton" + }, + { + "objectName": "SubmitTextButton" }, - "comment": "Allow to try and submit again in case of error." - }, + { + "objectName": "BackTextButton" + }, + { + "objectName": "NextTextButton" + }, + { + "objectName": "BitmapTitle" + }, + { + "objectName": "BitmapScoreLabel" + }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "ActionTextButton", + "objects": [ { - "type": { - "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" - }, - "parameters": [] + "name": "RetryTextButton" }, { - "type": { - "value": "Leaderboards::HasLastSaveSucceeded" - }, - "parameters": [ - "LeaderboardId" - ] - } - ], - "actions": [ + "name": "BackTextButton" + }, { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "NextTextButton" } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the leaderboard of the object.", - "fullName": "Leaderboard", - "functionType": "ExpressionAndCondition", - "name": "LeaderboardId", - "sentence": "the leaderboard", - "events": [ + "name": "Titles", + "objects": [ + { + "name": "Title" + }, + { + "name": "BitmapTitle" + } + ] + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "ScoreLabels", + "objects": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardId" - ] + "name": "ScoreLabel" + }, + { + "name": "BitmapScoreLabel" } ] - } - ], - "expressionType": { - "type": "leaderboardId" - }, - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "name": "BestScoreLabels", + "objects": [ + { + "name": "BestScoreLabel" + }, + { + "name": "BitmapBestScoreLabel" + } + ] } ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "LeaderboardId", - "name": "SetLeaderboardId", - "sentence": "", - "events": [ + "layers": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyLeaderboardId" - }, - "parameters": [ - "Object", - "=", - "Value" - ] + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } - ] + ], + "effects": [] } ], - "parameters": [ + "instances": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "angle": 0, + "customSize": true, + "height": 256, + "layer": "", + "name": "Panel", + "persistentUuid": "03fc6fee-1fae-442a-b01b-60c427ea3ff7", + "width": 300, + "x": 0, + "y": 0, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 27, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "75cf5a86-ba1b-46ac-80ee-a9bec1727479", + "width": 161, + "x": 135, + "y": 63, + "zOrder": 7, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 60, + "layer": "", + "name": "Medal", + "persistentUuid": "771fefe5-b035-4ded-93c7-b93c07dfdbaa", + "width": 57, + "x": 15, + "y": 15, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 20, + "layer": "", + "name": "Title", + "persistentUuid": "1f108654-2a5b-4d13-879b-5865dd45d792", + "width": 161, + "x": 135, + "y": 100, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RetryTextButton", + "persistentUuid": "5c42ce36-97f5-4c77-8e1b-6562b86407b4", + "width": 0, + "x": 25, + "y": 202, + "zOrder": 25, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 30, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "56f0bab1-1656-4999-85c4-9e24cfac73bc", + "width": 250, + "x": 25, + "y": 150, + "zOrder": 24, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "SubmitTextButton", + "persistentUuid": "65924bc8-c391-4021-95a0-912fac6a4866", + "width": 0, + "x": 207, + "y": 202, + "zOrder": 26, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "BestScoreLabel", + "persistentUuid": "7c5049aa-0154-4ef8-8b80-3acddd136641", + "width": 0, + "x": 135, + "y": 26, + "zOrder": 27, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "String", - "label": "Default player name", - "name": "DefaultPlayerName" - }, - { - "value": "", - "type": "LeaderboardId", - "label": "Leaderboard", - "name": "LeaderboardId" - }, - { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "", - "hidden": true, - "name": "Score" + ] } - ], - "variants": [] + ] } ] }, @@ -7457,12 +9434,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" @@ -7564,6 +9556,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -8919,8 +10912,11 @@ "value": "", "type": "Choice", "label": "", - "extraInformation": [ - "Label.Text=LabelText" + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + } ], "hidden": true, "name": "_PropertyMapping" @@ -8959,7 +10955,7 @@ } ], "string": "Text", - "font": "04B_19__.TTF", + "font": "04B_19.ttf", "textAlignment": "center", "characterSize": 40, "color": { @@ -8982,10 +10978,11 @@ "smoothed": true, "underlined": false, "text": "Text", - "font": "04B_19__.TTF", + "font": "04B_19.ttf", "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 40, + "lineHeight": 0, "color": "255;255;255" } }, @@ -9216,7 +11213,7 @@ } ], "string": "Text", - "font": "04B_19__.TTF", + "font": "04B_19.ttf", "textAlignment": "center", "characterSize": 15, "color": { @@ -9239,10 +11236,11 @@ "smoothed": true, "underlined": false, "text": "Text", - "font": "04B_19__.TTF", + "font": "04B_19.ttf", "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 15, + "lineHeight": 0, "color": "255;255;255" } }, @@ -16058,6 +18056,7 @@ "extraInformation": [ "Tween::TweenBehavior" ], + "choices": [], "name": "TweenBehavior" }, {