Skip to content

Commit e3e20ca

Browse files
authored
[Reviewed] [Panel sprite button] Use the alignment property of the TextObject (#695)
* [Reviewed] [Panel sprite button] Use the alignment property of the TextObject.
1 parent 16d229e commit e3e20ca

File tree

1 file changed

+63
-25
lines changed

1 file changed

+63
-25
lines changed

extensions/reviewed/PanelSpriteButton.json

Lines changed: 63 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "PanelSpriteButton",
99
"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",
1010
"shortDescription": "A button that can be customized.",
11-
"version": "1.1.3",
11+
"version": "1.2.0",
1212
"description": "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.",
1313
"origin": {
1414
"identifier": "PanelSpriteButton",
@@ -1295,6 +1295,55 @@
12951295
],
12961296
"objectGroups": []
12971297
},
1298+
{
1299+
"description": "Check if the button is currently being pressed outside with mouse or touch.",
1300+
"fullName": "Is held outside",
1301+
"functionType": "Condition",
1302+
"name": "IsPressedOutside",
1303+
"sentence": "_PARAM0_ is held outside",
1304+
"events": [
1305+
{
1306+
"type": "BuiltinCommonInstructions::Standard",
1307+
"conditions": [
1308+
{
1309+
"type": {
1310+
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
1311+
},
1312+
"parameters": [
1313+
"Object",
1314+
"Behavior",
1315+
"=",
1316+
"\"PressedOutside\""
1317+
]
1318+
}
1319+
],
1320+
"actions": [
1321+
{
1322+
"type": {
1323+
"value": "SetReturnBoolean"
1324+
},
1325+
"parameters": [
1326+
"True"
1327+
]
1328+
}
1329+
]
1330+
}
1331+
],
1332+
"parameters": [
1333+
{
1334+
"description": "Object",
1335+
"name": "Object",
1336+
"type": "object"
1337+
},
1338+
{
1339+
"description": "Behavior",
1340+
"name": "Behavior",
1341+
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
1342+
"type": "behavior"
1343+
}
1344+
],
1345+
"objectGroups": []
1346+
},
12981347
{
12991348
"fullName": "Should check mouse position",
13001349
"functionType": "Condition",
@@ -1577,15 +1626,6 @@
15771626
"2"
15781627
]
15791628
},
1580-
{
1581-
"type": {
1582-
"value": "TextObject::SetTextAlignment"
1583-
},
1584-
"parameters": [
1585-
"Label",
1586-
"\"center\""
1587-
]
1588-
},
15891629
{
15901630
"type": {
15911631
"value": "TextObject::SetWrapping"
@@ -2551,16 +2591,6 @@
25512591
"Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()"
25522592
]
25532593
},
2554-
{
2555-
"type": {
2556-
"value": "TextObject::WrappingWidth"
2557-
},
2558-
"parameters": [
2559-
"Label",
2560-
"=",
2561-
"Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()"
2562-
]
2563-
},
25642594
{
25652595
"type": {
25662596
"value": "SetCenterY"
@@ -2661,7 +2691,9 @@
26612691
"label": "Left padding",
26622692
"description": "",
26632693
"group": "Padding",
2664-
"extraInformation": [],
2694+
"extraInformation": [
2695+
"Label"
2696+
],
26652697
"hidden": false,
26662698
"name": "LeftPadding"
26672699
},
@@ -2671,7 +2703,9 @@
26712703
"label": "Right padding",
26722704
"description": "",
26732705
"group": "Padding",
2674-
"extraInformation": [],
2706+
"extraInformation": [
2707+
"Label"
2708+
],
26752709
"hidden": false,
26762710
"name": "RightPadding"
26772711
},
@@ -2681,7 +2715,9 @@
26812715
"label": "Top padding",
26822716
"description": "",
26832717
"group": "Padding",
2684-
"extraInformation": [],
2718+
"extraInformation": [
2719+
"Label"
2720+
],
26852721
"hidden": false,
26862722
"name": "TopPadding"
26872723
},
@@ -2691,7 +2727,9 @@
26912727
"label": "Bottom padding",
26922728
"description": "",
26932729
"group": "Padding",
2694-
"extraInformation": [],
2730+
"extraInformation": [
2731+
"Label"
2732+
],
26952733
"hidden": false,
26962734
"name": "BottomPadding"
26972735
},
@@ -2721,7 +2759,7 @@
27212759
"behaviors": [],
27222760
"string": "Text",
27232761
"font": "",
2724-
"textAlignment": "center",
2762+
"textAlignment": "",
27252763
"characterSize": 20,
27262764
"color": {
27272765
"b": 0,

0 commit comments

Comments
 (0)