mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
场景组件多语言化完成。
This commit is contained in:
parent
e5b3bb9ffd
commit
8d0fc3c281
@ -165,3 +165,8 @@ L_FOG_COLOR = '雾颜色';
|
||||
L_FOG_NEAR = '雾近点';
|
||||
L_FOG_FAR = '雾远点';
|
||||
L_FOG_DENSITY = '雾浓度';
|
||||
L_CLICK_MAP_PANEL = '请点击贴图面板中的立体贴图!';
|
||||
L_ONLY_SELECT_CUBE_TEXTURE = '只允许选择立体贴图!';
|
||||
L_CUBE_TEXTURE_FETCH_FAILED = '立体贴图获取失败!';
|
||||
L_UPLOAD_ALL_BEFORE_SAVE = '请上传所有立体贴图后再点击保存!';
|
||||
L_CUBE_TEXTURE_EXISTED = '立体贴图已经存在于服务端,无需重复上传。';
|
||||
|
||||
@ -401,13 +401,13 @@ SceneComponent.prototype.onChangeBackgroundType = function () { // 切换背景
|
||||
|
||||
SceneComponent.prototype.onLoadCubeTexture = function () { // 加载立体贴图
|
||||
this.app.call(`selectBottomPanel`, this, 'map');
|
||||
UI.msg('请点击贴图面板中的立体贴图!');
|
||||
UI.msg(L_CLICK_MAP_PANEL);
|
||||
this.app.on(`selectMap.${this.id}`, this.onSelectCubeMap.bind(this));
|
||||
};
|
||||
|
||||
SceneComponent.prototype.onSelectCubeMap = function (model) {
|
||||
if (model.Type !== 'cube') {
|
||||
UI.msg('只允许选择立体贴图!');
|
||||
UI.msg(L_ONLY_SELECT_CUBE_TEXTURE);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ SceneComponent.prototype.onSelectCubeMap = function (model) {
|
||||
resolve(texture);
|
||||
}, undefined, error => {
|
||||
console.error(error);
|
||||
UI.msg('立体贴图获取失败!');
|
||||
UI.msg(L_CUBE_TEXTURE_FETCH_FAILED);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -448,7 +448,7 @@ SceneComponent.prototype.onSaveCubeTexture = function () { // 保存立体贴图
|
||||
var textureNegZ = UI.get('backgroundNegZ', this.id).getValue();
|
||||
|
||||
if (!texturePosX || !textureNegX || !texturePosY || !textureNegY || !texturePosZ || !textureNegZ) {
|
||||
UI.msg(`请上传所有立体贴图后再点击保存!`);
|
||||
UI.msg(L_UPLOAD_ALL_BEFORE_SAVE);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -460,7 +460,7 @@ SceneComponent.prototype.onSaveCubeTexture = function () { // 保存立体贴图
|
||||
var negZSrc = textureNegZ.image.src;
|
||||
|
||||
if (posXSrc.startsWith('http') || negXSrc.startsWith('http') || posYSrc.startsWith('http') || negYSrc.startsWith('http') || posZSrc.startsWith('http') || negZSrc.startsWith('http')) {
|
||||
UI.msg(`立体贴图已经存在于服务端,无需重复上传。`);
|
||||
UI.msg(L_CUBE_TEXTURE_EXISTED);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -162,7 +162,12 @@ Object.assign(window, {
|
||||
L_LINEAR: 'Linear',
|
||||
L_EXPONENTIAL: 'Exponential',
|
||||
L_FOG_COLOR: 'FogColor',
|
||||
L_FOG_NEAR = 'FogNear',
|
||||
L_FOG_NEAR: 'FogNear',
|
||||
L_FOG_FAR: 'FogFar',
|
||||
L_FOG_DENSITY: 'FogDensity',
|
||||
L_CLICK_MAP_PANEL: 'Please click the map in the Map Panel.',
|
||||
L_ONLY_SELECT_CUBE_TEXTURE: 'You should select Cube Texture.',
|
||||
L_CUBE_TEXTURE_FETCH_FAILED: 'Cube Texture fetch failed.',
|
||||
L_UPLOAD_ALL_BEFORE_SAVE: 'Please upload all the textures before save.',
|
||||
L_CUBE_TEXTURE_EXISTED: 'Cube texture has already been uploaded.',
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user