langueage selector
This commit is contained in:
@@ -550,10 +550,10 @@ grow_vertical = 2
|
|||||||
color = Color(0.14902, 0.14902, 0.14902, 1)
|
color = Color(0.14902, 0.14902, 0.14902, 1)
|
||||||
|
|
||||||
[node name="FileDialog" type="FileDialog" parent="CreatePlaylistsMenu"]
|
[node name="FileDialog" type="FileDialog" parent="CreatePlaylistsMenu"]
|
||||||
title = "DIR_OPEN"
|
title = "Open a Directory"
|
||||||
initial_position = 2
|
initial_position = 2
|
||||||
size = Vector2i(352, 180)
|
size = Vector2i(352, 180)
|
||||||
ok_button_text = "DIR_OPEN"
|
ok_button_text = "Select Current Folder"
|
||||||
cancel_button_text = "CANCEL"
|
cancel_button_text = "CANCEL"
|
||||||
file_mode = 2
|
file_mode = 2
|
||||||
access = 2
|
access = 2
|
||||||
@@ -648,10 +648,10 @@ shortcut = SubResource("Shortcut_axi6u")
|
|||||||
text = "RANDOMIZE"
|
text = "RANDOMIZE"
|
||||||
|
|
||||||
[node name="FileDialog" type="FileDialog" parent="."]
|
[node name="FileDialog" type="FileDialog" parent="."]
|
||||||
title = "DIR_OPEN"
|
title = "Open a Directory"
|
||||||
position = Vector2i(28, 115)
|
position = Vector2i(28, 115)
|
||||||
size = Vector2i(833, 507)
|
size = Vector2i(833, 507)
|
||||||
ok_button_text = "DIR_OPEN"
|
ok_button_text = "Select Current Folder"
|
||||||
cancel_button_text = "CANCEL"
|
cancel_button_text = "CANCEL"
|
||||||
file_mode = 2
|
file_mode = 2
|
||||||
access = 2
|
access = 2
|
||||||
@@ -919,7 +919,7 @@ offset_left = -64.0
|
|||||||
offset_top = -23.0
|
offset_top = -23.0
|
||||||
grow_horizontal = 0
|
grow_horizontal = 0
|
||||||
grow_vertical = 0
|
grow_vertical = 0
|
||||||
text = "v1.6"
|
text = "v1.6h1"
|
||||||
horizontal_alignment = 2
|
horizontal_alignment = 2
|
||||||
|
|
||||||
[node name="SettingsButton" type="Button" parent="."]
|
[node name="SettingsButton" type="Button" parent="."]
|
||||||
|
|||||||
+21
-1
@@ -1,9 +1,10 @@
|
|||||||
[gd_scene load_steps=10 format=3 uid="uid://dqg674t6kun4e"]
|
[gd_scene load_steps=11 format=3 uid="uid://dqg674t6kun4e"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://vnpslgl788du" path="res://settings.gd" id="1_uaa7d"]
|
[ext_resource type="Script" uid="uid://vnpslgl788du" path="res://settings.gd" id="1_uaa7d"]
|
||||||
[ext_resource type="Script" uid="uid://kt7n1epi3ng8" path="res://eq_settings.gd" id="2_1n4m6"]
|
[ext_resource type="Script" uid="uid://kt7n1epi3ng8" path="res://eq_settings.gd" id="2_1n4m6"]
|
||||||
[ext_resource type="Texture2D" uid="uid://1rstn6r2wisy" path="res://X.png" id="2_iuivb"]
|
[ext_resource type="Texture2D" uid="uid://1rstn6r2wisy" path="res://X.png" id="2_iuivb"]
|
||||||
[ext_resource type="Texture2D" uid="uid://pgij783wgbhn" path="res://File.png" id="2_jmen4"]
|
[ext_resource type="Texture2D" uid="uid://pgij783wgbhn" path="res://File.png" id="2_jmen4"]
|
||||||
|
[ext_resource type="Script" uid="uid://cej7efsj2cyen" path="res://language_button.gd" id="2_sfvul"]
|
||||||
|
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_ouq8m"]
|
[sub_resource type="LabelSettings" id="LabelSettings_ouq8m"]
|
||||||
font_size = 30
|
font_size = 30
|
||||||
@@ -104,6 +105,25 @@ vertical_alignment = 1
|
|||||||
autowrap_mode = 2
|
autowrap_mode = 2
|
||||||
uppercase = true
|
uppercase = true
|
||||||
|
|
||||||
|
[node name="Seperator8" type="Control" parent="ScrollContainer/VBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(0, 16.07)
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "LANGUAGE"
|
||||||
|
|
||||||
|
[node name="LanguageButton" type="MenuButton" parent="ScrollContainer/VBoxContainer/HBoxContainer" node_paths=PackedStringArray("settings")]
|
||||||
|
custom_minimum_size = Vector2(50, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "SELECT"
|
||||||
|
flat = false
|
||||||
|
script = ExtResource("2_sfvul")
|
||||||
|
settings = NodePath("../../../..")
|
||||||
|
|
||||||
[node name="Seperator3" type="Control" parent="ScrollContainer/VBoxContainer"]
|
[node name="Seperator3" type="Control" parent="ScrollContainer/VBoxContainer"]
|
||||||
custom_minimum_size = Vector2(0, 16.07)
|
custom_minimum_size = Vector2(0, 16.07)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
extends MenuButton
|
||||||
|
|
||||||
|
@export var settings:Settings
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
for trans_language in TranslationServer.get_loaded_locales():
|
||||||
|
get_popup().add_item(trans_language)
|
||||||
|
get_popup().id_pressed.connect(got_pressed)
|
||||||
|
|
||||||
|
|
||||||
|
func got_pressed(id:int) -> void:
|
||||||
|
settings.Parent.overridden_locale = get_popup().get_item_text(id)
|
||||||
|
TranslationServer.set_locale(get_popup().get_item_text(id))
|
||||||
|
settings.Parent.SaveEverything()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cej7efsj2cyen
|
||||||
@@ -32,6 +32,7 @@ extends Control
|
|||||||
@onready var delete_confirm: ConfirmationDialog = $deleteConfirm
|
@onready var delete_confirm: ConfirmationDialog = $deleteConfirm
|
||||||
@onready var search_bar: LineEdit = $SearchBar
|
@onready var search_bar: LineEdit = $SearchBar
|
||||||
@onready var playing_now: Window = $PlayingNow
|
@onready var playing_now: Window = $PlayingNow
|
||||||
|
@export var overridden_locale:String
|
||||||
|
|
||||||
var DiscordUsername:String
|
var DiscordUsername:String
|
||||||
|
|
||||||
@@ -167,6 +168,9 @@ func _ready() -> void:
|
|||||||
play_all.button_pressed = true
|
play_all.button_pressed = true
|
||||||
if data.has("UsingPlayingNow"):
|
if data.has("UsingPlayingNow"):
|
||||||
UsingPlayingNow = data["UsingPlayingNow"]
|
UsingPlayingNow = data["UsingPlayingNow"]
|
||||||
|
if data.has("OverriddenLocale"):
|
||||||
|
TranslationServer.set_locale(data["OverriddenLocale"])
|
||||||
|
overridden_locale = data["OverriddenLocale"]
|
||||||
else:
|
else:
|
||||||
if data != null:
|
if data != null:
|
||||||
print(data["Volume"])
|
print(data["Volume"])
|
||||||
@@ -592,7 +596,8 @@ func SaveEverything():
|
|||||||
"CurrentCustomBackroundImageDirectory" : CurrentCustomBackroundImageDirectory,
|
"CurrentCustomBackroundImageDirectory" : CurrentCustomBackroundImageDirectory,
|
||||||
"PlayAllLists" : PlayAllLists,
|
"PlayAllLists" : PlayAllLists,
|
||||||
"DiscordUsername" : DiscordRPC.get_current_user().get("username"),
|
"DiscordUsername" : DiscordRPC.get_current_user().get("username"),
|
||||||
"UsingPlayingNow" : UsingPlayingNow
|
"UsingPlayingNow" : UsingPlayingNow,
|
||||||
|
"OverriddenLocale" : overridden_locale
|
||||||
}
|
}
|
||||||
print("saving")
|
print("saving")
|
||||||
saveUserdata(Data)
|
saveUserdata(Data)
|
||||||
|
|||||||
@@ -82,3 +82,5 @@ CONFIRM,Please Confirm…,Bitte bestimme…
|
|||||||
DL_SONG,Download Song,Nur Lied Herunterladen
|
DL_SONG,Download Song,Nur Lied Herunterladen
|
||||||
DL_LIST,Download Playlist,Playliste Herunterladen
|
DL_LIST,Download Playlist,Playliste Herunterladen
|
||||||
DL_DIALOG,Do you want to download the song or the Entire playlist?,Willst du die playlist herunterladen?
|
DL_DIALOG,Do you want to download the song or the Entire playlist?,Willst du die playlist herunterladen?
|
||||||
|
LANGUAGE,Language:,Sprache:
|
||||||
|
SELECT,Select ,Auswählen
|
||||||
|
|||||||
|
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user