main.tscn 2.5 KB

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