Skip to content

Commit

Permalink
remove donation and rate buttons, now f-droid and other stores are ex…
Browse files Browse the repository at this point in the history
…aclty the same
  • Loading branch information
dulvui committed Oct 2, 2024
1 parent f8774e6 commit 2805e4f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 55 deletions.
2 changes: 0 additions & 2 deletions game/src/global/Global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ extends Node
# increase to show 'Whats new' screen
var version:String = "9"

const FDROID:bool = false

var first_fade_in:bool = true

var sfx:bool
Expand Down
9 changes: 0 additions & 9 deletions game/src/ui/info/Info.gd
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
extends Control

func _ready() -> void:
$VBoxContainer/Buttons/Donate.visible = Global.FDROID or OS.get_name() == "HTML5"
$VBoxContainer/Buttons/Website.visible = not $VBoxContainer/Buttons/Donate.visible


func _on_Website_pressed() -> void:
Global.click()
Expand All @@ -20,11 +16,6 @@ func _on_RichTextLabel_meta_clicked(meta:String) -> void:
Global.click()


func _on_Donate_pressed() -> void:
Global.click()
OS.shell_open("https://simondalvai.org/donate")


func _on_Join_pressed() -> void:
Global.click()
OS.shell_open("https://github.com/dulvui/pocket-broomball#join-with-your-broomball-team")
Expand Down
15 changes: 0 additions & 15 deletions game/src/ui/info/Info.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ Godot Engine by Juan Linietsky, Ariel Manzur and contributors
MIT
[url=https://godotengine.org/license]godotengine.org/license[/url]
\"Smoothing addon\"
Copyright: 2019 Lawnjelly [url=https://github.com/lawnjelly/smoothing-addon][/url]
License: MIT
[b]Audio[/b]
\"Chill music\"
Copyright: 2016 furbyguy[url=https://freesound.org/people/furbyguy/sounds/365187/]freesound.org/people/furbyguy/sounds/365187/[/url]
Expand Down Expand Up @@ -129,10 +125,6 @@ Godot Engine by Juan Linietsky, Ariel Manzur and contributors
MIT
godotengine.org/license
\"Smoothing addon\"
Copyright: 2019 Lawnjelly
License: MIT
Audio
\"Chill music\"
Copyright: 2016 furbyguyfreesound.org/people/furbyguy/sounds/365187/
Expand Down Expand Up @@ -209,12 +201,6 @@ margin_right = 540.0
margin_bottom = 72.0
text = "WEBSITE"

[node name="Donate" type="Button" parent="VBoxContainer/Buttons"]
visible = false
margin_right = 540.0
margin_bottom = 72.0
text = "DONATE"

[node name="Github" type="Button" parent="VBoxContainer/Buttons"]
visible = false
margin_top = 82.0
Expand All @@ -236,7 +222,6 @@ text = "GO_BACK"

[connection signal="meta_clicked" from="VBoxContainer/RichTextLabel" to="." method="_on_RichTextLabel_meta_clicked"]
[connection signal="pressed" from="VBoxContainer/Buttons/Website" to="." method="_on_Website_pressed"]
[connection signal="pressed" from="VBoxContainer/Buttons/Donate" to="." method="_on_Donate_pressed"]
[connection signal="pressed" from="VBoxContainer/Buttons/Github" to="." method="_on_Github_pressed"]
[connection signal="pressed" from="VBoxContainer/Buttons/Join" to="." method="_on_Join_pressed"]
[connection signal="pressed" from="VBoxContainer/Buttons/Back" to="." method="_on_Back_pressed"]
23 changes: 8 additions & 15 deletions game/src/ui/settings/Settings.gd
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ const FLAGS:Dictionary = {

onready var flag:TextureRect = $VBoxContainer/Language/Flag


func _ready() -> void:
$VBoxContainer/RoundLimit.set_text(tr("ROUNDLIMIT") + " " +str(Global.round_limit))

update_dynamic_labels()

if Global.FDROID:
$VBoxContainer/RateAndReview.hide()


func _on_RoundLimit_pressed() -> void:
Global.click()
Expand All @@ -48,8 +47,8 @@ func _on_Music_pressed() -> void:

if Global.sfx:
Global.click()


func _on_Sfx_pressed() -> void:
if Global.sfx:
$VBoxContainer/Sfx.text = tr("SFX_OFF")
Expand All @@ -61,7 +60,8 @@ func _on_Sfx_pressed() -> void:
set_sfx(true)
if Global.sfx:
Global.click()



func set_music(type:String) -> void:
Global.music = type

Expand All @@ -72,7 +72,8 @@ func set_music(type:String) -> void:

Global.config.set_value("sound","music",Global.music)
Global.save()



func set_sfx(enabled:bool) -> void:
Global.sfx = enabled
Global.config.set_value("sound","sfx",Global.sfx)
Expand All @@ -86,13 +87,6 @@ func round_limit_up() -> void:
Global.config.set_value("round_limit", "amount",Global.round_limit)
Global.save()

func _on_RateAndReview_pressed() -> void:
Global.click()
if OS.get_name() == "iOS":
OS.shell_open("https://itunes.apple.com/app/id1511009171?action=write-review")
else:
OS.shell_open("https://play.google.com/store/apps/details?id=com.salvai.broomball")


func _on_GoBack_pressed() -> void:
Global.click()
Expand All @@ -107,7 +101,6 @@ func _on_MoreGames_pressed() -> void:
OS.shell_open("https://play.google.com/store/apps/dev?id=7836644900810357474&hl=en")



func _on_EasterEgg_button_down():
$EasterEggTimer.start()

Expand Down
21 changes: 7 additions & 14 deletions game/src/ui/settings/Settings.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,16 @@ margin_right = 540.0
margin_bottom = 232.0
text = "SFX_ON"

[node name="RateAndReview" type="Button" parent="VBoxContainer"]
[node name="MoreGames" type="Button" parent="VBoxContainer"]
margin_top = 240.0
margin_right = 540.0
margin_bottom = 312.0
text = "RATE"

[node name="MoreGames" type="Button" parent="VBoxContainer"]
margin_top = 320.0
margin_right = 540.0
margin_bottom = 392.0
text = "MORE_GAMES"

[node name="Language" type="Button" parent="VBoxContainer"]
margin_top = 400.0
margin_top = 320.0
margin_right = 540.0
margin_bottom = 472.0
margin_bottom = 392.0
text = "LANGUAGE"
expand_icon = true

Expand Down Expand Up @@ -91,16 +85,16 @@ text = "INFO"

[node name="HSeparator" type="HSeparator" parent="VBoxContainer"]
modulate = Color( 1, 1, 1, 0 )
margin_top = 480.0
margin_top = 400.0
margin_right = 540.0
margin_bottom = 500.0
margin_bottom = 420.0
size_flags_horizontal = 3
custom_constants/separation = 20

[node name="GoBack" type="Button" parent="VBoxContainer"]
margin_top = 508.0
margin_top = 428.0
margin_right = 540.0
margin_bottom = 580.0
margin_bottom = 500.0
text = "GO_BACK"

[node name="EasterEgg" type="Button" parent="."]
Expand All @@ -119,7 +113,6 @@ one_shot = true
[connection signal="pressed" from="VBoxContainer/RoundLimit" to="." method="_on_RoundLimit_pressed"]
[connection signal="pressed" from="VBoxContainer/Music" to="." method="_on_Music_pressed"]
[connection signal="pressed" from="VBoxContainer/Sfx" to="." method="_on_Sfx_pressed"]
[connection signal="pressed" from="VBoxContainer/RateAndReview" to="." method="_on_RateAndReview_pressed"]
[connection signal="pressed" from="VBoxContainer/MoreGames" to="." method="_on_MoreGames_pressed"]
[connection signal="pressed" from="VBoxContainer/Language" to="." method="_on_Language_pressed"]
[connection signal="pressed" from="VBoxContainer/Join" to="." method="_on_Join_pressed"]
Expand Down

0 comments on commit 2805e4f

Please sign in to comment.