From 5aa6a151b1bb37059c3974ba19eda465d02087e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Tue, 2 Jun 2026 12:10:22 +0200 Subject: [PATCH] [Clicker starter] Fix other variant with unused broken resources --- .../starting-clicker/starting-clicker.json | 2542 ++++++++++++++--- 1 file changed, 2121 insertions(+), 421 deletions(-) diff --git a/examples/starting-clicker/starting-clicker.json b/examples/starting-clicker/starting-clicker.json index f3de56b0f..f664b918f 100644 --- a/examples/starting-clicker/starting-clicker.json +++ b/examples/starting-clicker/starting-clicker.json @@ -406,6 +406,7 @@ { "assetStoreId": "6a16d25e5a4b7e16b72187c4cab1164e2e8fba46d78b9af0132f10301b4224e9", "name": "PurchasePassive_Button1_Bar", + "persistentUuid": "23c61626-6ca7-4c4a-9ccc-f1f93885d69f", "type": "PanelSpriteContinuousBar::PanelSpriteContinuousBar", "variant": "Progressbar", "variables": [], @@ -426,6 +427,7 @@ { "assetStoreId": "d071c8baaa781a445ba1c3742b300714155d61cfc7423a04ae29c282014dcee7", "name": "MoneyCounter", + "persistentUuid": "bc5effe3-3633-4b2e-ab04-1a6c45b6688e", "type": "ScoreCounter::ScoreCounter", "variant": "StarCounter", "variables": [], @@ -444,25 +446,25 @@ "variables": [ { "name": "Earning", - "persistentUuid": "e9f1e9b5-cb60-4fa6-aa4d-1c7e37368087", + "persistentUuid": "fc3bcdf1-3985-4d58-94ec-b6fb470b948f", "type": "number", "value": 10 }, { "name": "Progress", - "persistentUuid": "51a115a0-f5c9-4d39-99d6-bcd4f29191f1", + "persistentUuid": "1f031009-1428-4c6a-aa4b-c92c0371ef14", "type": "number", "value": 0 }, { "name": "Level", - "persistentUuid": "e12849dd-fcc7-4a4c-9666-50ede0b1ed79", + "persistentUuid": "20eabc24-6f63-4c13-bf00-32b092fe279b", "type": "number", "value": 0 }, { "name": "PurchaseCost", - "persistentUuid": "eb507e8c-ac2c-45b4-a4be-5b492387cc4b", + "persistentUuid": "e23dc6f6-13b0-4942-9a9d-f2e81a9691fe", "type": "number", "value": 20 } @@ -811,7 +813,7 @@ { "author": "", "category": "User interface", - "dimension": "", + "dimension": "2D", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": ">=5.5.222", @@ -820,7 +822,7 @@ "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", - "version": "1.3.1", + "version": "1.4.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", @@ -3506,6 +3508,103 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Toggle effect", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldDisableEffectInIdle", + "True", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TweenState", + "=", + "\"NoTween\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "EffectName", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ @@ -4985,6 +5084,13 @@ "group": "Speed", "name": "FadeOutDuration" }, + { + "value": "", + "type": "Boolean", + "label": "Disable the effect in idle state", + "advanced": true, + "name": "ShouldDisableEffectInIdle" + }, { "value": "Idle", "type": "Choice", @@ -5107,6 +5213,9 @@ } ] }, + { + "propertyName": "ShouldDisableEffectInIdle" + }, { "propertyName": "PreviousState" }, @@ -7994,7 +8103,7 @@ { "author": "", "category": "User interface", - "dimension": "", + "dimension": "2D", "extensionNamespace": "", "fullName": "Resource bar (continuous)", "gdevelopVersion": ">=5.5.230", @@ -8003,7 +8112,7 @@ "name": "PanelSpriteContinuousBar", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Interface Elements/ea06363a57846caab544f536b78a952234b68d4941d41c1577852a1d61aefec3_Interface Elements_interface_ui_loading_progress_bar.svg", "shortDescription": "A bar that represents a resource in the game (health, mana, ammo, etc).", - "version": "2.0.0", + "version": "2.0.1", "description": [ "A bar that represents a resource in the game (health, mana, ammo, etc).", "", @@ -8750,6 +8859,7 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "resource bars", "defaultName": "ResourceBar", "description": "A bar that represents a resource in the game (health, mana, ammo, etc).", "fullName": "Resource bar (continuous)", @@ -8765,6 +8875,7 @@ "bold": false, "italic": false, "name": "Label", + "persistentUuid": "0cffb9c7-ac01-4b14-91ba-0de5fa70d02c", "smoothed": true, "type": "TextObject::Text", "underlined": false, @@ -8774,10 +8885,10 @@ { "name": "Anchor", "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 4, - "leftEdgeAnchor": 4, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 4, + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, "relativeToOriginalWindowSize": true, "useLegacyBottomAndRightAnchors": false } @@ -8820,6 +8931,7 @@ "height": 32, "leftMargin": 0, "name": "FillBar", + "persistentUuid": "4b66a2bf-092e-4eae-a683-d95ecc8b5025", "rightMargin": 0, "texture": "", "tiled": false, @@ -8859,6 +8971,7 @@ "height": 32, "leftMargin": 0, "name": "Buffer", + "persistentUuid": "a19c37ec-f2a0-4b6f-a78a-190c01fc6e5f", "rightMargin": 0, "texture": "", "tiled": false, @@ -8890,6 +9003,7 @@ "height": 32, "leftMargin": 0, "name": "Background", + "persistentUuid": "3b8e691f-11e9-448c-a94c-0e438f96958d", "rightMargin": 0, "texture": "", "tiled": false, @@ -8910,6 +9024,37 @@ "useLegacyBottomAndRightAnchors": false } ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "persistentUuid": "a5ef1543-49f0-4216-9dfb-59e708431536", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "100", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "221;221;221", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], "objectsFolderStructure": { @@ -8918,6 +9063,9 @@ { "objectName": "Label" }, + { + "objectName": "BitmapLabel" + }, { "objectName": "FillBar" }, @@ -8929,7 +9077,19 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -9027,7 +9187,23 @@ "initialVariables": [] } ], - "editionSettings": {}, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.3165559122569874, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, "eventsFunctions": [ { "fullName": "", @@ -9250,7 +9426,7 @@ "value": "Cache" }, "parameters": [ - "Label" + "Labels" ] } ] @@ -10413,7 +10589,7 @@ "value": "Cache" }, "parameters": [ - "Label" + "Labels" ] } ] @@ -10448,7 +10624,7 @@ "value": "Montre" }, "parameters": [ - "Label", + "Labels", "" ] } @@ -10487,7 +10663,7 @@ "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", "Text", "=", "ToString(round(Object.Value())) + \" / \" + ToString(Object.MaxValue())" @@ -10697,6 +10873,7 @@ "bold": false, "italic": false, "name": "Label", + "persistentUuid": "1ad20047-abde-4cde-afad-325bd5fdb1b9", "smoothed": true, "type": "TextObject::Text", "underlined": false, @@ -10842,6 +11019,37 @@ "useLegacyBottomAndRightAnchors": false } ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "persistentUuid": "a5ef1543-49f0-4216-9dfb-59e708431536", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "100", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "221;221;221", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], "objectsFolderStructure": { @@ -10858,10 +11066,25 @@ }, { "objectName": "Background" + }, + { + "objectName": "BitmapLabel" } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -10928,7 +11151,23 @@ "initialVariables": [] } ], - "editionSettings": {} + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 7.291666666666667, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + } } ] } @@ -10939,15 +11178,19 @@ "category": "User interface", "dimension": "", "extensionNamespace": "", - "fullName": "Animated Score Counter", + "fullName": "Animated score counter", "gdevelopVersion": ">=5.5.222", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNvdW50ZXIiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNCw0SDIwQTIsMiAwIDAsMSAyMiw2VjE4QTIsMiAwIDAsMSAyMCwyMEg0QTIsMiAwIDAsMSAyLDE4VjZBMiwyIDAgMCwxIDQsNE00LDZWMThIMTFWNkg0TTIwLDE4VjZIMTguNzZDMTksNi41NCAxOC45NSw3LjA3IDE4Ljk1LDcuMTNDMTguODgsNy44IDE4LjQxLDguNSAxOC4yNCw4Ljc1TDE1LjkxLDExLjNMMTkuMjMsMTEuMjhMMTkuMjQsMTIuNUwxNC4wNCwxMi40N0wxNCwxMS40N0MxNCwxMS40NyAxNy4wNSw4LjI0IDE3LjIsNy45NUMxNy4zNCw3LjY3IDE3LjkxLDYgMTYuNSw2QzE1LjI3LDYuMDUgMTUuNDEsNy4zIDE1LjQxLDcuM0wxMy44Nyw3LjMxQzEzLjg3LDcuMzEgMTMuODgsNi42NSAxNC4yNSw2SDEzVjE4SDE1LjU4TDE1LjU3LDE3LjE0TDE2LjU0LDE3LjEzQzE2LjU0LDE3LjEzIDE3LjQ1LDE2Ljk3IDE3LjQ2LDE2LjA4QzE3LjUsMTUuMDggMTYuNjUsMTUuMDggMTYuNSwxNS4wOEMxNi4zNywxNS4wOCAxNS40MywxNS4xMyAxNS40MywxNS45NUgxMy45MUMxMy45MSwxNS45NSAxMy45NSwxMy44OSAxNi41LDEzLjg5QzE5LjEsMTMuODkgMTguOTYsMTUuOTEgMTguOTYsMTUuOTFDMTguOTYsMTUuOTEgMTksMTcuMTYgMTcuODUsMTcuNjNMMTguMzcsMThIMjBNOC45MiwxNkg3LjQyVjEwLjJMNS42MiwxMC43NlY5LjUzTDguNzYsOC40MUg4LjkyVjE2WiIgLz48L3N2Zz4=", "name": "ScoreCounter", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/48ec8784eacd92181e4a3bde4755962b5f6edf986e624fc85ea423a31408450d_counter.svg", - "shortDescription": "An animated score counter with an icon and a customisable font.", - "version": "1.1.0", - "description": "An animated score counter with an icon and a customisable font.", + "shortDescription": "Animated score counter with an icon.", + "version": "1.4.1", + "description": [ + "An animated score counter with an icon and a customisable font.", + "", + "There are ready-to-use counters in the asset-store [score counters pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=score-counters-score-counters)." + ], "origin": { "identifier": "ScoreCounter", "name": "gdevelop-extension-store" @@ -10961,16 +11204,38 @@ ], "dependencies": [], "globalVariables": [], - "sceneVariables": [ + "sceneVariables": [], + "eventsFunctions": [ { - "name": "RisingPitch", - "type": "number", - "value": 1 + "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": [] } ], - "eventsFunctions": [], "eventsFunctionsFolderStructure": { - "folderName": "__ROOT" + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + } + ] }, "eventsBasedBehaviors": [ { @@ -11116,16 +11381,6 @@ "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "DisplayedValue", - "=", - "CounterValue" - ] - }, { "type": { "value": "SetNumberVariable" @@ -11147,18 +11402,45 @@ ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "ScoreCounter::RollingCounter", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ScoreCounter::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "Prefix + ToString(Value) + Suffix" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ScoreCounter::RollingCounter", "type": "behavior" } ], @@ -13712,12 +13994,6 @@ ], "choices": [], "name": "Scale" - }, - { - "value": "", - "type": "Number", - "label": "", - "name": "Property" } ], "propertiesFolderStructure": { @@ -13725,9 +14001,6 @@ "children": [ { "propertyName": "Scale" - }, - { - "propertyName": "Property" } ] } @@ -13735,18 +14008,20 @@ ], "eventsBasedObjects": [ { - "areaMaxX": 152, - "areaMaxY": 87, + "areaMaxX": 149, + "areaMaxY": 85, "areaMaxZ": 4, - "areaMinX": 3, - "areaMinY": 2, + "areaMinX": 0, + "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "score counters", "defaultName": "ScoreCounter", - "description": "An animated score counter with an icon and a customisable font.", - "fullName": "Animated Score Counter", + "description": "Animated score counter with an icon.", + "fullName": "Animated score counter", "helpPath": "", "iconUrl": "", "isInnerAreaFollowingParentSize": true, + "isTextContainer": true, "isUsingLegacyInstancesRenderer": false, "name": "ScoreCounter", "previewIconUrl": "", @@ -13799,25 +14074,7 @@ { "looping": true, "timeBetweenFrames": 0.025, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Star Gold.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 23, - "y": 23 - }, - "centerPoint": { - "automatic": false, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] + "sprites": [] } ] } @@ -13865,7 +14122,7 @@ } ], "string": "0", - "font": "a8c7c959ab7f3dbb0fcf98d5355fb8839186d33f3c9d7203ef20450fa5a72091_JotiOne-Regular.ttf", + "font": "", "textAlignment": "left", "characterSize": 30, "color": { @@ -13888,7 +14145,7 @@ "smoothed": true, "underlined": false, "text": "0", - "font": "a8c7c959ab7f3dbb0fcf98d5355fb8839186d33f3c9d7203ef20450fa5a72091_JotiOne-Regular.ttf", + "font": "", "textAlignment": "left", "verticalTextAlignment": "center", "characterSize": 30, @@ -13903,7 +14160,7 @@ "leftMargin": 30, "name": "Background", "rightMargin": 30, - "texture": "Group 12.png", + "texture": "", "tiled": true, "topMargin": 30, "type": "PanelSpriteObject::PanelSprite", @@ -13922,6 +14179,55 @@ "useLegacyBottomAndRightAnchors": false } ] + }, + { + "assetStoreId": "", + "name": "BitmapCounter", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "isFolded": true, + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "leftEdgeAnchor": 1, + "bottomEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "RollingCounter", + "type": "ScoreCounter::RollingCounter", + "Text": "Text", + "Prefix": "Score: ", + "Suffix": "", + "Duration": 1, + "Increment": 1, + "CounterValue": 0, + "DisplayedValue": 0, + "Speed": 0 + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ScoreCounter::ShakeObject_PositionAngleScale", + "Scale": "Scale", + "Property": 7.02010802359022e-306 + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } } ], "objectsFolderStructure": { @@ -13935,10 +14241,25 @@ }, { "objectName": "Background" + }, + { + "objectName": "BitmapCounter" } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "CounterText", + "objects": [ + { + "name": "Counter" + }, + { + "name": "BitmapCounter" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, @@ -13980,8 +14301,8 @@ "name": "Counter", "persistentUuid": "76dfa03a-0454-4c0e-8bf0-66ec853de478", "width": 123, - "x": 26, - "y": 45, + "x": 23, + "y": 43, "zOrder": 4, "numberProperties": [], "stringProperties": [], @@ -13997,8 +14318,8 @@ "name": "Icon", "persistentUuid": "33104734-7e97-4243-a199-3470acd804d6", "width": 53, - "x": 30, - "y": 31, + "x": 0, + "y": 0, "zOrder": 3, "numberProperties": [ { @@ -14010,7 +14331,23 @@ "initialVariables": [] } ], - "editionSettings": {}, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 4.114333967922894, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, "eventsFunctions": [ { "fullName": "", @@ -14024,13 +14361,24 @@ "actions": [ { "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" + "value": "ScoreCounter::RollingCounter::SetValue" }, "parameters": [ - "Counter", - "Text", + "CounterText", + "RollingCounter", "=", - "Score" + "Score", + "" + ] + }, + { + "type": { + "value": "ScoreCounter::RollingCounter::ResetDisplayedValue" + }, + "parameters": [ + "CounterText", + "RollingCounter", + "" ] } ] @@ -14049,7 +14397,77 @@ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ScoreCounter::ScoreCounter::SetScore" + }, + "parameters": [ + "Object", + "=", + "Score", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScoreCounter::ScoreCounter", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the score of the object.", + "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": "ScoreCounter::ScoreCounter", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Score", + "name": "SetScore", "sentence": "", "events": [ { @@ -14057,12 +14475,21 @@ "conditions": [ { "type": { - "value": "TextContainerCapability::TextContainerBehavior::Value" + "inverted": true, + "value": "ScoreCounter::IsInGameEdition" }, "parameters": [ - "Counter", - "Text", - "!=", + "", + "" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Value", + ">", "Score" ] } @@ -14070,197 +14497,160 @@ "actions": [], "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Change score and effects", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::Value" - }, - "parameters": [ - "Counter", - "Text", - "!=", - "Score" - ] - } - ], - "actions": [ - { - "type": { - "value": "ScoreCounter::RollingCounter::SetValue" - }, - "parameters": [ - "Counter", - "RollingCounter", - "=", - "Score", - "" - ] - } + "type": { + "value": "CompareTimer" + }, + "parameters": [ + "", + "\"RisingPitch\"", + ">", + "PitchTimeout" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ScoreCounter::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" - }, - "parameters": [ - "Icon", - "ShakeObject_PositionAngleScale", - "0.3", - "0", - "0", - "0", - "25", - "0.1", - "", - "" - ] - } + "type": { + "value": "ScoreCounter::ScoreCounter::ResetPitch" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "IncreasingScoreSound", + "no", + "100", + "CurrentPitch" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ScoreCounter::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" - }, - "parameters": [ - "Counter", - "ShakeObject_PositionAngleScale", - "0.2", - "0", - "0", - "RandomWithStep(-5,5,10)", - "5", - "0.1", - "", - "" - ] - } + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentPitch", + "*", + "PitchFactor" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "RisingPitch", - "*", - "1.01" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"RisingPitch\"" - ] - } + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"RisingPitch\"" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareTimer" - }, - "parameters": [ - "", - "\"RisingPitch\"", - ">", - "1" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "RisingPitch", - "=", - "0.8" - ] - } + "type": { + "value": "ScoreCounter::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "Icon", + "ShakeObject_PositionAngleScale", + "0.3", + "0", + "0", + "0", + "25", + "0.1", + "", + "" + ] + }, + { + "type": { + "value": "ScoreCounter::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "CounterText", + "ShakeObject_PositionAngleScale", + "0.2", + "0", + "0.15 * Icon.Height()", + "0", + "0", + "0.1", + "", + "" ] } - ], - "parameters": [] + ] } ] - } - ], - "parameters": [ + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "ScoreCounter::ScoreCounter", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the score of the object.", - "fullName": "Score", - "functionType": "ExpressionAndCondition", - "name": "Score", - "sentence": "the score", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Value", + "<", + "Score" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScoreCounter::ScoreCounter::ResetPitch" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetNumberVariable" }, "parameters": [ - "Score" + "Score", + "=", + "Value" + ] + }, + { + "type": { + "value": "ScoreCounter::RollingCounter::SetValue" + }, + "parameters": [ + "CounterText", + "RollingCounter", + "=", + "Score", + "" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -14272,11 +14662,12 @@ "objectGroups": [] }, { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "Score", - "name": "SetScore", - "sentence": "", + "description": "Reset the pitch to the baseline value.", + "fullName": "Reset pitch", + "functionType": "Action", + "name": "ResetPitch", + "private": true, + "sentence": "Reset the pitch of _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -14287,9 +14678,9 @@ "value": "SetNumberVariable" }, "parameters": [ - "Score", + "CurrentPitch", "=", - "Value" + "RandomFloatInRange(PitchBaselineMin, PitchBaselineMax)" ] } ] @@ -14313,13 +14704,16 @@ "functionName": "onCreated" }, { - "functionName": "doStepPostEvents" + "functionName": "onHotReloading" }, { "functionName": "Score" }, { "functionName": "SetScore" + }, + { + "functionName": "ResetPitch" } ] }, @@ -14332,6 +14726,57 @@ "description": "Default score", "group": "Value", "name": "Score" + }, + { + "value": "", + "type": "Resource", + "label": "Increasing score sound", + "group": "Sound", + "extraInformation": [ + "audio" + ], + "choices": [], + "name": "IncreasingScoreSound" + }, + { + "value": "0.7", + "type": "Number", + "label": "Min baseline pitch", + "group": "Sound", + "advanced": true, + "name": "PitchBaselineMin" + }, + { + "value": "0.8", + "type": "Number", + "label": "Max baseline pitch", + "group": "Sound", + "advanced": true, + "name": "PitchBaselineMax" + }, + { + "value": "1.01", + "type": "Number", + "label": "Pitch factor", + "group": "Sound", + "advanced": true, + "name": "PitchFactor" + }, + { + "value": "1", + "type": "Number", + "unit": "Second", + "label": "Pitch reset timeout", + "group": "Sound", + "advanced": true, + "name": "PitchTimeout" + }, + { + "value": "0.8", + "type": "Number", + "label": "Current pitch", + "hidden": true, + "name": "CurrentPitch" } ], "propertiesFolderStructure": { @@ -14344,6 +14789,29 @@ "propertyName": "Score" } ] + }, + { + "folderName": "Sound", + "children": [ + { + "propertyName": "IncreasingScoreSound" + }, + { + "propertyName": "PitchBaselineMin" + }, + { + "propertyName": "PitchBaselineMax" + }, + { + "propertyName": "PitchFactor" + }, + { + "propertyName": "PitchTimeout" + } + ] + }, + { + "propertyName": "CurrentPitch" } ] }, @@ -14421,6 +14889,7 @@ "bold": true, "italic": true, "name": "Counter", + "persistentUuid": "9a54b597-1b51-4dca-b956-ee4d75ca291c", "smoothed": true, "type": "TextObject::Text", "underlined": false, @@ -14515,31 +14984,95 @@ "useLegacyBottomAndRightAnchors": false } ] - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Counter" - }, - { - "objectName": "Icon" - }, - { - "objectName": "Background" - } - ] - }, - "objectsGroups": [], - "layers": [ + }, { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera2DPlaneMaxDrawingDistance": 5000, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, + "assetStoreId": "", + "name": "BitmapCounter", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "isFolded": true, + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "leftEdgeAnchor": 1, + "bottomEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "RollingCounter", + "type": "ScoreCounter::RollingCounter", + "Text": "Text", + "Prefix": "Score: ", + "Suffix": "", + "Duration": 1, + "Increment": 1, + "CounterValue": 0, + "DisplayedValue": 0, + "Speed": 0 + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ScoreCounter::ShakeObject_PositionAngleScale", + "Scale": "Scale", + "Property": 7.02010802359022e-306 + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Counter" + }, + { + "objectName": "Icon" + }, + { + "objectName": "Background" + }, + { + "objectName": "BitmapCounter" + } + ] + }, + "objectsGroups": [ + { + "name": "CounterText", + "objects": [ + { + "name": "Counter" + }, + { + "name": "BitmapCounter" + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, "cameraType": "", "followBaseLayerCamera": false, @@ -14603,7 +15136,23 @@ "initialVariables": [] } ], - "editionSettings": {} + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 4.697986577181208, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + } } ] } @@ -14612,16 +15161,16 @@ { "author": "", "category": "User interface", - "dimension": "", + "dimension": "2D", "extensionNamespace": "", - "fullName": "Panel sprite button", + "fullName": "Labeled button", "gdevelopVersion": ">=5.5.230", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", "name": "PanelSpriteButton", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", - "shortDescription": "A button that can be customized.", - "version": "2.1.1", + "shortDescription": "Resizeable button with a label.", + "version": "2.2.0", "description": [ "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", "", @@ -14674,6 +15223,9 @@ "eventsFunctionsFolderStructure": { "folderName": "__ROOT", "children": [ + { + "functionName": "" + }, { "functionName": "IsInGameEdition" } @@ -15735,47 +16287,1075 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover text style", + "helpPath": "", + "iconUrl": "", + "name": "TextStyleState", + "objectType": "TextObject::Text", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "description": "Check if isHovered.", + "fullName": "IsHovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ isHovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "IdleFontSize", + "=", + "Object.FontSize()" + ] + }, + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "HoverFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "IdleFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.TextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._color.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsHovered" + }, + { + "functionName": "SetIsHovered" + }, + { + "functionName": "Color" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Boolean", + "label": "Outline on hover", + "name": "ShouldEnableOutlineOnHover" + }, + { + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" + }, + { + "value": "", + "type": "Boolean", + "label": "Enable shadow on hover", + "name": "ShouldEnableShadowOnHover" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Hover font size", + "name": "HoverFontSize" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "IsHovered" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Idle font size", + "hidden": true, + "name": "IdleFontSize" + }, + { + "value": "", + "type": "Color", + "label": "Idle color", + "hidden": true, + "name": "IdleColor" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "IsHovered" + }, + { + "propertyName": "HoverFontSize" + }, + { + "propertyName": "IdleFontSize" + }, + { + "propertyName": "HoverColor" + }, + { + "propertyName": "IdleColor" + }, + { + "propertyName": "ShouldEnableOutlineOnHover" + }, + { + "propertyName": "ShouldEnableShadowOnHover" + } + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover bitmap text style", + "helpPath": "", + "iconUrl": "", + "name": "BitmapTextStyleState", + "objectType": "BitmapText::BitmapTextObject", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "description": "Check if isHovered.", + "fullName": "IsHovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ isHovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleText", + "=", + "Object.Text::Value()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "HoverPrefix + Object.Text::Value() + HoverSuffix" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "IdleText" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" } ], "objectGroups": [] }, { - "description": "the touch id that is using the button or 0 if none.", - "fullName": "Touch id", - "functionType": "ExpressionAndCondition", - "name": "TouchId", - "sentence": "the touch id", + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "TouchId" - ] - } - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.BitmapTextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._tint.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true } ], "expressionType": { - "type": "expression" + "type": "color" }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", "type": "behavior" } ], @@ -15785,125 +17365,78 @@ "eventsFunctionsFolderStructure": { "folderName": "__ROOT", "children": [ - { - "functionName": "doStepPostEvents" - }, - { - "functionName": "onDeActivate" - }, - { - "functionName": "ResetState" - }, - { - "functionName": "IsIdle" - }, - { - "functionName": "IsClicked" - }, { "functionName": "IsHovered" }, { - "functionName": "IsFocused" - }, - { - "functionName": "IsPressed" - }, - { - "functionName": "IsPressedOutside" + "functionName": "SetIsHovered" }, { - "functionName": "TouchId" + "functionName": "Color" } ] }, "propertyDescriptors": [ { - "value": "true", - "type": "Boolean", - "label": "", - "description": "Should check hovering", - "hidden": true, - "name": "ShouldCheckHovering" + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" }, { - "value": "Idle", - "type": "Choice", - "label": "State", - "choices": [ - { - "label": "Idle", - "value": "Idle" - }, - { - "label": "Hovered", - "value": "Hovered" - }, - { - "label": "PressedInside", - "value": "PressedInside" - }, - { - "label": "PressedOutside", - "value": "PressedOutside" - }, - { - "label": "Validated", - "value": "Validated" - } - ], - "hidden": true, - "name": "State" + "value": "", + "type": "String", + "label": "Hover prefix", + "name": "HoverPrefix" }, { - "value": "0", - "type": "Number", - "label": "Touch id", - "hidden": true, - "name": "TouchId" + "value": "", + "type": "String", + "label": "Hover suffix", + "name": "HoverSuffix" }, { "value": "", "type": "Boolean", - "label": "Touch is inside", + "label": "", "hidden": true, - "name": "TouchIsInside" + "name": "IsHovered" }, { "value": "", - "type": "Boolean", - "label": "Mouse is inside", + "type": "String", + "label": "Idle text", "hidden": true, - "name": "MouseIsInside" + "name": "IdleText" }, { "value": "", - "type": "Number", - "label": "", + "type": "Color", + "label": "Idle color", "hidden": true, - "name": "Index" + "name": "IdleColor" } ], "propertiesFolderStructure": { "folderName": "__ROOT", "children": [ { - "propertyName": "ShouldCheckHovering" + "propertyName": "IsHovered" }, { - "propertyName": "State" + "propertyName": "HoverPrefix" }, { - "propertyName": "TouchId" + "propertyName": "HoverSuffix" }, { - "propertyName": "TouchIsInside" + "propertyName": "IdleText" }, { - "propertyName": "MouseIsInside" + "propertyName": "HoverColor" }, { - "propertyName": "Index" + "propertyName": "IdleColor" } ] } @@ -15917,9 +17450,10 @@ "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, + "assetStoreTag": "menu buttons", "defaultName": "Button", - "description": "A button that can be customized.", - "fullName": "Button (panel sprite)", + "description": "Button with a label.", + "fullName": "Labeled button", "helpPath": "", "iconUrl": "", "isInnerAreaFollowingParentSize": true, @@ -15947,6 +17481,17 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Text", @@ -16094,6 +17639,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": { @@ -16221,7 +17776,23 @@ "initialVariables": [] } ], - "editionSettings": {}, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, "eventsFunctions": [ { "fullName": "", @@ -16474,6 +18045,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -16629,29 +18222,34 @@ "actions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" }, "parameters": [ - "Object", - "=", - "0", + "Label", + "TextStyleState", + "", "" ] }, { "type": { - "value": "Cache" + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" }, "parameters": [ - "Idle" + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" ] }, { "type": { - "value": "Montre" + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" }, "parameters": [ - "Hovered", + "Object", + "=", + "0", "" ] }, @@ -16660,28 +18258,64 @@ "value": "Cache" }, "parameters": [ - "Pressed" + "Idle" ] }, { "type": { - "value": "Tween::RemoveTween" + "value": "Montre" }, "parameters": [ "Hovered", - "Tween", - "\"Fadeout\"" + "" ] }, { "type": { - "value": "OpacityCapability::OpacityBehavior::SetValue" + "value": "Cache" }, "parameters": [ - "Hovered", - "Opacity", - "=", - "255" + "Pressed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] + } ] } ] @@ -16706,6 +18340,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -16764,6 +18420,28 @@ } ], "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "yes", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" + ] + }, { "type": { "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" @@ -17422,6 +19100,7 @@ "type": "Number", "unit": "Pixel", "label": "", + "group": "States", "hidden": true, "name": "LabelOffset" }, @@ -17449,6 +19128,9 @@ { "propertyName": "LabelText" }, + { + "propertyName": "_PropertyMapping" + }, { "folderName": "States", "children": [ @@ -17457,14 +19139,11 @@ }, { "propertyName": "PressedLabelOffsetY" + }, + { + "propertyName": "LabelOffset" } ] - }, - { - "propertyName": "LabelOffset" - }, - { - "propertyName": "_PropertyMapping" } ] }, @@ -17499,6 +19178,17 @@ "rightEdgeAnchor": 2, "topEdgeAnchor": 1, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" } ], "string": "Passive\nLvl:0 Cost:20", @@ -17655,6 +19345,16 @@ "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" } ], "content": {