Example.tscn 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. [gd_scene load_steps=11 format=2]
  2. [ext_resource path="res://addons/admob/test/Example.gd" type="Script" id=1]
  3. [ext_resource path="res://addons/admob/assets/icon-500.png" type="Texture" id=2]
  4. [ext_resource path="res://addons/admob/assets/poing.jpeg" type="Texture" id=3]
  5. [ext_resource path="res://addons/admob/assets/music.ogg" type="AudioStream" id=4]
  6. [ext_resource path="res://addons/admob/test/MusicCheckButton.gd" type="Script" id=5]
  7. [sub_resource type="StyleBoxFlat" id=1]
  8. bg_color = Color( 0.36377, 0.23226, 0.0795746, 1 )
  9. [sub_resource type="StyleBoxEmpty" id=2]
  10. [sub_resource type="Theme" id=3]
  11. TabContainer/styles/panel = SubResource( 2 )
  12. [sub_resource type="StyleBoxFlat" id=4]
  13. bg_color = Color( 0, 0, 0, 1 )
  14. [sub_resource type="StyleBoxFlat" id=5]
  15. bg_color = Color( 0, 0, 0, 1 )
  16. [node name="Example" type="Control"]
  17. anchor_right = 1.0
  18. anchor_bottom = 1.0
  19. script = ExtResource( 1 )
  20. __meta__ = {
  21. "_edit_lock_": true,
  22. "_edit_use_anchors_": false
  23. }
  24. [node name="Background" type="ColorRect" parent="."]
  25. anchor_right = 1.0
  26. anchor_bottom = 1.0
  27. color = Color( 1, 0.541176, 0, 1 )
  28. __meta__ = {
  29. "_edit_lock_": true,
  30. "_edit_use_anchors_": false
  31. }
  32. [node name="Poing" type="TextureRect" parent="Background"]
  33. anchor_left = 1.0
  34. anchor_top = 1.0
  35. anchor_right = 1.0
  36. anchor_bottom = 1.0
  37. margin_left = -100.0
  38. margin_top = -100.0
  39. texture = ExtResource( 3 )
  40. expand = true
  41. stretch_mode = 1
  42. __meta__ = {
  43. "_edit_use_anchors_": false
  44. }
  45. [node name="AdMob" type="TextureRect" parent="Background"]
  46. anchor_left = 0.5
  47. anchor_top = 0.5
  48. anchor_right = 0.5
  49. anchor_bottom = 0.5
  50. margin_left = -256.0
  51. margin_top = -256.0
  52. margin_right = 256.0
  53. margin_bottom = 256.0
  54. texture = ExtResource( 2 )
  55. stretch_mode = 6
  56. __meta__ = {
  57. "_edit_lock_": true
  58. }
  59. [node name="Advice" type="RichTextLabel" parent="Background"]
  60. anchor_top = 0.0933333
  61. anchor_right = 1.0
  62. anchor_bottom = 0.402222
  63. custom_styles/normal = SubResource( 1 )
  64. bbcode_enabled = true
  65. bbcode_text = "[wave]"
  66. scroll_following = true
  67. __meta__ = {
  68. "_edit_use_anchors_": true
  69. }
  70. [node name="TabContainer" type="TabContainer" parent="Background"]
  71. anchor_left = 0.145
  72. anchor_top = 0.546667
  73. anchor_right = 0.855
  74. anchor_bottom = 0.773333
  75. theme = SubResource( 3 )
  76. __meta__ = {
  77. "_edit_use_anchors_": true
  78. }
  79. [node name="AdFormats" type="Tabs" parent="Background/TabContainer"]
  80. anchor_right = 1.0
  81. anchor_bottom = 1.0
  82. margin_top = 24.0
  83. [node name="VBoxContainer" type="VBoxContainer" parent="Background/TabContainer/AdFormats"]
  84. anchor_right = 1.0
  85. anchor_bottom = 1.0
  86. alignment = 1
  87. __meta__ = {
  88. "_edit_use_anchors_": false
  89. }
  90. [node name="Banner" type="HBoxContainer" parent="Background/TabContainer/AdFormats/VBoxContainer"]
  91. margin_right = 727.0
  92. margin_bottom = 20.0
  93. size_flags_vertical = 0
  94. alignment = 1
  95. [node name="EnableBanner" type="Button" parent="Background/TabContainer/AdFormats/VBoxContainer/Banner"]
  96. margin_right = 361.0
  97. margin_bottom = 20.0
  98. size_flags_horizontal = 3
  99. disabled = true
  100. text = "ENABLE BANNER"
  101. __meta__ = {
  102. "_edit_use_anchors_": false
  103. }
  104. [node name="DisableBanner" type="Button" parent="Background/TabContainer/AdFormats/VBoxContainer/Banner"]
  105. margin_left = 365.0
  106. margin_right = 727.0
  107. margin_bottom = 20.0
  108. size_flags_horizontal = 3
  109. disabled = true
  110. text = "DISABLE BANNER"
  111. [node name="Banner2" type="HBoxContainer" parent="Background/TabContainer/AdFormats/VBoxContainer"]
  112. margin_top = 24.0
  113. margin_right = 727.0
  114. margin_bottom = 44.0
  115. size_flags_vertical = 0
  116. alignment = 1
  117. [node name="ShowBanner" type="Button" parent="Background/TabContainer/AdFormats/VBoxContainer/Banner2"]
  118. margin_right = 361.0
  119. margin_bottom = 20.0
  120. size_flags_horizontal = 3
  121. disabled = true
  122. text = "SHOW BANNER"
  123. __meta__ = {
  124. "_edit_use_anchors_": false
  125. }
  126. [node name="HideBanner" type="Button" parent="Background/TabContainer/AdFormats/VBoxContainer/Banner2"]
  127. margin_left = 365.0
  128. margin_right = 727.0
  129. margin_bottom = 20.0
  130. size_flags_horizontal = 3
  131. disabled = true
  132. text = "HIDE BANNER"
  133. [node name="Interstitial" type="Button" parent="Background/TabContainer/AdFormats/VBoxContainer"]
  134. margin_top = 48.0
  135. margin_right = 727.0
  136. margin_bottom = 68.0
  137. disabled = true
  138. text = "INTERSTITIAL"
  139. [node name="Rewarded" type="Button" parent="Background/TabContainer/AdFormats/VBoxContainer"]
  140. margin_top = 72.0
  141. margin_right = 727.0
  142. margin_bottom = 92.0
  143. disabled = true
  144. text = "REWARDED"
  145. [node name="RewardedInterstitial" type="Button" parent="Background/TabContainer/AdFormats/VBoxContainer"]
  146. margin_top = 96.0
  147. margin_right = 727.0
  148. margin_bottom = 116.0
  149. disabled = true
  150. text = "REWARDED INTERSTITIAL"
  151. [node name="Banner" type="Tabs" parent="Background/TabContainer"]
  152. visible = false
  153. anchor_right = 1.0
  154. anchor_bottom = 1.0
  155. margin_top = 24.0
  156. [node name="VBoxContainer" type="VBoxContainer" parent="Background/TabContainer/Banner"]
  157. anchor_right = 1.0
  158. anchor_bottom = 1.0
  159. alignment = 1
  160. __meta__ = {
  161. "_edit_use_anchors_": false
  162. }
  163. [node name="Control" type="Control" parent="Background/TabContainer/Banner/VBoxContainer"]
  164. margin_top = 58.0
  165. margin_right = 355.0
  166. margin_bottom = 68.0
  167. rect_min_size = Vector2( 0, 10 )
  168. [node name="Position" type="CheckBox" parent="Background/TabContainer/Banner/VBoxContainer"]
  169. margin_top = 72.0
  170. margin_right = 355.0
  171. margin_bottom = 88.0
  172. custom_styles/hover = SubResource( 4 )
  173. custom_styles/pressed = SubResource( 4 )
  174. custom_styles/normal = SubResource( 4 )
  175. pressed = true
  176. text = "Position on TOP"
  177. __meta__ = {
  178. "_edit_use_anchors_": false
  179. }
  180. [node name="RespectSafeArea" type="CheckBox" parent="Background/TabContainer/Banner/VBoxContainer"]
  181. margin_top = 92.0
  182. margin_right = 355.0
  183. margin_bottom = 108.0
  184. custom_styles/hover = SubResource( 4 )
  185. custom_styles/pressed = SubResource( 4 )
  186. custom_styles/normal = SubResource( 4 )
  187. text = "Respect Safe Area (RECOMMENDED TRUE)"
  188. [node name="BannerSizes" type="ItemList" parent="Background/TabContainer/Banner/VBoxContainer"]
  189. margin_top = 112.0
  190. margin_right = 355.0
  191. margin_bottom = 121.0
  192. auto_height = true
  193. same_column_width = true
  194. __meta__ = {
  195. "_edit_use_anchors_": true
  196. }
  197. [node name="UMP" type="Tabs" parent="Background/TabContainer"]
  198. visible = false
  199. anchor_right = 1.0
  200. anchor_bottom = 1.0
  201. margin_top = 24.0
  202. [node name="VBoxContainer" type="VBoxContainer" parent="Background/TabContainer/UMP"]
  203. anchor_right = 1.0
  204. anchor_bottom = 1.0
  205. alignment = 1
  206. __meta__ = {
  207. "_edit_use_anchors_": false
  208. }
  209. [node name="RequestUserConsent" type="Button" parent="Background/TabContainer/UMP/VBoxContainer"]
  210. margin_top = 67.0
  211. margin_right = 355.0
  212. margin_bottom = 87.0
  213. disabled = true
  214. text = "REQUEST USER CONSENT"
  215. [node name="ResetConsentState" type="Button" parent="Background/TabContainer/UMP/VBoxContainer"]
  216. margin_top = 91.0
  217. margin_right = 355.0
  218. margin_bottom = 111.0
  219. disabled = true
  220. text = "RESET CONSENT STATE"
  221. __meta__ = {
  222. "_edit_use_anchors_": false
  223. }
  224. [node name="General" type="Tabs" parent="Background/TabContainer"]
  225. visible = false
  226. anchor_right = 1.0
  227. anchor_bottom = 1.0
  228. margin_top = 24.0
  229. [node name="VBoxContainer" type="VBoxContainer" parent="Background/TabContainer/General"]
  230. anchor_right = 1.0
  231. anchor_bottom = 1.0
  232. alignment = 1
  233. __meta__ = {
  234. "_edit_use_anchors_": false
  235. }
  236. [node name="IsInitialized" type="Button" parent="Background/TabContainer/General/VBoxContainer"]
  237. margin_top = 31.0
  238. margin_right = 355.0
  239. margin_bottom = 51.0
  240. text = "is_initialized()"
  241. [node name="IsBannerLoaded" type="Button" parent="Background/TabContainer/General/VBoxContainer"]
  242. margin_top = 55.0
  243. margin_right = 355.0
  244. margin_bottom = 75.0
  245. text = "is_banner_loaded()"
  246. [node name="IsInterstitialLoaded" type="Button" parent="Background/TabContainer/General/VBoxContainer"]
  247. margin_top = 79.0
  248. margin_right = 355.0
  249. margin_bottom = 99.0
  250. text = "is_interstitial_loaded()"
  251. __meta__ = {
  252. "_edit_use_anchors_": false
  253. }
  254. [node name="IsRewardedLoaded" type="Button" parent="Background/TabContainer/General/VBoxContainer"]
  255. margin_top = 103.0
  256. margin_right = 355.0
  257. margin_bottom = 123.0
  258. text = "is_rewarded_loaded()"
  259. __meta__ = {
  260. "_edit_use_anchors_": false
  261. }
  262. [node name="IsRewardedInterstitialLoaded" type="Button" parent="Background/TabContainer/General/VBoxContainer"]
  263. margin_top = 127.0
  264. margin_right = 355.0
  265. margin_bottom = 147.0
  266. text = "is_rewarded_interstitial_loaded()"
  267. __meta__ = {
  268. "_edit_use_anchors_": false
  269. }
  270. [node name="MusicCheckButton" type="CheckButton" parent="Background"]
  271. anchor_left = 1.0
  272. anchor_top = 0.5
  273. anchor_right = 1.0
  274. anchor_bottom = 0.5
  275. margin_left = -110.0
  276. margin_top = -84.0
  277. margin_bottom = -44.0
  278. custom_styles/hover = SubResource( 5 )
  279. custom_styles/pressed = SubResource( 5 )
  280. custom_styles/normal = SubResource( 5 )
  281. pressed = true
  282. text = "MUSIC"
  283. script = ExtResource( 5 )
  284. [node name="Music" type="AudioStreamPlayer" parent="Background/MusicCheckButton"]
  285. stream = ExtResource( 4 )
  286. [connection signal="pressed" from="Background/TabContainer/AdFormats/VBoxContainer/Banner/EnableBanner" to="." method="_on_EnableBanner_pressed"]
  287. [connection signal="pressed" from="Background/TabContainer/AdFormats/VBoxContainer/Banner/DisableBanner" to="." method="_on_DisableBanner_pressed"]
  288. [connection signal="pressed" from="Background/TabContainer/AdFormats/VBoxContainer/Banner2/ShowBanner" to="." method="_on_ShowBanner_pressed"]
  289. [connection signal="pressed" from="Background/TabContainer/AdFormats/VBoxContainer/Banner2/HideBanner" to="." method="_on_HideBanner_pressed"]
  290. [connection signal="pressed" from="Background/TabContainer/AdFormats/VBoxContainer/Interstitial" to="." method="_on_Interstitial_pressed"]
  291. [connection signal="pressed" from="Background/TabContainer/AdFormats/VBoxContainer/Rewarded" to="." method="_on_Rewarded_pressed"]
  292. [connection signal="pressed" from="Background/TabContainer/AdFormats/VBoxContainer/RewardedInterstitial" to="." method="_on_RewardedInterstitial_pressed"]
  293. [connection signal="pressed" from="Background/TabContainer/Banner/VBoxContainer/Position" to="." method="_on_Position_pressed"]
  294. [connection signal="pressed" from="Background/TabContainer/Banner/VBoxContainer/RespectSafeArea" to="." method="_on_RespectSafeArea_pressed"]
  295. [connection signal="item_selected" from="Background/TabContainer/Banner/VBoxContainer/BannerSizes" to="." method="_on_BannerSizes_item_selected"]
  296. [connection signal="pressed" from="Background/TabContainer/UMP/VBoxContainer/RequestUserConsent" to="." method="_on_RequestUserConsent_pressed"]
  297. [connection signal="pressed" from="Background/TabContainer/UMP/VBoxContainer/ResetConsentState" to="." method="_on_ResetConsentState_pressed"]
  298. [connection signal="pressed" from="Background/TabContainer/General/VBoxContainer/IsInitialized" to="." method="_on_IsInitialized_pressed"]
  299. [connection signal="pressed" from="Background/TabContainer/General/VBoxContainer/IsBannerLoaded" to="." method="_on_IsBannerLoaded_pressed"]
  300. [connection signal="pressed" from="Background/TabContainer/General/VBoxContainer/IsInterstitialLoaded" to="." method="_on_IsInterstitialLoaded_pressed"]
  301. [connection signal="pressed" from="Background/TabContainer/General/VBoxContainer/IsRewardedLoaded" to="." method="_on_IsRewardedLoaded_pressed"]
  302. [connection signal="pressed" from="Background/TabContainer/General/VBoxContainer/IsRewardedInterstitialLoaded" to="." method="_on_IsRewardedInterstitialLoaded_pressed"]
  303. [connection signal="pressed" from="Background/MusicCheckButton" to="Background/MusicCheckButton" method="_on_MusicCheckButton_pressed"]