main.tscn 2.3 KB

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