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){
|
||||
if(dialog._place_text){
|
||||
if(dialog._place_text.firstChild.offsetWidth>=190||
|
||||
dialog._place_text.firstChild.offsetHeight>=30){
|
||||
dialog._place_text.style.textAlign='left';
|
||||
if(dialog._place_text.firstChild.offsetWidth>=190||dialog._place_text.firstChild.offsetHeight>=30){
|
||||
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]){
|
||||
|
@ -7805,17 +7806,19 @@
|
|||
|
||||
if(pack.font){
|
||||
ui.css.fontsheet=lib.init.sheet();
|
||||
for(i in pack.font){
|
||||
lib.configMenu.appearence.config.name_font.item[i]=pack.font[i];
|
||||
lib.configMenu.appearence.config.identity_font.item[i]=pack.font[i];
|
||||
lib.configMenu.appearence.config.cardtext_font.item[i]=pack.font[i];
|
||||
lib.configMenu.appearence.config.global_font.item[i]=pack.font[i];
|
||||
ui.css.fontsheet.sheet.insertRule("@font-face {font-family: '"+i+"'; src: url('"+lib.assetURL+"font/"+i+".ttf');}",0);
|
||||
if(lib.config.suits_font) ui.css.fontsheet.sheet.insertRule("@font-face {font-family: '"+i+"'; src: url('"+lib.assetURL+"font/suits.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);
|
||||
lib.configMenu.appearence.config.cardtext_font.item.default='默认';
|
||||
lib.configMenu.appearence.config.global_font.item.default='默认';
|
||||
const appearenceConfig=lib.configMenu.appearence.config,fontSheet=ui.css.fontsheet.sheet,suitsFont=lib.config.suits_font;
|
||||
Object.keys(pack.font).forEach(value=>{
|
||||
const font=pack.font[value];
|
||||
appearenceConfig.name_font.item[value]=font;
|
||||
appearenceConfig.identity_font.item[value]=font;
|
||||
appearenceConfig.cardtext_font.item[value]=font;
|
||||
appearenceConfig.global_font.item[value]=font;
|
||||
fontSheet.insertRule(`@font-face {font-family: '${value}'; src: local('${font}'), url('${lib.assetURL}font/${value}.ttf');}`,0);
|
||||
if(suitsFont) fontSheet.insertRule(`@font-face {font-family: '${value}'; src: local('${font}'), url('${lib.assetURL}font/suits.ttf');}`,0);
|
||||
});
|
||||
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();
|
||||
|
|
|
@ -128,12 +128,12 @@ window.noname_package={
|
|||
music_jilve:'极略',
|
||||
},
|
||||
font:{
|
||||
xiaozhuan:'小篆',
|
||||
xinwei:'新魏',
|
||||
huangcao:'黄草',
|
||||
yuanli:'楷体',
|
||||
xingkai:'行楷',
|
||||
shousha:'手杀',
|
||||
xiaozhuan:'方正小篆体',
|
||||
xinwei:'华文新魏_GBK',
|
||||
huangcao:'方正黄草_GBK',
|
||||
yuanli:'方正北魏楷书_GBK',
|
||||
xingkai:'方正行楷_GBK',
|
||||
shousha:'方正隶变_GBK',
|
||||
},
|
||||
theme:{
|
||||
woodden:'木纹',
|
||||
|
|
Loading…
Reference in New Issue