|
8 | 8 | "name": "PanelSpriteButton", |
9 | 9 | "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", |
10 | 10 | "shortDescription": "A button that can be customized.", |
11 | | - "version": "1.1.3", |
| 11 | + "version": "1.2.0", |
12 | 12 | "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.", |
13 | 13 | "origin": { |
14 | 14 | "identifier": "PanelSpriteButton", |
|
1295 | 1295 | ], |
1296 | 1296 | "objectGroups": [] |
1297 | 1297 | }, |
| 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 | + }, |
1298 | 1347 | { |
1299 | 1348 | "fullName": "Should check mouse position", |
1300 | 1349 | "functionType": "Condition", |
|
1577 | 1626 | "2" |
1578 | 1627 | ] |
1579 | 1628 | }, |
1580 | | - { |
1581 | | - "type": { |
1582 | | - "value": "TextObject::SetTextAlignment" |
1583 | | - }, |
1584 | | - "parameters": [ |
1585 | | - "Label", |
1586 | | - "\"center\"" |
1587 | | - ] |
1588 | | - }, |
1589 | 1629 | { |
1590 | 1630 | "type": { |
1591 | 1631 | "value": "TextObject::SetWrapping" |
|
2551 | 2591 | "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" |
2552 | 2592 | ] |
2553 | 2593 | }, |
2554 | | - { |
2555 | | - "type": { |
2556 | | - "value": "TextObject::WrappingWidth" |
2557 | | - }, |
2558 | | - "parameters": [ |
2559 | | - "Label", |
2560 | | - "=", |
2561 | | - "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" |
2562 | | - ] |
2563 | | - }, |
2564 | 2594 | { |
2565 | 2595 | "type": { |
2566 | 2596 | "value": "SetCenterY" |
|
2661 | 2691 | "label": "Left padding", |
2662 | 2692 | "description": "", |
2663 | 2693 | "group": "Padding", |
2664 | | - "extraInformation": [], |
| 2694 | + "extraInformation": [ |
| 2695 | + "Label" |
| 2696 | + ], |
2665 | 2697 | "hidden": false, |
2666 | 2698 | "name": "LeftPadding" |
2667 | 2699 | }, |
|
2671 | 2703 | "label": "Right padding", |
2672 | 2704 | "description": "", |
2673 | 2705 | "group": "Padding", |
2674 | | - "extraInformation": [], |
| 2706 | + "extraInformation": [ |
| 2707 | + "Label" |
| 2708 | + ], |
2675 | 2709 | "hidden": false, |
2676 | 2710 | "name": "RightPadding" |
2677 | 2711 | }, |
|
2681 | 2715 | "label": "Top padding", |
2682 | 2716 | "description": "", |
2683 | 2717 | "group": "Padding", |
2684 | | - "extraInformation": [], |
| 2718 | + "extraInformation": [ |
| 2719 | + "Label" |
| 2720 | + ], |
2685 | 2721 | "hidden": false, |
2686 | 2722 | "name": "TopPadding" |
2687 | 2723 | }, |
|
2691 | 2727 | "label": "Bottom padding", |
2692 | 2728 | "description": "", |
2693 | 2729 | "group": "Padding", |
2694 | | - "extraInformation": [], |
| 2730 | + "extraInformation": [ |
| 2731 | + "Label" |
| 2732 | + ], |
2695 | 2733 | "hidden": false, |
2696 | 2734 | "name": "BottomPadding" |
2697 | 2735 | }, |
|
2721 | 2759 | "behaviors": [], |
2722 | 2760 | "string": "Text", |
2723 | 2761 | "font": "", |
2724 | | - "textAlignment": "center", |
| 2762 | + "textAlignment": "", |
2725 | 2763 | "characterSize": 20, |
2726 | 2764 | "color": { |
2727 | 2765 | "b": 0, |
|
0 commit comments