2023-04-28 10:24:31 +00:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Layouts
|
|
|
|
import QtQuick.Dialogs
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
RowLayout {
|
|
|
|
anchors.rightMargin: 8
|
|
|
|
spacing: 16
|
|
|
|
Text {
|
|
|
|
text: Backend.translate("Lobby BG")
|
|
|
|
}
|
|
|
|
TextField {
|
2023-10-27 14:53:25 +00:00
|
|
|
Layout.fillWidth: true
|
2023-04-28 10:24:31 +00:00
|
|
|
text: config.lobbyBg
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "..."
|
|
|
|
onClicked: {
|
|
|
|
fdialog.nameFilters = ["Image Files (*.jpg *.png)"];
|
|
|
|
fdialog.configKey = "lobbyBg";
|
|
|
|
fdialog.open();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
anchors.rightMargin: 8
|
|
|
|
spacing: 16
|
|
|
|
Text {
|
|
|
|
text: Backend.translate("Room BG")
|
|
|
|
}
|
|
|
|
TextField {
|
2023-10-27 14:53:25 +00:00
|
|
|
Layout.fillWidth: true
|
2023-04-28 10:24:31 +00:00
|
|
|
text: config.roomBg
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "..."
|
|
|
|
onClicked: {
|
|
|
|
fdialog.nameFilters = ["Image Files (*.jpg *.png)"];
|
|
|
|
fdialog.configKey = "roomBg";
|
|
|
|
fdialog.open();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
anchors.rightMargin: 8
|
|
|
|
spacing: 16
|
|
|
|
Text {
|
|
|
|
text: Backend.translate("Game BGM")
|
|
|
|
}
|
|
|
|
TextField {
|
2023-10-27 14:53:25 +00:00
|
|
|
Layout.fillWidth: true
|
2023-04-28 10:24:31 +00:00
|
|
|
text: config.bgmFile
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "..."
|
|
|
|
onClicked: {
|
|
|
|
fdialog.nameFilters = ["Music Files (*.mp3)"];
|
|
|
|
fdialog.configKey = "bgmFile";
|
|
|
|
fdialog.open();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
anchors.rightMargin: 8
|
|
|
|
spacing: 16
|
|
|
|
Text {
|
|
|
|
text: Backend.translate("Poster Girl")
|
|
|
|
}
|
|
|
|
TextField {
|
2023-10-27 14:53:25 +00:00
|
|
|
Layout.fillWidth: true
|
2023-04-28 10:24:31 +00:00
|
|
|
text: config.ladyImg
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "..."
|
|
|
|
onClicked: {
|
|
|
|
fdialog.nameFilters = ["Image Files (*.jpg *.png)"];
|
|
|
|
fdialog.configKey = "ladyImg";
|
|
|
|
fdialog.open();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
anchors.rightMargin: 8
|
|
|
|
spacing: 16
|
|
|
|
Text {
|
|
|
|
text: "Language"
|
|
|
|
}
|
|
|
|
ComboBox {
|
|
|
|
model: ["zh_CN", "en_US"]
|
|
|
|
currentIndex: model.indexOf(config.language)
|
|
|
|
onCurrentTextChanged: { config.language = currentText; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
FileDialog {
|
|
|
|
id: fdialog
|
|
|
|
property string configKey
|
|
|
|
onAccepted: { config[configKey] = selectedFile; }
|
|
|
|
}
|
|
|
|
}
|