|
3946 | 3946 | }, |
3947 | 3947 | { |
3948 | 3948 | "type": "BuiltinCommonInstructions::Standard", |
3949 | | - "conditions": [], |
3950 | | - "actions": [] |
| 3949 | + "conditions": [ |
| 3950 | + { |
| 3951 | + "type": { |
| 3952 | + "value": "KeyPressed" |
| 3953 | + }, |
| 3954 | + "parameters": [ |
| 3955 | + "", |
| 3956 | + "d" |
| 3957 | + ] |
| 3958 | + }, |
| 3959 | + { |
| 3960 | + "type": { |
| 3961 | + "value": "BuiltinCommonInstructions::Once" |
| 3962 | + }, |
| 3963 | + "parameters": [] |
| 3964 | + } |
| 3965 | + ], |
| 3966 | + "actions": [ |
| 3967 | + { |
| 3968 | + "type": { |
| 3969 | + "value": "PanelSpriteButton::PanelSpriteButton::Activate" |
| 3970 | + }, |
| 3971 | + "parameters": [ |
| 3972 | + "YellowButton", |
| 3973 | + "", |
| 3974 | + "" |
| 3975 | + ] |
| 3976 | + } |
| 3977 | + ] |
| 3978 | + }, |
| 3979 | + { |
| 3980 | + "type": "BuiltinCommonInstructions::Standard", |
| 3981 | + "conditions": [ |
| 3982 | + { |
| 3983 | + "type": { |
| 3984 | + "value": "KeyReleased" |
| 3985 | + }, |
| 3986 | + "parameters": [ |
| 3987 | + "", |
| 3988 | + "d" |
| 3989 | + ] |
| 3990 | + } |
| 3991 | + ], |
| 3992 | + "actions": [ |
| 3993 | + { |
| 3994 | + "type": { |
| 3995 | + "value": "PanelSpriteButton::PanelSpriteButton::Activate" |
| 3996 | + }, |
| 3997 | + "parameters": [ |
| 3998 | + "YellowButton", |
| 3999 | + "yes", |
| 4000 | + "" |
| 4001 | + ] |
| 4002 | + } |
| 4003 | + ] |
3951 | 4004 | } |
3952 | 4005 | ], |
3953 | 4006 | "layers": [ |
|
12132 | 12185 | "name": "PanelSpriteButton", |
12133 | 12186 | "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", |
12134 | 12187 | "shortDescription": "A button that can be customized.", |
12135 | | - "version": "1.3.1", |
| 12188 | + "version": "1.4.0", |
12136 | 12189 | "description": [ |
12137 | 12190 | "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.", |
12138 | 12191 | "", |
|
12810 | 12863 | ], |
12811 | 12864 | "objectGroups": [] |
12812 | 12865 | }, |
| 12866 | + { |
| 12867 | + "fullName": "", |
| 12868 | + "functionType": "Action", |
| 12869 | + "name": "onDeActivate", |
| 12870 | + "sentence": "", |
| 12871 | + "events": [ |
| 12872 | + { |
| 12873 | + "type": "BuiltinCommonInstructions::Standard", |
| 12874 | + "conditions": [], |
| 12875 | + "actions": [ |
| 12876 | + { |
| 12877 | + "type": { |
| 12878 | + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" |
| 12879 | + }, |
| 12880 | + "parameters": [ |
| 12881 | + "Object", |
| 12882 | + "Behavior", |
| 12883 | + "=", |
| 12884 | + "\"Idle\"" |
| 12885 | + ] |
| 12886 | + }, |
| 12887 | + { |
| 12888 | + "type": { |
| 12889 | + "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" |
| 12890 | + }, |
| 12891 | + "parameters": [ |
| 12892 | + "Object", |
| 12893 | + "Behavior", |
| 12894 | + "=", |
| 12895 | + "0" |
| 12896 | + ] |
| 12897 | + } |
| 12898 | + ] |
| 12899 | + } |
| 12900 | + ], |
| 12901 | + "parameters": [ |
| 12902 | + { |
| 12903 | + "description": "Object", |
| 12904 | + "name": "Object", |
| 12905 | + "type": "object" |
| 12906 | + }, |
| 12907 | + { |
| 12908 | + "description": "Behavior", |
| 12909 | + "name": "Behavior", |
| 12910 | + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", |
| 12911 | + "type": "behavior" |
| 12912 | + } |
| 12913 | + ], |
| 12914 | + "objectGroups": [] |
| 12915 | + }, |
12813 | 12916 | { |
12814 | 12917 | "description": "Check if the button is not used.", |
12815 | 12918 | "fullName": "Is idle", |
|
13246 | 13349 | { |
13247 | 13350 | "defaultName": "Button", |
13248 | 13351 | "description": "A button that can be customized.", |
13249 | | - "fullName": "Panel sprite button", |
| 13352 | + "fullName": "Button (panel sprite)", |
13250 | 13353 | "name": "PanelSpriteButton", |
13251 | 13354 | "eventsFunctions": [ |
13252 | 13355 | { |
@@ -14421,6 +14524,122 @@ |
14421 | 14524 | ] |
14422 | 14525 | } |
14423 | 14526 | ] |
| 14527 | + }, |
| 14528 | + { |
| 14529 | + "description": "De/activate interactions with the button.", |
| 14530 | + "fullName": "De/activate interactions", |
| 14531 | + "functionType": "Action", |
| 14532 | + "name": "Activate", |
| 14533 | + "sentence": "De/activate interactions with _PARAM0_", |
| 14534 | + "events": [ |
| 14535 | + { |
| 14536 | + "type": "BuiltinCommonInstructions::Standard", |
| 14537 | + "conditions": [ |
| 14538 | + { |
| 14539 | + "type": { |
| 14540 | + "value": "GetArgumentAsBoolean" |
| 14541 | + }, |
| 14542 | + "parameters": [ |
| 14543 | + "\"ShouldActivate\"" |
| 14544 | + ] |
| 14545 | + } |
| 14546 | + ], |
| 14547 | + "actions": [ |
| 14548 | + { |
| 14549 | + "type": { |
| 14550 | + "value": "ActivateBehavior" |
| 14551 | + }, |
| 14552 | + "parameters": [ |
| 14553 | + "Idle", |
| 14554 | + "ButtonFSM", |
| 14555 | + "yes" |
| 14556 | + ] |
| 14557 | + } |
| 14558 | + ] |
| 14559 | + }, |
| 14560 | + { |
| 14561 | + "type": "BuiltinCommonInstructions::Standard", |
| 14562 | + "conditions": [ |
| 14563 | + { |
| 14564 | + "type": { |
| 14565 | + "inverted": true, |
| 14566 | + "value": "GetArgumentAsBoolean" |
| 14567 | + }, |
| 14568 | + "parameters": [ |
| 14569 | + "\"ShouldActivate\"" |
| 14570 | + ] |
| 14571 | + } |
| 14572 | + ], |
| 14573 | + "actions": [ |
| 14574 | + { |
| 14575 | + "type": { |
| 14576 | + "value": "ActivateBehavior" |
| 14577 | + }, |
| 14578 | + "parameters": [ |
| 14579 | + "Idle", |
| 14580 | + "ButtonFSM", |
| 14581 | + "no" |
| 14582 | + ] |
| 14583 | + } |
| 14584 | + ] |
| 14585 | + } |
| 14586 | + ], |
| 14587 | + "parameters": [ |
| 14588 | + { |
| 14589 | + "description": "Object", |
| 14590 | + "name": "Object", |
| 14591 | + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", |
| 14592 | + "type": "object" |
| 14593 | + }, |
| 14594 | + { |
| 14595 | + "description": "Activate", |
| 14596 | + "name": "ShouldActivate", |
| 14597 | + "type": "yesorno" |
| 14598 | + } |
| 14599 | + ], |
| 14600 | + "objectGroups": [] |
| 14601 | + }, |
| 14602 | + { |
| 14603 | + "description": "Check if interactions are activated on the button.", |
| 14604 | + "fullName": "Interactions activated", |
| 14605 | + "functionType": "Condition", |
| 14606 | + "name": "IsActivated", |
| 14607 | + "sentence": "Interactions on _PARAM0_ are activated", |
| 14608 | + "events": [ |
| 14609 | + { |
| 14610 | + "type": "BuiltinCommonInstructions::Standard", |
| 14611 | + "conditions": [ |
| 14612 | + { |
| 14613 | + "type": { |
| 14614 | + "value": "BehaviorActivated" |
| 14615 | + }, |
| 14616 | + "parameters": [ |
| 14617 | + "Idle", |
| 14618 | + "ButtonFSM" |
| 14619 | + ] |
| 14620 | + } |
| 14621 | + ], |
| 14622 | + "actions": [ |
| 14623 | + { |
| 14624 | + "type": { |
| 14625 | + "value": "SetReturnBoolean" |
| 14626 | + }, |
| 14627 | + "parameters": [ |
| 14628 | + "True" |
| 14629 | + ] |
| 14630 | + } |
| 14631 | + ] |
| 14632 | + } |
| 14633 | + ], |
| 14634 | + "parameters": [ |
| 14635 | + { |
| 14636 | + "description": "Object", |
| 14637 | + "name": "Object", |
| 14638 | + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", |
| 14639 | + "type": "object" |
| 14640 | + } |
| 14641 | + ], |
| 14642 | + "objectGroups": [] |
14424 | 14643 | } |
14425 | 14644 | ], |
14426 | 14645 | "propertyDescriptors": [ |
|
0 commit comments