update translation, windows theme & languages, and button exit

This commit is contained in:
AleaJactaEst 2022-04-15 17:03:37 +02:00
parent 7949510e69
commit e2f8d61431
9 changed files with 49 additions and 14 deletions

View file

@ -290,6 +290,9 @@ msgstr "Music volume"
msgid "MUSIC_MANAGER/EFFECT_VOLUME"
msgstr "Effect volume"
msgid "MUSIC_MANAGER/QUIT"
msgstr "Exit"
msgid "EDIT_CONTROL/MOVE_CAMERA_REVERSE_HORIZONTAL"
msgstr "Reverse horizontal"

View file

@ -290,6 +290,9 @@ msgstr "Niveau sonore de la musique"
msgid "MUSIC_MANAGER/EFFECT_VOLUME"
msgstr "Niveau sonore des effets"
msgid "MUSIC_MANAGER/QUIT"
msgstr "Sortir"
msgid "EDIT_CONTROL/MOVE_CAMERA_REVERSE_HORIZONTAL"
msgstr "Inversé horizontale"

Binary file not shown.

View file

@ -281,6 +281,8 @@ msgstr ""
msgid "MUSIC_MANAGER/EFFECT_VOLUME"
msgstr ""
msgid "MUSIC_MANAGER/QUIT"
msgstr ""
msgid "EDIT_CONTROL/MOVE_CAMERA_REVERSE_HORIZONTAL"
msgstr ""

View file

@ -452,14 +452,10 @@ func _input(event):
switch_camera_fps()
if event is InputEventMouseMotion:
if input_action_camera_move_player_mouse:
Common.msg_debug("Move " + str(Common.get_mul_mouse_camera_player_move_reverse_horizontal()) + " / " + str(Common.get_mul_mouse_camera_player_move_reverse_vertical()))
move_camera( Common.get_mul_mouse_camera_player_move_reverse_vertical() * event.relative.y * 0.01 , Common.get_mul_mouse_camera_player_move_reverse_horizontal() * event.relative.x *0.01)
elif input_view_camera_move_player_follow_mouse:
move_camera( Common.get_mul_mouse_camera_player_reverse_vertical() * event.relative.y * 0.01 , Common.get_mul_mouse_camera_player_reverse_horizontal() * event.relative.x *0.01)
#move_camera(event.relative.y * 0.01 , - event.relative.x *0.01)
elif input_view_camera_move_only_mouse:
# move_camera(event.relative.y * 0.01 , - event.relative.x *0.01)
Common.msg_debug("Move " + str(Common.get_mul_mouse_camera_only_reverse_vertical()) + " / " + str(Common.get_mul_mouse_camera_only_reverse_horizontal()))
move_camera( Common.get_mul_mouse_camera_only_reverse_vertical() * event.relative.y * 0.01 , Common.get_mul_mouse_camera_only_reverse_horizontal() * event.relative.x *0.01)
if input_view_camera_move_player_follow_mouse or input_action_camera_move_player_mouse:
reconciliate_rotate_camera_player = true

View file

@ -12,8 +12,11 @@ visible = false
[node name="VBoxContainer" type="VBoxContainer" parent="Window"]
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 40.0
offset_bottom = 40.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
metadata/_edit_use_custom_anchors = false
[node name="Label" type="Label" parent="Window/VBoxContainer"]
offset_right = 40.0
@ -23,11 +26,15 @@ text = "Select language"
[node name="Select" type="OptionButton" parent="Window/VBoxContainer"]
offset_right = 43.0
offset_bottom = 31.0
size_flags_vertical = 3
metadata/_edit_use_custom_anchors = false
[node name="Quit" type="Button" parent="Window/VBoxContainer"]
offset_top = 35.0
offset_right = 43.0
offset_bottom = 66.0
size_flags_horizontal = 4
size_flags_vertical = 8
text = "Quit"
[connection signal="close_requested" from="Window" to="." method="_on_quit_pressed"]

View file

@ -10,6 +10,7 @@ var music_play:bool = false
var select_rand:bool = true
var list_music:Array = []
func _ready():
var directory:Directory = Directory.new()
var files = []
@ -42,6 +43,7 @@ func _ready():
# var u = db2linear($Music.get_volume_db())
# Common.msg_debug("volume :" + str(u))
$Window/VBox/Tab/Mixer/MusicLevel/music.set_value( int(db2linear($Music.get_volume_db()) * 100.0))
$Window/VBox/Tab/Mixer/MusicLevel/Value.set_text(str(int(db2linear($Music.get_volume_db()) * 100.0)))
var bus_name = $Music.get_bus()
Common.msg_debug("bus_name: " + str(bus_name))
var bus_id = AudioServer.get_bus_index(bus_name)
@ -50,6 +52,7 @@ func _ready():
Common.msg_debug("GLB Volume: " + str(glb_volume))
# AudioServer.get_bus_volume_db(AudioServer.get_bus_index($Music.get_bus()))
$Window/VBox/Tab/Mixer/GlobalLevel/global.set_value( int(db2linear(AudioServer.get_bus_volume_db(AudioServer.get_bus_index($Music.get_bus()))) * 100.0))
$Window/VBox/Tab/Mixer/GlobalLevel/Value.set_text(str(int(db2linear(AudioServer.get_bus_volume_db(AudioServer.get_bus_index($Music.get_bus()))) * 100.0)))
func select_domain(new_domain:String):
@ -208,20 +211,21 @@ func _on_reinit_pressed():
func _on_mute_toggled(button_pressed):
Common.msg_debug("Mute:" + str(button_pressed))
AudioServer.set_bus_mute(AudioServer.get_bus_index($Music.get_bus()), button_pressed)
func _on_effect_value_changed(value):
pass # Replace with function body.
$Window/VBox/Tab/Mixer/EffectLevel/Value.set_text(str(value))
func _on_music_value_changed(value):
$Music.set_volume_db(linear2db(value/100.0))
$Window/VBox/Tab/Mixer/MusicLevel/Value.set_text(str(value))
func _on_global_value_changed(value):
AudioServer.set_bus_volume_db(AudioServer.get_bus_index($Music.get_bus()), linear2db(value/100.0))
$Window/VBox/Tab/Mixer/GlobalLevel/Value.set_text(str(value))
func _on_window_close_requested():

View file

@ -94,6 +94,12 @@ offset_right = 8.0
offset_bottom = 16.0
size_flags_horizontal = 3
[node name="Value" type="Label" parent="Window/VBox/Tab/Mixer/GlobalLevel"]
minimum_size = Vector2(50, 0)
offset_right = 40.0
offset_bottom = 23.0
text = "0"
[node name="MusicLevel" type="HBoxContainer" parent="Window/VBox/Tab/Mixer"]
offset_right = 40.0
offset_bottom = 40.0
@ -109,6 +115,12 @@ offset_right = 8.0
offset_bottom = 16.0
size_flags_horizontal = 3
[node name="Value" type="Label" parent="Window/VBox/Tab/Mixer/MusicLevel"]
minimum_size = Vector2(50, 0)
offset_right = 40.0
offset_bottom = 23.0
text = "0"
[node name="EffectLevel" type="HBoxContainer" parent="Window/VBox/Tab/Mixer"]
offset_right = 40.0
offset_bottom = 40.0
@ -124,6 +136,12 @@ offset_right = 8.0
offset_bottom = 16.0
size_flags_horizontal = 3
[node name="Value" type="Label" parent="Window/VBox/Tab/Mixer/EffectLevel"]
minimum_size = Vector2(50, 0)
offset_right = 40.0
offset_bottom = 23.0
text = "0"
[node name="HBoxContainer" type="HBoxContainer" parent="Window/VBox"]
offset_right = 40.0
offset_bottom = 40.0
@ -141,7 +159,7 @@ offset_right = 527.0
offset_bottom = 600.0
size_flags_horizontal = 6
size_flags_vertical = 8
text = "OK"
text = "MUSIC_MANAGER/QUIT"
[node name="Mute" type="CheckButton" parent="Window/VBox/HBoxContainer"]
offset_right = 236.0

View file

@ -6,16 +6,16 @@
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( "1_a1yak" )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Window" type="Window" parent="."]
visible = false
[node name="VBoxContainer" type="VBoxContainer" parent="Window"]
offset_right = 40.0
offset_bottom = 40.0
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
metadata/_edit_use_custom_anchors = false
[node name="Label" type="Label" parent="Window/VBoxContainer"]
offset_right = 98.0
@ -26,11 +26,13 @@ text = "Select theme"
offset_top = 30.0
offset_right = 98.0
offset_bottom = 61.0
size_flags_vertical = 3
[node name="Quit" type="Button" parent="Window/VBoxContainer"]
offset_top = 65.0
offset_right = 98.0
offset_bottom = 96.0
size_flags_horizontal = 4
text = "Quit"
[connection signal="close_requested" from="Window" to="." method="_on_quit_pressed"]