Optimize some CSSs.
(cherry picked from commit 93b954629451a004679bc887fb44d01a2c8d8dbe)
This commit is contained in:
parent
fc0f70bc7e
commit
58e2b0c39d
31
game/game.js
31
game/game.js
|
@ -6827,10 +6827,11 @@
|
||||||
},
|
},
|
||||||
placePoppedDialog:function(dialog,e){
|
placePoppedDialog:function(dialog,e){
|
||||||
if(dialog._place_text){
|
if(dialog._place_text){
|
||||||
if(dialog._place_text.firstChild.offsetWidth>=190||
|
if(dialog._place_text.firstChild.offsetWidth>=190||dialog._place_text.firstChild.offsetHeight>=30){
|
||||||
dialog._place_text.firstChild.offsetHeight>=30){
|
|
||||||
dialog._place_text.style.textAlign='left';
|
|
||||||
dialog._place_text.style.marginLeft='14px';
|
dialog._place_text.style.marginLeft='14px';
|
||||||
|
dialog._place_text.style.marginRight='14px';
|
||||||
|
dialog._place_text.style.textAlign='left';
|
||||||
|
dialog._place_text.style.width='calc(100% - 28px)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(e.touches&&e.touches[0]){
|
if(e.touches&&e.touches[0]){
|
||||||
|
@ -7805,17 +7806,19 @@
|
||||||
|
|
||||||
if(pack.font){
|
if(pack.font){
|
||||||
ui.css.fontsheet=lib.init.sheet();
|
ui.css.fontsheet=lib.init.sheet();
|
||||||
for(i in pack.font){
|
const appearenceConfig=lib.configMenu.appearence.config,fontSheet=ui.css.fontsheet.sheet,suitsFont=lib.config.suits_font;
|
||||||
lib.configMenu.appearence.config.name_font.item[i]=pack.font[i];
|
Object.keys(pack.font).forEach(value=>{
|
||||||
lib.configMenu.appearence.config.identity_font.item[i]=pack.font[i];
|
const font=pack.font[value];
|
||||||
lib.configMenu.appearence.config.cardtext_font.item[i]=pack.font[i];
|
appearenceConfig.name_font.item[value]=font;
|
||||||
lib.configMenu.appearence.config.global_font.item[i]=pack.font[i];
|
appearenceConfig.identity_font.item[value]=font;
|
||||||
ui.css.fontsheet.sheet.insertRule("@font-face {font-family: '"+i+"'; src: url('"+lib.assetURL+"font/"+i+".ttf');}",0);
|
appearenceConfig.cardtext_font.item[value]=font;
|
||||||
if(lib.config.suits_font) ui.css.fontsheet.sheet.insertRule("@font-face {font-family: '"+i+"'; src: url('"+lib.assetURL+"font/suits.ttf');}",0);
|
appearenceConfig.global_font.item[value]=font;
|
||||||
}
|
fontSheet.insertRule(`@font-face {font-family: '${value}'; src: local('${font}'), url('${lib.assetURL}font/${value}.ttf');}`,0);
|
||||||
if(lib.config.suits_font) ui.css.fontsheet.sheet.insertRule("@font-face {font-family: 'Suits'; src: url('"+lib.assetURL+"font/suits.ttf');}",0);
|
if(suitsFont) fontSheet.insertRule(`@font-face {font-family: '${value}'; src: local('${font}'), url('${lib.assetURL}font/suits.ttf');}`,0);
|
||||||
lib.configMenu.appearence.config.cardtext_font.item.default='默认';
|
});
|
||||||
lib.configMenu.appearence.config.global_font.item.default='默认';
|
if(suitsFont) fontSheet.insertRule(`@font-face {font-family: 'Suits'; src: local('Noname Suit'), url('${lib.assetURL}font/suits.ttf');}`,0);
|
||||||
|
appearenceConfig.cardtext_font.item.default='默认';
|
||||||
|
appearenceConfig.global_font.item.default='默认';
|
||||||
}
|
}
|
||||||
|
|
||||||
var ua=navigator.userAgent.toLowerCase();
|
var ua=navigator.userAgent.toLowerCase();
|
||||||
|
|
|
@ -128,12 +128,12 @@ window.noname_package={
|
||||||
music_jilve:'极略',
|
music_jilve:'极略',
|
||||||
},
|
},
|
||||||
font:{
|
font:{
|
||||||
xiaozhuan:'小篆',
|
xiaozhuan:'方正小篆体',
|
||||||
xinwei:'新魏',
|
xinwei:'华文新魏_GBK',
|
||||||
huangcao:'黄草',
|
huangcao:'方正黄草_GBK',
|
||||||
yuanli:'楷体',
|
yuanli:'方正北魏楷书_GBK',
|
||||||
xingkai:'行楷',
|
xingkai:'方正行楷_GBK',
|
||||||
shousha:'手杀',
|
shousha:'方正隶变_GBK',
|
||||||
},
|
},
|
||||||
theme:{
|
theme:{
|
||||||
woodden:'木纹',
|
woodden:'木纹',
|
||||||
|
|
Loading…
Reference in New Issue