From 7b153e416734fc088be28bc80e30e96dc5dbfecb Mon Sep 17 00:00:00 2001 From: HelperWesley <72082749+HelperWesley@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:12:46 +0200 Subject: [PATCH] [Reviewed] [Continuous bar] Allow to use bitmap texts --- .../reviewed/PanelSpriteContinuousBar.json | 311 +++++++++++++++--- 1 file changed, 263 insertions(+), 48 deletions(-) diff --git a/extensions/reviewed/PanelSpriteContinuousBar.json b/extensions/reviewed/PanelSpriteContinuousBar.json index 5baca4e77..9690577d6 100644 --- a/extensions/reviewed/PanelSpriteContinuousBar.json +++ b/extensions/reviewed/PanelSpriteContinuousBar.json @@ -1,6 +1,7 @@ { "author": "", "category": "User interface", + "dimension": "2D", "extensionNamespace": "", "fullName": "Resource bar (continuous)", "gdevelopVersion": ">=5.5.230", @@ -9,8 +10,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).", - "dimension": "2D", - "version": "2.0.0", + "version": "2.0.1", "description": [ "A bar that represents a resource in the game (health, mana, ammo, etc).", "", @@ -45,6 +45,9 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "A bar that represents a resource in the game (health, mana, ammo, etc).", @@ -293,6 +296,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MaxValue", + "group": "Resource bar configuration", "name": "SetMaxValue", "sentence": "", "events": [ @@ -548,6 +552,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PreviousHighValueDuration", + "group": "FillBar bar configuration", "name": "SetPreviousHighValueDuration", "sentence": "", "events": [ @@ -643,32 +648,74 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "Value" + }, + { + "functionName": "SetValue" + }, + { + "folderName": "Resource bar configuration", + "children": [ + { + "functionName": "MaxValue" + }, + { + "functionName": "SetMaxValue" + } + ] + }, + { + "functionName": "IsEmpty" + }, + { + "functionName": "IsFull" + }, + { + "functionName": "PreviousHighValue" + }, + { + "functionName": "UpdatePreviousHighValue" + }, + { + "folderName": "FillBar bar configuration", + "children": [ + { + "functionName": "PreviousHighValueDuration" + }, + { + "functionName": "SetPreviousHighValueDuration" + } + ] + }, + { + "functionName": "IsChanging" + } + ] + }, "propertyDescriptors": [ { "value": "1", "type": "Number", "label": "Value", - "description": "", - "group": "", - "extraInformation": [], "name": "CurrentValue" }, { "value": "3", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxValue" }, { "value": "", "type": "Number", "label": "Previous high value", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousHighValue" }, @@ -676,14 +723,27 @@ "value": "1", "type": "Number", "label": "Previous high value conservation duration (in seconds)", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousHighValueDuration" } ], - "sharedPropertyDescriptors": [] + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "CurrentValue" + }, + { + "propertyName": "MaxValue" + }, + { + "propertyName": "PreviousHighValue" + }, + { + "propertyName": "PreviousHighValueDuration" + } + ] + } } ], "eventsBasedObjects": [ @@ -707,6 +767,7 @@ "bold": false, "italic": false, "name": "Label", + "persistentUuid": "0cffb9c7-ac01-4b14-91ba-0de5fa70d02c", "smoothed": true, "type": "TextObject::Text", "underlined": false, @@ -714,12 +775,12 @@ "effects": [], "behaviors": [ { + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, "name": "Anchor", + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 4, - "leftEdgeAnchor": 4, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 4, "relativeToOriginalWindowSize": true, "useLegacyBottomAndRightAnchors": false } @@ -752,6 +813,7 @@ "textAlignment": "center", "verticalTextAlignment": "center", "characterSize": 20, + "lineHeight": 0, "color": "0;0;0" } }, @@ -761,6 +823,7 @@ "height": 32, "leftMargin": 0, "name": "FillBar", + "persistentUuid": "4b66a2bf-092e-4eae-a683-d95ecc8b5025", "rightMargin": 0, "texture": "", "tiled": false, @@ -800,6 +863,7 @@ "height": 32, "leftMargin": 0, "name": "Buffer", + "persistentUuid": "a19c37ec-f2a0-4b6f-a78a-190c01fc6e5f", "rightMargin": 0, "texture": "", "tiled": false, @@ -831,6 +895,7 @@ "height": 32, "leftMargin": 0, "name": "Background", + "persistentUuid": "3b8e691f-11e9-448c-a94c-0e438f96958d", "rightMargin": 0, "texture": "", "tiled": false, @@ -851,6 +916,36 @@ "useLegacyBottomAndRightAnchors": false } ] + }, + { + "name": "BitmapLabel", + "persistentUuid": "a5ef1543-49f0-4216-9dfb-59e708431536", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "name": "Anchor", + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "type": "AnchorBehavior::AnchorBehavior", + "relativeToOriginalWindowSize": true, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "text": "100", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "221;221;221", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } } ], "objectsFolderStructure": { @@ -859,6 +954,9 @@ { "objectName": "Label" }, + { + "objectName": "BitmapLabel" + }, { "objectName": "FillBar" }, @@ -870,12 +968,25 @@ } ] }, - "objectsGroups": [], + "objectsGroups": [ + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], "layers": [ { "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, @@ -967,6 +1078,23 @@ "initialVariables": [] } ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.3165559122569874, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, "eventsFunctions": [ { "fullName": "", @@ -1189,7 +1317,7 @@ "value": "Cache" }, "parameters": [ - "Label" + "Labels" ] } ] @@ -1698,6 +1826,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Value", + "group": "Resource bar", "name": "SetValue", "sentence": "", "events": [ @@ -1878,6 +2007,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "MaxValue", + "group": "Resource bar configuration", "name": "SetMaxValue", "sentence": "", "events": [ @@ -2062,6 +2192,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "PreviousValueDuration", + "group": "Resource bar configuration", "name": "SetPreviousValueDuration", "sentence": "", "events": [ @@ -2349,7 +2480,7 @@ "value": "Cache" }, "parameters": [ - "Label" + "Labels" ] } ] @@ -2384,7 +2515,7 @@ "value": "Montre" }, "parameters": [ - "Label", + "Labels", "" ] } @@ -2423,7 +2554,7 @@ "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Label", + "Labels", "Text", "=", "ToString(round(Object.Value())) + \" / \" + ToString(Object.MaxValue())" @@ -2443,23 +2574,86 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "UpdateLayout" + }, + { + "folderName": "Resource bar", + "children": [ + { + "functionName": "Value" + }, + { + "functionName": "SetValue" + }, + { + "functionName": "IsEmpty" + }, + { + "functionName": "IsFull" + }, + { + "functionName": "IsChanging" + } + ] + }, + { + "folderName": "Resource bar configuration", + "children": [ + { + "functionName": "MaxValue" + }, + { + "functionName": "SetMaxValue" + }, + { + "functionName": "PreviousValueDuration" + }, + { + "functionName": "SetPreviousValueDuration" + }, + { + "functionName": "IsLabelShown" + }, + { + "functionName": "SetLabelShown" + } + ] + }, + { + "functionName": "WidthForValue" + }, + { + "functionName": "FullBarWidth" + }, + { + "functionName": "UpdateLabel" + } + ] + }, "propertyDescriptors": [ { "value": "3", "type": "Number", "label": "Maximum value", - "description": "", - "group": "", - "extraInformation": [], "name": "MaxValue" }, { "value": "3", "type": "Number", "label": "Initial value", - "description": "", - "group": "", - "extraInformation": [], "name": "InitialValue" }, { @@ -2467,8 +2661,6 @@ "type": "Number", "label": "", "description": "It's used to detect a change at hot reload.", - "group": "", - "extraInformation": [], "hidden": true, "name": "PreviousInitialValue" }, @@ -2477,9 +2669,7 @@ "type": "Number", "unit": "Second", "label": "Previous high value conservation duration (in seconds)", - "description": "", "group": "Animation", - "extraInformation": [], "name": "PreviousHighValueDuration" }, { @@ -2487,29 +2677,23 @@ "type": "Number", "unit": "Second", "label": "Easing duration", - "description": "", "group": "Animation", - "extraInformation": [], "name": "EasingDuration" }, { "value": "true", "type": "Boolean", "label": "Show the label", - "description": "", - "group": "", "extraInformation": [ "Label" ], + "choices": [], "name": "ShowLabel" }, { "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "BarLeftPlusRightMargin" }, @@ -2517,9 +2701,6 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "BarTopPlusBottomMargin" }, @@ -2527,13 +2708,47 @@ "value": "0", "type": "Number", "label": "", - "description": "", - "group": "", - "extraInformation": [], "hidden": true, "name": "OldParentWidth" } - ] + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "MaxValue" + }, + { + "propertyName": "InitialValue" + }, + { + "propertyName": "PreviousInitialValue" + }, + { + "folderName": "Animation", + "children": [ + { + "propertyName": "PreviousHighValueDuration" + }, + { + "propertyName": "EasingDuration" + } + ] + }, + { + "propertyName": "ShowLabel" + }, + { + "propertyName": "BarLeftPlusRightMargin" + }, + { + "propertyName": "BarTopPlusBottomMargin" + }, + { + "propertyName": "OldParentWidth" + } + ] + } } ] } \ No newline at end of file