Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: safe area change value working #67

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/admob/src/core/AdMobEditor.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_fonts/font = ExtResource("2_rabx0")
theme_override_font_sizes/font_size = 24
theme_override_styles/normal = SubResource("StyleBoxFlat_d4upu")
text = "Version: 1.3.2"
text = "Version: v1.0.0"
script = ExtResource("15")

[connection signal="pressed" from="TopPanel/Icons/AndroidButton" to="." method="_on_AndroidButton_pressed"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ func _on_BannerShowInstantly_pressed():
func _on_BannerOnTop_pressed():
AdMobEditor.AdMobSettings.config.banner.position = int($BannerOnTop.pressed)

func _on_RespectSafeArea_value_changed(value : bool):
func _on_respect_safe_area_value_changed(value):
AdMobEditor.AdMobSettings.config.banner.respect_safe_area = value
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ layout_mode = 2

[connection signal="item_selected" from="BannerSizeHBoxContainer/BannerSize" to="." method="_on_BannerSize_item_selected"]
[connection signal="pressed" from="RespectSafeArea" to="RespectSafeArea" method="_on_RespectSafeArea_pressed"]
[connection signal="value_changed" from="RespectSafeArea" to="." method="_on_respect_safe_area_value_changed"]
[connection signal="confirmed" from="RespectSafeArea/ConfirmationDialog" to="RespectSafeArea" method="_on_ConfirmationDialog_confirmed"]
[connection signal="pressed" from="BannerShowInstantly" to="." method="_on_BannerShowInstantly_pressed"]
[connection signal="pressed" from="BannerOnTop" to="." method="_on_BannerOnTop_pressed"]
4 changes: 2 additions & 2 deletions addons/admob/test/Example.gd
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ func _on_RequestUserConsent_pressed() -> void:


func _on_Position_pressed() -> void:
MobileAds.config.banner.position = BannerPosition.pressed
MobileAds.config.banner.position = BannerPosition.button_pressed
if MobileAds.get_is_banner_loaded():
MobileAds.load_banner()

func _on_RespectSafeArea_pressed():
MobileAds.config.banner.respect_safe_area = RespectSafeArea.pressed
MobileAds.config.banner.respect_safe_area = RespectSafeArea.button_pressed
if MobileAds.get_is_banner_loaded():
MobileAds.load_banner()

Expand Down
2 changes: 1 addition & 1 deletion addons/admob/test/Example.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ offset_top = -100.0
grow_horizontal = 0
grow_vertical = 0
texture = ExtResource("2_qpj7y")
ignore_texture_size = true
expand_mode = 1

[node name="AdMob" type="TextureRect" parent="Background"]
layout_mode = 1
Expand Down
9 changes: 4 additions & 5 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ config={

config/name="AdMobAddon"
run/main_scene="res://addons/admob/test/Example.tscn"
config/features=PackedStringArray("4.0")
config/features=PackedStringArray("4.0", "GL Compatibility")
config/icon="res://addons/admob/assets/icon-76.png"

[autoload]
Expand All @@ -97,7 +97,6 @@ common/enable_pause_aware_picking=true

[rendering]

quality/driver/driver_name="GLES2"
vram_compression/import_etc=true
vram_compression/import_etc2=false
vram_compression/import_pvrtc=true
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"
textures/vram_compression/import_etc2_astc=true