Skip to content

Commit 6db3ec5

Browse files
authored
[Reviewed] [Button] Allow to use bitmap text for the label (#1761)
1 parent 162f8ca commit 6db3ec5

1 file changed

Lines changed: 53 additions & 8 deletions

File tree

extensions/reviewed/PanelSpriteButton.json

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "PanelSpriteButton",
1010
"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",
1111
"shortDescription": "A button that can be customized.",
12-
"version": "2.0.0",
12+
"version": "2.1.0",
1313
"description": [
1414
"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.",
1515
"",
@@ -1337,6 +1337,36 @@
13371337
"useLegacyBottomAndRightAnchors": false
13381338
}
13391339
]
1340+
},
1341+
{
1342+
"assetStoreId": "",
1343+
"name": "BitmapLabel",
1344+
"type": "BitmapText::BitmapTextObject",
1345+
"variables": [],
1346+
"effects": [],
1347+
"behaviors": [
1348+
{
1349+
"name": "Anchor",
1350+
"type": "AnchorBehavior::AnchorBehavior",
1351+
"bottomEdgeAnchor": 4,
1352+
"topEdgeAnchor": 4,
1353+
"leftEdgeAnchor": 1,
1354+
"relativeToOriginalWindowSize": true,
1355+
"rightEdgeAnchor": 2,
1356+
"useLegacyBottomAndRightAnchors": false
1357+
}
1358+
],
1359+
"content": {
1360+
"text": "Text",
1361+
"opacity": 255,
1362+
"scale": 1,
1363+
"fontSize": 20,
1364+
"tint": "255;255;255",
1365+
"bitmapFontResourceName": "",
1366+
"textureAtlasResourceName": "",
1367+
"align": "center",
1368+
"verticalTextAlignment": "center"
1369+
}
13401370
}
13411371
],
13421372
"objectsFolderStructure": {
@@ -1345,6 +1375,9 @@
13451375
{
13461376
"objectName": "Label"
13471377
},
1378+
{
1379+
"objectName": "BitmapLabel"
1380+
},
13481381
{
13491382
"objectName": "Idle"
13501383
},
@@ -1370,6 +1403,17 @@
13701403
"name": "Pressed"
13711404
}
13721405
]
1406+
},
1407+
{
1408+
"name": "Labels",
1409+
"objects": [
1410+
{
1411+
"name": "Label"
1412+
},
1413+
{
1414+
"name": "BitmapLabel"
1415+
}
1416+
]
13731417
}
13741418
],
13751419
"layers": [
@@ -1546,7 +1590,7 @@
15461590
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
15471591
},
15481592
"parameters": [
1549-
"Label",
1593+
"Labels",
15501594
"Text",
15511595
"=",
15521596
"LabelText"
@@ -1622,7 +1666,7 @@
16221666
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
16231667
},
16241668
"parameters": [
1625-
"Label",
1669+
"Labels",
16261670
"Text",
16271671
"=",
16281672
"LabelText"
@@ -2262,7 +2306,7 @@
22622306
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
22632307
},
22642308
"parameters": [
2265-
"Label",
2309+
"Labels",
22662310
"Text",
22672311
"=",
22682312
"Value"
@@ -2302,7 +2346,7 @@
23022346
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
23032347
},
23042348
"parameters": [
2305-
"Label",
2349+
"Labels",
23062350
"Text",
23072351
"=",
23082352
"Value"
@@ -2337,7 +2381,7 @@
23372381
"value": "SetReturnString"
23382382
},
23392383
"parameters": [
2340-
"Label.Text::Value()"
2384+
"Labels.Text::Value()"
23412385
]
23422386
}
23432387
]
@@ -2529,7 +2573,7 @@
25292573
"value": "SetCenterY"
25302574
},
25312575
"parameters": [
2532-
"Label",
2576+
"Labels",
25332577
"+",
25342578
"Value - LabelOffset"
25352579
]
@@ -2594,7 +2638,8 @@
25942638
"type": "Choice",
25952639
"label": "",
25962640
"extraInformation": [
2597-
"Label.Text=LabelText"
2641+
"Label.Text=LabelText",
2642+
"BitmapLabel.Text=LabelText"
25982643
],
25992644
"hidden": true,
26002645
"name": "_PropertyMapping"

0 commit comments

Comments
 (0)