适配效果优化
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
import li_BaseView from "../../Main/Common/li_BaseView";
|
||||
import LanguageUtils, { LanguageType } from "../../Main/Common/LanguageUtils";
|
||||
import AudioManager from "../../Main/Manager/AudioManager";
|
||||
import ConfigManager from "../../chat18x/manager/ConfigManager";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -28,6 +29,9 @@ export class SimpleLanguagePanel extends li_BaseView {
|
||||
@property(Button)
|
||||
private closeBtn: Button = null;
|
||||
|
||||
@property(Node)
|
||||
private languageDrawdown: Node = null;
|
||||
|
||||
@property(Label)
|
||||
private titleLabel: Label = null;
|
||||
|
||||
@@ -62,13 +66,14 @@ export class SimpleLanguagePanel extends li_BaseView {
|
||||
onEnable() {
|
||||
this.currentSelectedLang = LanguageUtils.CurrentLanguage;
|
||||
this.updateSelection();
|
||||
this.languageDrawdown.active = false;
|
||||
}
|
||||
|
||||
public onClickLanguageSelect() {
|
||||
this.languageDrawdown.active = true;
|
||||
}
|
||||
|
||||
private initUI() {
|
||||
if (this.titleLabel) {
|
||||
this.titleLabel.string = this.getMultiLangTitle();
|
||||
}
|
||||
|
||||
// 初始化语言按钮数组
|
||||
this.initLanguageButton(this.btnEnglish, LanguageType.EN, "English");
|
||||
this.initLanguageButton(this.btnChinese, LanguageType.CN, "中文");
|
||||
@@ -77,17 +82,6 @@ export class SimpleLanguagePanel extends li_BaseView {
|
||||
this.initLanguageButton(this.btnGerman, LanguageType.DE, "Deutsch");
|
||||
}
|
||||
|
||||
private getMultiLangTitle(): string {
|
||||
const titles = [
|
||||
"Select Language",
|
||||
"选择语言",
|
||||
"भाषा चुनें",
|
||||
"Choisir la langue",
|
||||
"Sprache wählen",
|
||||
];
|
||||
return titles.join(" / ");
|
||||
}
|
||||
|
||||
private initLanguageButton(
|
||||
button: Button,
|
||||
language: LanguageType,
|
||||
|
||||
Reference in New Issue
Block a user