Skip to content

Commit 0ead562

Browse files
authored
[Community] [Resource bar] Fix bar easing to allow to disable it (#730)
* Don't show in changelog
1 parent c83aea9 commit 0ead562

File tree

3 files changed

+75
-28
lines changed

3 files changed

+75
-28
lines changed

extensions/community/PanelSpriteContinuousBar.json

Lines changed: 62 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "PanelSpriteContinuousBar",
99
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Interface Elements/ea06363a57846caab544f536b78a952234b68d4941d41c1577852a1d61aefec3_Interface Elements_interface_ui_loading_progress_bar.svg",
1010
"shortDescription": "A bar that represents a resource in the game (health, mana, ammo, etc).",
11-
"version": "1.1.0",
11+
"version": "1.1.1",
1212
"description": "A bar that represents a resource in the game (health, mana, ammo, etc).",
1313
"origin": {
1414
"identifier": "ResourceBar",
@@ -1456,7 +1456,7 @@
14561456
"parameters": [
14571457
"Label",
14581458
"=",
1459-
"round(FillBar.CenterY())"
1459+
"FillBar.CenterY()"
14601460
]
14611461
},
14621462
{
@@ -1466,7 +1466,7 @@
14661466
"parameters": [
14671467
"Label",
14681468
"=",
1469-
"round(Background.CenterX() + (Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()) / 2)"
1469+
"Background.CenterX() + (Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()) / 2"
14701470
]
14711471
}
14721472
]
@@ -1540,7 +1540,24 @@
15401540
"GetArgumentAsNumber(\"Value\")",
15411541
""
15421542
]
1543-
},
1543+
}
1544+
]
1545+
},
1546+
{
1547+
"type": "BuiltinCommonInstructions::Standard",
1548+
"conditions": [
1549+
{
1550+
"type": {
1551+
"value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration"
1552+
},
1553+
"parameters": [
1554+
"Object",
1555+
">",
1556+
"0"
1557+
]
1558+
}
1559+
],
1560+
"actions": [
15441561
{
15451562
"type": {
15461563
"value": "Tween::AddObjectWidthTween"
@@ -1554,7 +1571,40 @@
15541571
"Object.PropertyEasingDuration() * 1000",
15551572
""
15561573
]
1557-
},
1574+
}
1575+
]
1576+
},
1577+
{
1578+
"type": "BuiltinCommonInstructions::Standard",
1579+
"conditions": [
1580+
{
1581+
"type": {
1582+
"value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::PropertyEasingDuration"
1583+
},
1584+
"parameters": [
1585+
"Object",
1586+
"<=",
1587+
"0"
1588+
]
1589+
}
1590+
],
1591+
"actions": [
1592+
{
1593+
"type": {
1594+
"value": "PanelSpriteObject::Width"
1595+
},
1596+
"parameters": [
1597+
"FillBar",
1598+
"=",
1599+
"Object.WidthForValue()"
1600+
]
1601+
}
1602+
]
1603+
},
1604+
{
1605+
"type": "BuiltinCommonInstructions::Standard",
1606+
"conditions": [],
1607+
"actions": [
15581608
{
15591609
"type": {
15601610
"value": "PanelSpriteContinuousBar::PanelSpriteContinuousBar::UpdateLabel"
@@ -1710,7 +1760,7 @@
17101760
"description": "Check if the bar is empty.",
17111761
"fullName": "Empty",
17121762
"functionType": "Condition",
1713-
"group": "FillBar bar",
1763+
"group": "Resource bar",
17141764
"name": "IsEmpty",
17151765
"sentence": "_PARAM0_ is empty",
17161766
"events": [
@@ -1754,7 +1804,7 @@
17541804
"description": "Check if the bar is full.",
17551805
"fullName": "Full",
17561806
"functionType": "Condition",
1757-
"group": "FillBar bar",
1807+
"group": "Resource bar",
17581808
"name": "IsFull",
17591809
"sentence": "_PARAM0_ is full",
17601810
"events": [
@@ -1798,7 +1848,7 @@
17981848
"description": "the previous value conservation duration (in seconds) of the object.",
17991849
"fullName": "Previous value conservation duration",
18001850
"functionType": "ExpressionAndCondition",
1801-
"group": "FillBar bar configuration",
1851+
"group": "Resource bar configuration",
18021852
"name": "PreviousValueDuration",
18031853
"sentence": "the previous value conservation duration",
18041854
"events": [
@@ -1927,7 +1977,7 @@
19271977
"description": "Check if the resource value is changing.",
19281978
"fullName": "Value is changing",
19291979
"functionType": "Condition",
1930-
"group": "FillBar bar",
1980+
"group": "Resource bar",
19311981
"name": "IsChanging",
19321982
"private": true,
19331983
"sentence": "_PARAM0_ value is changing",
@@ -2042,7 +2092,7 @@
20422092
"description": "Check if the label is shown.",
20432093
"fullName": "Label is shown",
20442094
"functionType": "Condition",
2045-
"group": "FillBar bar configuration",
2095+
"group": "Resource bar configuration",
20462096
"name": "IsLabelShown",
20472097
"sentence": "_PARAM0_ label is shown",
20482098
"events": [
@@ -2084,7 +2134,7 @@
20842134
"description": "Show (or hide) the label on the bar.",
20852135
"fullName": "Show label",
20862136
"functionType": "Action",
2087-
"group": "FillBar bar configuration",
2137+
"group": "Resource bar configuration",
20882138
"name": "SetLabelShown",
20892139
"sentence": "Show the label of _PARAM0_: _PARAM1_",
20902140
"events": [
@@ -2377,7 +2427,7 @@
23772427
"behaviors": [],
23782428
"string": "2 / 3",
23792429
"font": "",
2380-
"textAlignment": "",
2430+
"textAlignment": "center",
23812431
"characterSize": 20,
23822432
"color": {
23832433
"b": 0,

extensions/community/PanelSpriteSlider.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "PanelSpriteSlider",
99
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg",
1010
"shortDescription": "A draggable slider that users can move to select a numerical value.",
11-
"version": "1.1.0",
11+
"version": "1.1.1",
1212
"description": "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.",
1313
"origin": {
1414
"identifier": "ResourceBar",
@@ -2723,7 +2723,6 @@
27232723
"description": "the value of the slider.",
27242724
"fullName": "Value",
27252725
"functionType": "ExpressionAndCondition",
2726-
"group": "Resource bar",
27272726
"name": "Value",
27282727
"sentence": "the value",
27292728
"events": [
@@ -2810,7 +2809,7 @@
28102809
"description": "the minimum value of the slider.",
28112810
"fullName": "Minimum value",
28122811
"functionType": "ExpressionAndCondition",
2813-
"group": "Resource bar configuration",
2812+
"group": "Slider configuration",
28142813
"name": "MinValue",
28152814
"sentence": "the minimum value",
28162815
"events": [
@@ -2906,7 +2905,7 @@
29062905
"description": "the maximum value of the slider.",
29072906
"fullName": "Maximum value",
29082907
"functionType": "ExpressionAndCondition",
2909-
"group": "Resource bar configuration",
2908+
"group": "Slider configuration",
29102909
"name": "MaxValue",
29112910
"sentence": "the maximum value",
29122911
"events": [
@@ -3002,7 +3001,7 @@
30023001
"description": "the step size of the slider.",
30033002
"fullName": "Step size",
30043003
"functionType": "ExpressionAndCondition",
3005-
"group": "Resource bar configuration",
3004+
"group": "Slider configuration",
30063005
"name": "StepSize",
30073006
"sentence": "the step size",
30083007
"events": [
@@ -3080,7 +3079,7 @@
30803079
"description": "Check if the label is shown.",
30813080
"fullName": "Label is shown",
30823081
"functionType": "Condition",
3083-
"group": "Resource bar configuration",
3082+
"group": "Slider configuration",
30843083
"name": "IsLabelShown",
30853084
"sentence": "_PARAM0_ label is shown",
30863085
"events": [
@@ -3122,7 +3121,7 @@
31223121
"description": "Show (or hide) the label on the bar.",
31233122
"fullName": "Show label",
31243123
"functionType": "Action",
3125-
"group": "Resource bar configuration",
3124+
"group": "Slider configuration",
31263125
"name": "SetLabelShown",
31273126
"sentence": "Show the label of _PARAM0_: _PARAM1_",
31283127
"events": [
@@ -3277,7 +3276,7 @@
32773276
"parameters": [
32783277
"Label",
32793278
"=",
3280-
"round(FillBar.CenterY())"
3279+
"FillBar.CenterY()"
32813280
]
32823281
},
32833282
{
@@ -3287,7 +3286,7 @@
32873286
"parameters": [
32883287
"Label",
32893288
"=",
3290-
"round(Background.CenterX() + (Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()) / 2)"
3289+
"Background.CenterX() + (Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()) / 2"
32913290
]
32923291
}
32933292
]
@@ -3703,7 +3702,7 @@
37033702
},
37043703
{
37053704
"value": "Center-center",
3706-
"type": "Number",
3705+
"type": "String",
37073706
"label": "",
37083707
"description": "Only used by the scene editor.",
37093708
"group": "",
@@ -3715,7 +3714,7 @@
37153714
},
37163715
{
37173716
"value": "Center-right",
3718-
"type": "Number",
3717+
"type": "String",
37193718
"label": "",
37203719
"description": "Only used by the scene editor.",
37213720
"group": "",

extensions/community/SpriteToggleSwitch.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "SpriteToggleSwitch",
99
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg",
1010
"shortDescription": "Toggle switch that users can click or touch.",
11-
"version": "1.0.0",
11+
"version": "1.0.1",
1212
"description": "Toggle switch that users can click or touch. The switch can be customized with sprites.",
1313
"tags": [
1414
"ui",
@@ -1750,7 +1750,7 @@
17501750
],
17511751
"eventsBasedObjects": [
17521752
{
1753-
"defaultName": "Switch",
1753+
"defaultName": "ToggleSwitch",
17541754
"description": "A toggle switch that users can click or touch.",
17551755
"fullName": "Toggle switch",
17561756
"name": "SpriteToggleSwitch",
@@ -2070,7 +2070,6 @@
20702070
"description": "Check if is checked.",
20712071
"fullName": "Is checked",
20722072
"functionType": "Condition",
2073-
"group": "Switch finite state machine configuration",
20742073
"name": "IsChecked",
20752074
"sentence": "_PARAM0_ is checked",
20762075
"events": [
@@ -2114,7 +2113,6 @@
21142113
"description": "Change if is checked.",
21152114
"fullName": "Is checked",
21162115
"functionType": "Action",
2117-
"group": "Switch finite state machine configuration",
21182116
"name": "SetChecked",
21192117
"sentence": "_PARAM0_ is checked: _PARAM1_",
21202118
"events": [
@@ -2518,7 +2516,7 @@
25182516
{
25192517
"value": "true",
25202518
"type": "Boolean",
2521-
"label": "Is cheched",
2519+
"label": "Is checked",
25222520
"description": "",
25232521
"group": "",
25242522
"extraInformation": [],

0 commit comments

Comments
 (0)