From b441abd2453cd9ff806aab8aed4b4c6c6143778f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 13 Sep 2025 19:11:11 +0200 Subject: [PATCH 1/6] [Review] [Leaderboard dialog] Displays the player score and allows to submit it to a leaderboard --- extensions/reviewed/LeaderboardDialog.json | 2286 ++++++++++++++++++++ 1 file changed, 2286 insertions(+) create mode 100644 extensions/reviewed/LeaderboardDialog.json diff --git a/extensions/reviewed/LeaderboardDialog.json b/extensions/reviewed/LeaderboardDialog.json new file mode 100644 index 000000000..0c2703995 --- /dev/null +++ b/extensions/reviewed/LeaderboardDialog.json @@ -0,0 +1,2286 @@ +{ + "author": "", + "category": "User interface", + "extensionNamespace": "", + "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": "Displays the player score and allows to submit it to a leaderboard.", + "version": "1.0.0", + "description": "Displays the player score and allows to submit it to a leaderboard.", + "tags": [], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Return that formated date for a given timestamp", + "fullName": "Format date", + "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": 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": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_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": "Score:", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_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": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_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": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_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": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_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": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_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": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_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": [ + { + "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": [] + }, + { + "fullName": "Format score", + "functionType": "StringExpression", + "name": "FormatScore", + "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": "ActionWithOperator", + "getterName": "DefaultPlayerName", + "name": "SetDefaultPlayerName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "DefaultPlayerName", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "DefaultPlayerName", + "!=", + "\"0\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "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": "SetReturnString" + }, + "parameters": [ + "PlayerNameInput.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the restart button of the dialog is clicked.", + "fullName": "Restart button clicked", + "functionType": "Condition", + "name": "IsRestartClicked", + "sentence": "Restart button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "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", + "" + ] + } + ], + "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" + ] + } + ], + "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": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "LeaderboardId", + "=", + "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", + "extraInformation": [ + "Number", + "MM:SS.ms", + "MM:SS", + "SS.ms", + "SS", + "ms", + "HH:MM:SS.ms", + "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" + } + ] + } + ] +} \ No newline at end of file From ca89dc46a1f3cb0bdd9942032729c32d930d7342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 20 Sep 2025 12:43:20 +0200 Subject: [PATCH 2/6] Fix resources names --- extensions/reviewed/LeaderboardDialog.json | 56 +++++++++++++++------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/extensions/reviewed/LeaderboardDialog.json b/extensions/reviewed/LeaderboardDialog.json index 0c2703995..0962b5fd5 100644 --- a/extensions/reviewed/LeaderboardDialog.json +++ b/extensions/reviewed/LeaderboardDialog.json @@ -375,7 +375,7 @@ "effects": [], "behaviors": [], "string": "Score:", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "font": "Chango-Regular.ttf", "textAlignment": "", "characterSize": 40, "color": { @@ -398,7 +398,7 @@ "smoothed": true, "underlined": false, "text": "Score:", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "font": "Chango-Regular.ttf", "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, @@ -427,7 +427,7 @@ "content": { "initialValue": "", "placeholder": "PlayerName", - "fontResourceName": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "fontResourceName": "Chango-Regular.ttf", "fontSize": 40, "inputType": "text", "textColor": "72;72;79", @@ -686,7 +686,7 @@ } ], "string": "Game over", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "font": "Chango-Regular.ttf", "textAlignment": "center", "characterSize": 60, "color": { @@ -709,7 +709,7 @@ "smoothed": true, "underlined": false, "text": "Game over", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "font": "Chango-Regular.ttf", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 60, @@ -936,7 +936,7 @@ "effects": [], "behaviors": [], "string": "Best:", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "font": "Chango-Regular.ttf", "textAlignment": "", "characterSize": 40, "color": { @@ -959,7 +959,7 @@ "smoothed": true, "underlined": false, "text": "Best:", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "font": "Chango-Regular.ttf", "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, @@ -2235,15 +2235,39 @@ "type": "Choice", "label": "Format", "group": "Score format", - "extraInformation": [ - "Number", - "MM:SS.ms", - "MM:SS", - "SS.ms", - "SS", - "ms", - "HH:MM:SS.ms", - "HH:MM:SS" + "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" }, From 6ae19238052d8ac4a841b46aa725669b4a177869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 20 Sep 2025 19:00:53 +0200 Subject: [PATCH 3/6] Add a setter for the title --- extensions/reviewed/LeaderboardDialog.json | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/extensions/reviewed/LeaderboardDialog.json b/extensions/reviewed/LeaderboardDialog.json index 0962b5fd5..005f4dc63 100644 --- a/extensions/reviewed/LeaderboardDialog.json +++ b/extensions/reviewed/LeaderboardDialog.json @@ -2199,6 +2199,77 @@ } ], "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" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ From 272655832cf2202e6e9ef10ee941e77451374ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 20 Sep 2025 19:05:46 +0200 Subject: [PATCH 4/6] Clear resources properties --- extensions/reviewed/LeaderboardDialog.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions/reviewed/LeaderboardDialog.json b/extensions/reviewed/LeaderboardDialog.json index 005f4dc63..d94740d1e 100644 --- a/extensions/reviewed/LeaderboardDialog.json +++ b/extensions/reviewed/LeaderboardDialog.json @@ -375,7 +375,7 @@ "effects": [], "behaviors": [], "string": "Score:", - "font": "Chango-Regular.ttf", + "font": "", "textAlignment": "", "characterSize": 40, "color": { @@ -398,7 +398,7 @@ "smoothed": true, "underlined": false, "text": "Score:", - "font": "Chango-Regular.ttf", + "font": "", "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, @@ -427,7 +427,7 @@ "content": { "initialValue": "", "placeholder": "PlayerName", - "fontResourceName": "Chango-Regular.ttf", + "fontResourceName": "", "fontSize": 40, "inputType": "text", "textColor": "72;72;79", @@ -643,7 +643,7 @@ "leftMargin": 16, "name": "Panel", "rightMargin": 16, - "texture": "assets\\Grey Button_Idle.png", + "texture": "", "tiled": false, "topMargin": 16, "type": "PanelSpriteObject::PanelSprite", @@ -686,7 +686,7 @@ } ], "string": "Game over", - "font": "Chango-Regular.ttf", + "font": "", "textAlignment": "center", "characterSize": 60, "color": { @@ -709,7 +709,7 @@ "smoothed": true, "underlined": false, "text": "Game over", - "font": "Chango-Regular.ttf", + "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 60, @@ -936,7 +936,7 @@ "effects": [], "behaviors": [], "string": "Best:", - "font": "Chango-Regular.ttf", + "font": "", "textAlignment": "", "characterSize": 40, "color": { @@ -959,7 +959,7 @@ "smoothed": true, "underlined": false, "text": "Best:", - "font": "Chango-Regular.ttf", + "font": "", "textAlignment": "", "verticalTextAlignment": "top", "characterSize": 40, From d8d9410657a2bbb3a3543f5730230b47a2fa39e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 20 Sep 2025 19:09:51 +0200 Subject: [PATCH 5/6] Typo --- extensions/reviewed/LeaderboardDialog.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/reviewed/LeaderboardDialog.json b/extensions/reviewed/LeaderboardDialog.json index d94740d1e..724eb79b0 100644 --- a/extensions/reviewed/LeaderboardDialog.json +++ b/extensions/reviewed/LeaderboardDialog.json @@ -42,8 +42,8 @@ "objectGroups": [] }, { - "description": "Return that formated date for a given timestamp", - "fullName": "Format date", + "description": "Return a formated time for a given timestamp", + "fullName": "Format time", "functionType": "StringExpression", "name": "FormatTime", "private": true, @@ -1709,9 +1709,11 @@ "objectGroups": [] }, { + "description": "Return the formated score.", "fullName": "Format score", "functionType": "StringExpression", "name": "FormatScore", + "private": true, "sentence": "", "events": [ { From 465505139d5c9b2da90003a566c7722449ae7e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 20 Sep 2025 19:11:35 +0200 Subject: [PATCH 6/6] Typo 2 --- extensions/reviewed/LeaderboardDialog.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/reviewed/LeaderboardDialog.json b/extensions/reviewed/LeaderboardDialog.json index 724eb79b0..6ae3e4df0 100644 --- a/extensions/reviewed/LeaderboardDialog.json +++ b/extensions/reviewed/LeaderboardDialog.json @@ -8,9 +8,9 @@ "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRyb3BoeSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCAyQzE3LjEgMiAxNiAzIDE2IDRIOEM4IDMgNi45IDIgNiAySDJWMTFDMiAxMiAzIDEzIDQgMTNINi4yQzYuNiAxNSA3LjkgMTYuNyAxMSAxN1YxOS4wOEM4IDE5LjU0IDggMjIgOCAyMkgxNkMxNiAyMiAxNiAxOS41NCAxMyAxOS4wOFYxN0MxNi4xIDE2LjcgMTcuNCAxNSAxNy44IDEzSDIwQzIxIDEzIDIyIDEyIDIyIDExVjJIMThNNiAxMUg0VjRINlYxMU0yMCAxMUgxOFY0SDIwVjExWiIgLz48L3N2Zz4=", "name": "LeaderboardDialog", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/4b89b420c0ed9c540a7f00c5735a31af0db2160679d3fab2170df3681c3ac38c_trophy.svg", - "shortDescription": "Displays the player score and allows to submit it to a leaderboard.", + "shortDescription": "Display the player score and allow to submit it to a leaderboard.", "version": "1.0.0", - "description": "Displays the player score and allows to submit it to a leaderboard.", + "description": "Display the player score and allow to submit it to a leaderboard.", "tags": [], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2"