main.tscn 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. [gd_scene load_steps=2 format=3 uid="uid://ba8dxewtq7kxv"]
  2. [ext_resource type="Script" path="res://iap_demo.gd" id="1"]
  3. [node name="Control" type="Control"]
  4. layout_mode = 3
  5. anchors_preset = 8
  6. anchor_left = 0.5
  7. anchor_top = 0.5
  8. anchor_right = 0.5
  9. anchor_bottom = 0.5
  10. offset_left = -512.711
  11. offset_top = -300.0
  12. offset_right = 511.289
  13. offset_bottom = 300.0
  14. grow_horizontal = 2
  15. grow_vertical = 2
  16. size_flags_horizontal = 2
  17. size_flags_vertical = 2
  18. script = ExtResource("1")
  19. [node name="AlertDialog" type="AcceptDialog" parent="."]
  20. dialog_autowrap = true
  21. [node name="Label" type="Label" parent="."]
  22. layout_mode = 0
  23. offset_left = 300.0
  24. offset_top = 40.0
  25. offset_right = 996.0
  26. offset_bottom = 156.0
  27. size_flags_horizontal = 2
  28. size_flags_vertical = 0
  29. text = "To test in-app purchase on an Android device:
  30. 1. Make sure you have enabled \"Custom Build\" and the GodotPayment plugin in your Android export settings.
  31. 2. Export APK and upload it as alpha or beta stage to Google Play Developer Console and publish it. (It's not published to public, but you and other testers can access it.)
  32. 3. There should be an activate in-app item. Copy its SKU into the TEST_ITEM_SKU constant in iap_demo.gd.
  33. 4. Changes you make in the Play Console may take some time before taking effect."
  34. autowrap_mode = 2
  35. [node name="QuerySkuDetailsButton" type="Button" parent="."]
  36. layout_mode = 0
  37. offset_left = 40.5697
  38. offset_top = 39.9347
  39. offset_right = 221.57
  40. offset_bottom = 91.9347
  41. text = "Query SKU details"
  42. [node name="PurchaseButton" type="Button" parent="."]
  43. layout_mode = 0
  44. offset_left = 40.5697
  45. offset_top = 109.203
  46. offset_right = 221.57
  47. offset_bottom = 161.203
  48. text = "Purchase"
  49. [node name="ConsumeButton" type="Button" parent="."]
  50. layout_mode = 0
  51. offset_left = 40.5697
  52. offset_top = 178.142
  53. offset_right = 221.57
  54. offset_bottom = 230.142
  55. text = "Consume"
  56. [connection signal="pressed" from="QuerySkuDetailsButton" to="." method="_on_QuerySkuDetailsButton_pressed"]
  57. [connection signal="pressed" from="PurchaseButton" to="." method="_on_PurchaseButton_pressed"]
  58. [connection signal="pressed" from="ConsumeButton" to="." method="_on_ConsumeButton_pressed"]