Skip to content

Commit

Permalink
Merge pull request #3 from cake4everyone/german-ui
Browse files Browse the repository at this point in the history
changed ui texts to german
  • Loading branch information
Kesuaheli authored May 11, 2024
2 parents ab50c95 + 7466585 commit e307176
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 43 deletions.
18 changes: 9 additions & 9 deletions scenes/game_end.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ color = Color(0.25098, 0.25098, 0.25098, 1)
layout_mode = 1
offset_top = -40.0
offset_right = 160.0
text = "Answer A:"
text = "Antwort A"
label_settings = ExtResource("3_fxqrh")

[node name="Label" type="Label" parent="Quiz/Answers/A"]
Expand Down Expand Up @@ -118,7 +118,7 @@ color = Color(0.25098, 0.25098, 0.25098, 1)
layout_mode = 1
offset_top = -40.0
offset_right = 160.0
text = "Answer B:"
text = "Antwort B"
label_settings = ExtResource("3_fxqrh")

[node name="Label" type="Label" parent="Quiz/Answers/B"]
Expand Down Expand Up @@ -155,7 +155,7 @@ color = Color(0.25098, 0.25098, 0.25098, 1)
layout_mode = 1
offset_top = -40.0
offset_right = 160.0
text = "Answer C:"
text = "Antwort C"
label_settings = ExtResource("3_fxqrh")

[node name="Label" type="Label" parent="Quiz/Answers/C"]
Expand Down Expand Up @@ -192,7 +192,7 @@ color = Color(0.25098, 0.25098, 0.25098, 1)
layout_mode = 1
offset_top = -40.0
offset_right = 160.0
text = "Answer D:"
text = "Antwort D"
label_settings = ExtResource("3_fxqrh")

[node name="Label" type="Label" parent="Quiz/Answers/D"]
Expand Down Expand Up @@ -227,8 +227,8 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
text = "You voted 1"
label_settings = ExtResource("2_dorbm")
text = "Du hast A gewählt"
label_settings = ExtResource("3_fxqrh")
horizontal_alignment = 1
vertical_alignment = 1

Expand Down Expand Up @@ -276,9 +276,9 @@ grow_horizontal = 0
[node name="Label" type="Label" parent="Points"]
custom_minimum_size = Vector2(2.08165e-12, 60)
layout_mode = 2
text = "Points
"
text = "Du Chat"
label_settings = ExtResource("2_dorbm")
horizontal_alignment = 3
vertical_alignment = 2

[node name="Graph" type="HBoxContainer" parent="Points"]
Expand Down Expand Up @@ -337,6 +337,6 @@ grow_horizontal = 0
grow_vertical = 0
mouse_default_cursor_shape = 2
theme_override_font_sizes/font_size = 40
text = "Main Menu"
text = "Hauptmenü"

[connection signal="pressed" from="Next" to="." method="on_next_pressed"]
14 changes: 7 additions & 7 deletions scenes/login.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ anchor_right = 1.0
offset_top = 16.0
offset_bottom = 114.0
grow_horizontal = 2
text = "Login with C4E"
text = "Anmelden mit C4E"
label_settings = ExtResource("2_hmd01")
horizontal_alignment = 1
vertical_alignment = 1
Expand All @@ -47,7 +47,7 @@ grow_horizontal = 2
grow_vertical = 2
focus_next = NodePath("../Password")
theme_override_font_sizes/font_size = 30
placeholder_text = "e-mail or username"
placeholder_text = "EMail oder Benutzername"
alignment = 1
expand_to_text_length = true
context_menu_enabled = false
Expand All @@ -67,7 +67,7 @@ grow_vertical = 2
focus_next = NodePath("../Login")
focus_previous = NodePath("../EMail")
theme_override_font_sizes/font_size = 30
placeholder_text = "password"
placeholder_text = "Passwort"
alignment = 1
expand_to_text_length = true
context_menu_enabled = false
Expand All @@ -84,16 +84,16 @@ anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -97.5
offset_top = -82.0
offset_right = 97.5
offset_left = -140.5
offset_top = -84.0
offset_right = 139.5
offset_bottom = -24.0
grow_horizontal = 2
grow_vertical = 0
focus_previous = NodePath("../Password")
theme_override_font_sizes/font_size = 40
disabled = true
text = "Login ->"
text = "Anmelden ->"

[connection signal="text_changed" from="LoginBox/EMail" to="." method="on_email_text_changed"]
[connection signal="text_changed" from="LoginBox/Password" to="." method="on_password_text_changed"]
Expand Down
10 changes: 5 additions & 5 deletions scenes/menu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -264.0
offset_top = -102.0
offset_right = -48.0
offset_bottom = -48.0
offset_left = -360.0
offset_top = -140.0
offset_right = -60.0
offset_bottom = -60.0
grow_horizontal = 0
grow_vertical = 0
theme_override_font_sizes/font_size = 40
text = "Start Game"
text = "Spiel starten"

[node name="ModeSelect" type="OptionButton" parent="."]
offset_left = 56.0
Expand Down
8 changes: 4 additions & 4 deletions scenes/question.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ layout_mode = 1
offset_top = -60.0
offset_right = 181.0
offset_bottom = -14.0
text = "Answer A:"
text = "Antwort A"
label_settings = ExtResource("3_24026")

[node name="Label" type="Label" parent="Quiz/Answers/A"]
Expand Down Expand Up @@ -128,7 +128,7 @@ layout_mode = 1
offset_top = -60.0
offset_right = 181.0
offset_bottom = -14.0
text = "Answer B:"
text = "Antwort B"
label_settings = ExtResource("3_24026")

[node name="Label" type="Label" parent="Quiz/Answers/B"]
Expand Down Expand Up @@ -166,7 +166,7 @@ layout_mode = 1
offset_top = -60.0
offset_right = 181.0
offset_bottom = -14.0
text = "Answer C:"
text = "Antwort C"
label_settings = ExtResource("3_24026")

[node name="Label" type="Label" parent="Quiz/Answers/C"]
Expand Down Expand Up @@ -204,7 +204,7 @@ layout_mode = 1
offset_top = -60.0
offset_right = 181.0
offset_bottom = -14.0
text = "Answer D:"
text = "Antwort D"
label_settings = ExtResource("3_24026")

[node name="Label" type="Label" parent="Quiz/Answers/D"]
Expand Down
18 changes: 9 additions & 9 deletions scenes/question_end.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ color = Color(0.25098, 0.25098, 0.25098, 1)
layout_mode = 1
offset_top = -40.0
offset_right = 160.0
text = "Answer A:"
text = "Antwort A"
label_settings = ExtResource("3_bslnc")

[node name="Label" type="Label" parent="Quiz/Answers/A"]
Expand Down Expand Up @@ -118,7 +118,7 @@ color = Color(0.25098, 0.25098, 0.25098, 1)
layout_mode = 1
offset_top = -40.0
offset_right = 160.0
text = "Answer B:"
text = "Antwort B"
label_settings = ExtResource("3_bslnc")

[node name="Label" type="Label" parent="Quiz/Answers/B"]
Expand Down Expand Up @@ -155,7 +155,7 @@ color = Color(0.25098, 0.25098, 0.25098, 1)
layout_mode = 1
offset_top = -40.0
offset_right = 160.0
text = "Answer C:"
text = "Antwort C"
label_settings = ExtResource("3_bslnc")

[node name="Label" type="Label" parent="Quiz/Answers/C"]
Expand Down Expand Up @@ -192,7 +192,7 @@ color = Color(0.25098, 0.25098, 0.25098, 1)
layout_mode = 1
offset_top = -40.0
offset_right = 160.0
text = "Answer D:"
text = "Antwort D"
label_settings = ExtResource("3_bslnc")

[node name="Label" type="Label" parent="Quiz/Answers/D"]
Expand Down Expand Up @@ -227,8 +227,8 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
text = "You voted 1"
label_settings = ExtResource("2_ki58g")
text = "Du hast A gewählt"
label_settings = ExtResource("3_bslnc")
horizontal_alignment = 1
vertical_alignment = 1

Expand Down Expand Up @@ -276,9 +276,9 @@ grow_horizontal = 0
[node name="Label" type="Label" parent="Points"]
custom_minimum_size = Vector2(2.08165e-12, 60)
layout_mode = 2
text = "Points
"
text = "Du Chat"
label_settings = ExtResource("2_ki58g")
horizontal_alignment = 3
vertical_alignment = 2

[node name="Graph" type="HBoxContainer" parent="Points"]
Expand Down Expand Up @@ -337,6 +337,6 @@ grow_horizontal = 0
grow_vertical = 0
mouse_default_cursor_shape = 2
theme_override_font_sizes/font_size = 40
text = "Next Round..."
text = "Nächste Runde"

[connection signal="pressed" from="Next" to="." method="on_next_pressed"]
5 changes: 1 addition & 4 deletions scripts/game_end.gd
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ func show_round_data(data: Dictionary):
answer.color = Color.hex(0x004200ff)

$StreamerAnswer.color = Color.hex(0x004200ff) if data.streamer_vote == data.correct else Color.hex(0x780000ff)
if data.streamer_vote == 0:
$StreamerAnswer/Label.text = "You voted nothing"
else:
$StreamerAnswer/Label.text = "You voted %s" % [String.chr(64 + data.streamer_vote)]
$StreamerAnswer/Label.text = "Du hast %s gewählt" % ["nichts" if data.streamer_vote == 0 else String.chr(64 + data.streamer_vote)]

var total_votes: int = data.chat_vote_count[0] + data.chat_vote_count[1] + data.chat_vote_count[2] + data.chat_vote_count[3]

Expand Down
2 changes: 2 additions & 0 deletions scripts/login.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ func on_password_text_changed(password_text: String):

## on_login_button_pressed is called when user pressed the login button on the screen.
func on_login_button_pressed():
$LoginBox/Login.disabled = true
var auth: String = Marshalls.utf8_to_base64("%s:%s" % [$LoginBox/EMail.text, $LoginBox/Password.text])
api.login(auth, on_login_reponse)

## on_login_reponse is called as when the login api call completed.
func on_login_reponse(success: bool, _username: String=""):
if !success:
print("login failed!")
$LoginBox/Login.disabled = false
return

scene_manager.change_scene(self, scene_after_login)
4 changes: 3 additions & 1 deletion scripts/menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var round_duration: int
## ready is called when the node enters the scene tree for the first time.
func _ready():
$ModeSelect.add_item("Streamer VS Chat", 0)
if(scene_manager.round_duration > 0):
if (scene_manager.round_duration > 0):
round_duration = scene_manager.round_duration
$RoundDuration.value = round_duration
api.category(on_category_response)
Expand All @@ -30,6 +30,7 @@ func update_category_list(categories: Dictionary):
## on_btn_start_pressed is called when pressed the start game button.
## It collects all the selected categories and creates a new game on the server.
func on_btn_start_pressed():
$Start.disabled = true
round_duration = $RoundDuration.value
var categories: Dictionary = {}
for category: HBoxContainer in $CategoryBox/Categories.get_children():
Expand All @@ -46,5 +47,6 @@ func on_btn_start_pressed():
func on_game_start_response(success: bool):
if !success:
print("failed to create new game!")
$Start.disabled = false
return
scene_manager.change_scene(self, "question")
5 changes: 1 addition & 4 deletions scripts/question_end.gd
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ func show_round_data(data: Dictionary):
answer.color = Color.hex(0x004200ff)

$StreamerAnswer.color = Color.hex(0x004200ff) if data.streamer_vote == data.correct else Color.hex(0x780000ff)
if data.streamer_vote == 0:
$StreamerAnswer/Label.text = "You voted nothing"
else:
$StreamerAnswer/Label.text = "You voted %s" % [String.chr(64 + data.streamer_vote)]
$StreamerAnswer/Label.text = "Du hast %s gewählt" % ["nichts" if data.streamer_vote == 0 else String.chr(64 + data.streamer_vote)]

var total_votes: int = data.chat_vote_count[0] + data.chat_vote_count[1] + data.chat_vote_count[2] + data.chat_vote_count[3]

Expand Down

0 comments on commit e307176

Please sign in to comment.