This commit is contained in:
libccy 2017-01-20 20:10:37 +08:00
parent 5649a1d2d4
commit 55e9131284
7 changed files with 167 additions and 136 deletions

View File

@ -455,7 +455,7 @@
map.enable_dragline.hide(); map.enable_dragline.hide();
map.enable_touchdragline.hide(); map.enable_touchdragline.hide();
} }
if(lib.config.layout!='phone'){ if(!lib.isPhoneLayout()){
map.round_menu_func.hide(); map.round_menu_func.hide();
} }
else{ else{
@ -495,7 +495,6 @@
default:'旧版', default:'旧版',
newlayout:'对称', newlayout:'对称',
mobile:'默认', mobile:'默认',
phone:'移动'
}, },
onclick:function(layout){ onclick:function(layout){
if(lib.config.layoutfixed.contains(lib.config.mode)&&layout=='default'){ if(lib.config.layoutfixed.contains(lib.config.mode)&&layout=='default'){
@ -504,68 +503,6 @@
else{ else{
lib.init.layout(layout); lib.init.layout(layout);
} }
if(lib.config.cardshape=='oblong'&&(lib.config.layout=='phone'||lib.config.layout=='mobile')){
ui.arena.classList.add('oblongcard');
if(game.me.classList.contains('linked')){
game.me.classList.remove('linked');
game.me.classList.add('linked2');
}
}
else{
if(game.me.classList.contains('linked2')){
game.me.classList.remove('linked2');
game.me.classList.add('linked');
}
ui.arena.classList.remove('oblongcard');
}
if(lib.config.textequip=='text'&&(lib.config.layout=='phone'||lib.config.layout=='mobile')){
ui.arena.classList.add('textequip');
}
else{
ui.arena.classList.remove('textequip');
}
}
},
cardshape:{
name:'手牌显示',
init:'default',
item:{
default:'默认',
oblong:'长方',
},
onclick:function(item){
game.saveConfig('cardshape',item);
if(item=='oblong'&&(lib.config.layout=='phone'||lib.config.layout=='mobile')){
ui.arena.classList.add('oblongcard');
if(game.me.classList.contains('linked')){
game.me.classList.remove('linked');
game.me.classList.add('linked2');
}
}
else{
ui.arena.classList.remove('oblongcard');
if(game.me.classList.contains('linked2')){
game.me.classList.remove('linked2');
game.me.classList.add('linked');
}
}
}
},
textequip:{
name:'装备显示',
init:'image',
item:{
image:'图片',
text:'文字',
},
onclick:function(item){
game.saveConfig('textequip',item);
if(item=='text'&&(lib.config.layout=='phone'||lib.config.layout=='mobile')){
ui.arena.classList.add('textequip');
}
else{
ui.arena.classList.remove('textequip');
}
} }
}, },
// background_color_music:{ // background_color_music:{
@ -703,6 +640,21 @@
} }
}, },
}, },
phonelayout:{
name:'触屏布局',
init:false,
onclick:function(bool){
game.saveConfig('phonelayout',bool);
if(lib.isPhoneLayout()){
ui.css.phone.href=lib.assetURL+'layout/default/phone.css';
ui.roundmenu.style.display='';
}
else{
ui.css.phone.href='';
ui.roundmenu.style.display='none';
}
}
},
change_skin:{ change_skin:{
name:'双击换肤', name:'双击换肤',
init:true, init:true,
@ -1228,7 +1180,7 @@
init:true, init:true,
}, },
target_shake:{ target_shake:{
name:'目标', name:'目标效',
init:'off', init:'off',
item:{ item:{
off:'关闭', off:'关闭',
@ -1265,6 +1217,50 @@
} }
game.saveConfig('link_style',style); game.saveConfig('link_style',style);
} }
},
cardshape:{
name:'手牌显示',
init:'default',
unfrequent:true,
item:{
default:'默认',
oblong:'长方',
},
onclick:function(item){
game.saveConfig('cardshape',item);
if(item=='oblong'&&(lib.config.layout=='long'||lib.config.layout=='mobile')){
ui.arena.classList.add('oblongcard');
if(game.me&&game.me.classList.contains('linked')){
game.me.classList.remove('linked');
game.me.classList.add('linked2');
}
}
else{
ui.arena.classList.remove('oblongcard');
if(game.me&&game.me.classList.contains('linked2')){
game.me.classList.remove('linked2');
game.me.classList.add('linked');
}
}
}
},
textequip:{
name:'装备显示',
init:'image',
unfrequent:true,
item:{
image:'图片',
text:'文字',
},
onclick:function(item){
game.saveConfig('textequip',item);
if(item=='text'&&(lib.config.layout=='long'||lib.config.layout=='mobile')){
ui.arena.classList.add('textequip');
}
else{
ui.arena.classList.remove('textequip');
}
}
}, },
name_font:{ name_font:{
name:'人名字体', name:'人名字体',
@ -1322,13 +1318,15 @@
// } // }
// }, // },
update:function(config,map){ update:function(config,map){
if(config.layout=='phone'){ if(lib.isPhoneLayout()){
map.show_time2.show(); map.show_time2.show();
map.show_time.hide(); map.show_time.hide();
map.watchface.show();
} }
else{ else{
map.show_time2.hide(); map.show_time2.hide();
map.show_time.show(); map.show_time.show();
map.watchface.hide();
} }
if(lib.config.image_background=='default'){ if(lib.config.image_background=='default'){
map.image_background_blur.hide(); map.image_background_blur.hide();
@ -1350,7 +1348,7 @@
map.hide_card_prompt_basic.hide(); map.hide_card_prompt_basic.hide();
map.hide_card_prompt_equip.hide(); map.hide_card_prompt_equip.hide();
} }
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
map.remember_round_button.show(); map.remember_round_button.show();
map.reset_round_button.show(); map.reset_round_button.show();
map.show_pause.hide(); map.show_pause.hide();
@ -1364,13 +1362,15 @@
map.remember_round_button.hide(); map.remember_round_button.hide();
map.reset_round_button.hide(); map.reset_round_button.hide();
} }
if(lib.config.layout=='phone'||lib.config.layout=='mobile'){ if(lib.config.layout=='long'||lib.config.layout=='mobile'){
map.textequip.show(); map.textequip.show();
map.cardshape.show(); map.cardshape.show();
map.phonelayout.show();
} }
else{ else{
map.textequip.hide(); map.textequip.hide();
map.cardshape.hide(); map.cardshape.hide();
map.phonelayout.hide();
} }
if(config.show_log!='off'){ if(config.show_log!='off'){
map.clear_log.show(); map.clear_log.show();
@ -3563,15 +3563,19 @@
dialog.style.top=idealtop+'px'; dialog.style.top=idealtop+'px';
}, },
isMobileMe:function(player){ isMobileMe:function(player){
return (lib.config.layout=='mobile'||lib.config.layout=='phone')&&!game.chess&&player.dataset.position==0; return (lib.config.layout=='mobile'||lib.config.layout=='long')&&!game.chess&&player.dataset.position==0;
}, },
isNewLayout:function(){ isNewLayout:function(){
if(lib.config.layout!='default') return true; if(lib.config.layout!='default') return true;
if(lib.config.layoutfixed.contains(lib.config.mode)) return true; if(lib.config.layoutfixed.contains(lib.config.mode)) return true;
return false; return false;
}, },
isPhoneLayout:function(){
if(!lib.config.phonelayout) return false;
return (lib.config.layout=='mobile'||lib.config.layout=='long');
},
isSingleHandcard:function(){ isSingleHandcard:function(){
if(game.singleHandcard||lib.config.layout=='mobile'||lib.config.layout=='phone'){ if(game.singleHandcard||lib.config.layout=='mobile'||lib.config.layout=='long'){
return true; return true;
} }
if(lib.config.layout=='default'&&lib.config.layoutfixed.contains(lib.config.mode)){ if(lib.config.layout=='default'&&lib.config.layoutfixed.contains(lib.config.mode)){
@ -3823,8 +3827,7 @@
game.saveConfig('low_performance',true); game.saveConfig('low_performance',true);
game.saveConfig('confirm_exit',true); game.saveConfig('confirm_exit',true);
if(!lib.ipad){ if(!lib.ipad){
game.saveConfig('layout','phone'); game.saveConfig('phonelayout',true);
game.saveConfig('layouths','phone');
} }
} }
delete lib.ipad; delete lib.ipad;
@ -3927,7 +3930,16 @@
layout='mobile'; layout='mobile';
} }
} }
if(layout=='phone'){
layout='mobile';
game.saveConfig('layout','mobile');
game.saveConfig('phonelayout',true);
}
ui.css.layout=lib.init.css(lib.assetURL+'layout/'+layout,'layout'); ui.css.layout=lib.init.css(lib.assetURL+'layout/'+layout,'layout');
ui.css.phone=lib.init.css();
if(lib.isPhoneLayout()){
ui.css.phone.href=lib.assetURL+'layout/default/phone.css';
}
ui.css.theme=lib.init.css(lib.assetURL+'theme/'+lib.config.theme,'style'); ui.css.theme=lib.init.css(lib.assetURL+'theme/'+lib.config.theme,'style');
ui.css.card_style=lib.init.css(lib.assetURL+'theme/style/card',lib.config.card_style); ui.css.card_style=lib.init.css(lib.assetURL+'theme/style/card',lib.config.card_style);
ui.css.cardback_style=lib.init.css(lib.assetURL+'theme/style/cardback',lib.config.cardback_style); ui.css.cardback_style=lib.init.css(lib.assetURL+'theme/style/cardback',lib.config.cardback_style);
@ -3943,8 +3955,7 @@
if(totouch){ if(totouch){
game.saveConfig('touchscreen',true); game.saveConfig('touchscreen',true);
game.saveConfig('low_performance',true); game.saveConfig('low_performance',true);
game.saveConfig('layout','phone'); game.saveConfig('phonelayout',true);
game.saveConfig('layouths','phone');
game.saveConfig('confirm_exit',true); game.saveConfig('confirm_exit',true);
game.reload(); game.reload();
} }
@ -4764,7 +4775,9 @@
css:function(path,file,before){ css:function(path,file,before){
var style = document.createElement("link"); var style = document.createElement("link");
style.rel = "stylesheet"; style.rel = "stylesheet";
if(path){
style.href = path+'/'+file+".css"; style.href = path+'/'+file+".css";
}
if(before){ if(before){
document.head.insertBefore(style,before); document.head.insertBefore(style,before);
} }
@ -4802,9 +4815,8 @@
if(!nosave) game.saveConfig('layout',layout); if(!nosave) game.saveConfig('layout',layout);
ui.arena.hide(); ui.arena.hide();
setTimeout(function(){ setTimeout(function(){
var layout=ui.css.layout; ui.css.layout.href=lib.assetURL+'layout/'+lib.config.layout+'/layout.css';
ui.css.layout=lib.init.css(lib.assetURL+'layout/'+lib.config.layout,'layout',layout); if(lib.config.layout=='mobile'||lib.config.layout=='long'){
if(lib.config.layout=='mobile'||lib.config.layout=='phone'){
ui.arena.classList.add('mobile'); ui.arena.classList.add('mobile');
if(game.me&&game.me.node.handcards2.childNodes.length){ if(game.me&&game.me.node.handcards2.childNodes.length){
while(game.me.node.handcards2.childNodes.length){ while(game.me.node.handcards2.childNodes.length){
@ -4827,14 +4839,35 @@
else{ else{
ui.arena.classList.remove('hpimage'); ui.arena.classList.remove('hpimage');
} }
if(lib.config.layout=='phone'){ if(lib.config.cardshape=='oblong'&&(lib.config.layout=='long'||lib.config.layout=='mobile')){
ui.arena.classList.add('oblongcard');
if(game.me&&game.me.classList.contains('linked')){
game.me.classList.remove('linked');
game.me.classList.add('linked2');
}
}
else{
ui.arena.classList.remove('oblongcard');
if(game.me&&lib.config.link_style!='mark'&&game.me.classList.contains('linked2')){
game.me.classList.remove('linked2');
game.me.classList.add('linked');
}
}
if(lib.config.textequip=='text'&&(lib.config.layout=='long'||lib.config.layout=='mobile')){
ui.arena.classList.add('textequip');
}
else{
ui.arena.classList.remove('textequip');
}
if(lib.isPhoneLayout()){
ui.css.phone.href=lib.assetURL+'layout/default/phone.css';
ui.roundmenu.style.display=''; ui.roundmenu.style.display='';
} }
else{ else{
ui.css.phone.href='';
ui.roundmenu.style.display='none'; ui.roundmenu.style.display='none';
} }
setTimeout(function(){ setTimeout(function(){
layout.remove();
ui.arena.show(); ui.arena.show();
if(game.me) game.me.update(); if(game.me) game.me.update();
setTimeout(function(){ setTimeout(function(){
@ -9292,7 +9325,7 @@
( (
this.maxHp>9|| this.maxHp>9||
(this.maxHp>5&&this.classList.contains('minskin'))|| (this.maxHp>5&&this.classList.contains('minskin'))||
((lib.config.layout=='mobile'||lib.config.layout=='phone')&&this.dataset.position==0&&this.maxHp>7) ((lib.config.layout=='mobile'||lib.config.layout=='long')&&this.dataset.position==0&&this.maxHp>7)
)){ )){
hp.innerHTML=this.hp+'<br>/<br>'+this.maxHp; hp.innerHTML=this.hp+'<br>/<br>'+this.maxHp;
hp.classList.add('text'); hp.classList.add('text');
@ -21149,7 +21182,7 @@
} }
popupContainer.appendChild(node); popupContainer.appendChild(node);
var rect=node.getBoundingClientRect(); var rect=node.getBoundingClientRect();
if(lib.config.layout=='phone'&&rect.top*1.3+rect.height*1.3+20>ui.window.offsetHeight){ if(lib.isPhoneLayout()&&rect.top*1.3+rect.height*1.3+20>ui.window.offsetHeight){
node.style.top=(ui.window.offsetHeight-20-rect.height*1.3)/1.3+'px'; node.style.top=(ui.window.offsetHeight-20-rect.height*1.3)/1.3+'px';
} }
popupContainer.classList.remove('hidden'); popupContainer.classList.remove('hidden');
@ -21249,7 +21282,7 @@
active._link.remove(); active._link.remove();
} }
this.classList.add('active'); this.classList.add('active');
if((game.deviceZoom!=1||lib.crosswalk||lib.device=='ios')&&lib.config.layout=='phone'){ if((game.deviceZoom!=1||lib.crosswalk||lib.device=='ios')&&lib.isPhoneLayout()){
menuTabBar.style.left=(this.offsetLeft/game.documentZoom)+'px'; menuTabBar.style.left=(this.offsetLeft/game.documentZoom)+'px';
} }
else{ else{
@ -27158,7 +27191,7 @@
var list=[]; var list=[];
var dialog; var dialog;
var node=ui.create.div('.caption'); var node=ui.create.div('.caption');
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
node.style.fontSize='30px'; node.style.fontSize='30px';
} }
var namecapt=[]; var namecapt=[];
@ -27336,7 +27369,7 @@
newlined.style.marginTop='5px'; newlined.style.marginTop='5px';
newlined.style.display='block'; newlined.style.display='block';
newlined.style.fontFamily='xinwei'; newlined.style.fontFamily='xinwei';
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
newlined.style.fontSize='32px'; newlined.style.fontSize='32px';
} }
else{ else{
@ -27440,7 +27473,7 @@
newlined2.style.marginTop='5px'; newlined2.style.marginTop='5px';
newlined2.style.display='none'; newlined2.style.display='none';
newlined2.style.fontFamily='xinwei'; newlined2.style.fontFamily='xinwei';
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
newlined2.style.fontSize='32px'; newlined2.style.fontSize='32px';
} }
else{ else{
@ -27473,7 +27506,7 @@
span.style.display='inline-block'; span.style.display='inline-block';
span.style.width='auto'; span.style.width='auto';
span.style.margin='5px'; span.style.margin='5px';
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
span.style.fontSize='32px'; span.style.fontSize='32px';
} }
else{ else{
@ -27577,7 +27610,7 @@
newlined.style.marginTop='5px'; newlined.style.marginTop='5px';
newlined.style.display='block'; newlined.style.display='block';
newlined.style.fontFamily='xinwei'; newlined.style.fontFamily='xinwei';
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
newlined.style.fontSize='32px'; newlined.style.fontSize='32px';
} }
else{ else{
@ -27948,7 +27981,7 @@
ui.system=ui.create.div("#system.",ui.window); ui.system=ui.create.div("#system.",ui.window);
ui.arena=ui.create.div('#arena.nome',ui.window); ui.arena=ui.create.div('#arena.nome',ui.window);
if(lib.config.layout=='mobile'||lib.config.layout=='phone'){ if(lib.config.layout=='mobile'||lib.config.layout=='long'){
ui.arena.classList.add('mobile'); ui.arena.classList.add('mobile');
} }
if(lib.config.layout=='default'){ if(lib.config.layout=='default'){
@ -27966,7 +27999,7 @@
if(lib.config.layout=='default'&&lib.config.hp_style=='official'){ if(lib.config.layout=='default'&&lib.config.hp_style=='official'){
ui.arena.classList.add('hpimage'); ui.arena.classList.add('hpimage');
} }
if(lib.config.layout=='phone'||lib.config.layout=='mobile'){ if(lib.config.layout=='long'||lib.config.layout=='mobile'){
if(lib.config.textequip=='text') ui.arena.classList.add('textequip'); if(lib.config.textequip=='text') ui.arena.classList.add('textequip');
if(lib.config.cardshape=='oblong') ui.arena.classList.add('oblongcard'); if(lib.config.cardshape=='oblong') ui.arena.classList.add('oblongcard');
} }
@ -28078,7 +28111,7 @@
ui.roundmenu.style.transform='translate('+translate[0]+'px,'+translate[1]+'px)'; ui.roundmenu.style.transform='translate('+translate[0]+'px,'+translate[1]+'px)';
ui.click.checkroundtranslate(); ui.click.checkroundtranslate();
} }
if(lib.config.layout!='phone'){ if(!lib.isPhoneLayout()){
ui.roundmenu.style.display='none'; ui.roundmenu.style.display='none';
} }
@ -28980,7 +29013,7 @@
ui.refresh(node); ui.refresh(node);
node.show(); node.show();
var transstr='translateY('+((num++)*30)+'px)'; var transstr='translateY('+((num++)*30)+'px)';
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
transstr+=' scale(1.3)'; transstr+=' scale(1.3)';
} }
if(lib.isNewLayout()&&this.parentNode.isLinked()){ if(lib.isNewLayout()&&this.parentNode.isLinked()){
@ -29042,7 +29075,7 @@
}, },
pauseconfig:function(){ pauseconfig:function(){
if(!lib.config.auto_popped_config) return; if(!lib.config.auto_popped_config) return;
if(lib.config.layout=='phone') return; if(lib.isPhoneLayout()) return;
var uiintro=ui.create.dialog('hidden'); var uiintro=ui.create.dialog('hidden');
uiintro.listen(function(e){ uiintro.listen(function(e){
e.stopPropagation(); e.stopPropagation();
@ -29142,7 +29175,7 @@
}); });
var list=ui.create.div('.caption'); var list=ui.create.div('.caption');
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
list.style.maxHeight='250px'; list.style.maxHeight='250px';
} }
else{ else{
@ -29322,7 +29355,7 @@
ui.window.appendChild(uiintro); ui.window.appendChild(uiintro);
var width=this._poppedwidth||330; var width=this._poppedwidth||330;
uiintro.style.width=width+'px'; uiintro.style.width=width+'px';
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
width*=1.3; width*=1.3;
} }
@ -29332,12 +29365,12 @@
else{ else{
var height=this._poppedheight||uiintro.content.scrollHeight; var height=this._poppedheight||uiintro.content.scrollHeight;
var height2=ui.window.offsetHeight-260; var height2=ui.window.offsetHeight-260;
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
height2=(ui.window.offsetHeight-80)/1.3; height2=(ui.window.offsetHeight-80)/1.3;
} }
uiintro.style.height=Math.min(height2,height)+'px'; uiintro.style.height=Math.min(height2,height)+'px';
} }
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
uiintro.style.top='70px'; uiintro.style.top='70px';
} }
else{ else{
@ -30276,7 +30309,7 @@
if(!ui.shortcut.classList.contains('hidden')){ if(!ui.shortcut.classList.contains('hidden')){
ui.click.shortcut(false); ui.click.shortcut(false);
} }
if(lib.config.layout=='phone'&&ui.menuContainer.classList.contains('hidden')){ if(lib.isPhoneLayout()&&ui.menuContainer.classList.contains('hidden')){
if(ui.system2.classList.contains('shown')){ if(ui.system2.classList.contains('shown')){
_status.removinground=true; _status.removinground=true;
setTimeout(function(){ setTimeout(function(){
@ -30839,7 +30872,7 @@
} }
var uiintro; var uiintro;
if(this.classList.contains('card')&&this.parentNode&& if(this.classList.contains('card')&&this.parentNode&&
this.parentNode.classList.contains('equips')&&lib.config.layout=='phone'&& this.parentNode.classList.contains('equips')&&lib.isPhoneLayout()&&
!lib.isMobileMe(this.parentNode.parentNode)){ !lib.isMobileMe(this.parentNode.parentNode)){
uiintro=get.nodeintro(this.parentNode.parentNode,false,e); uiintro=get.nodeintro(this.parentNode.parentNode,false,e);
} }
@ -31211,14 +31244,6 @@
widths.push(ui.control.childNodes[i].offsetWidth); widths.push(ui.control.childNodes[i].offsetWidth);
} }
controls.push(ui.control.childNodes[i]); controls.push(ui.control.childNodes[i]);
// if(i>0){
// if(lib.config.layout=='phone'){
// width+=12;
// }
// else{
// width+=6;
// }
// }
} }
if(!controls.length) return; if(!controls.length) return;
var offset=-length/2; var offset=-length/2;
@ -31229,7 +31254,7 @@
var control=controls.shift(); var control=controls.shift();
var width=widths.shift(); var width=widths.shift();
offset+=width+6; offset+=width+6;
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
offset+=6; offset+=6;
} }
control.style.transform='translateX('+offset+'px)'; control.style.transform='translateX('+offset+'px)';
@ -33007,7 +33032,7 @@
} }
} }
} }
if(lib.config.layout=='phone'){ if(lib.isPhoneLayout()){
var storage=node.storage; var storage=node.storage;
for(i in storage){ for(i in storage){
if(get.info(i)&&get.info(i).intro){ if(get.info(i)&&get.info(i).intro){
@ -33026,7 +33051,7 @@
} }
} }
} }
if(!simple||lib.config.layout=='phone'){ if(!simple||lib.isPhoneLayout()){
var es=node.get('e'); var es=node.get('e');
for(var i=0;i<es.length;i++){ for(var i=0;i<es.length;i++){
uiintro.add('<div><div class="skill">'+es[i].outerHTML+'</div><div>'+lib.translate[es[i].name+'_info']+'</div></div>'); uiintro.add('<div><div class="skill">'+es[i].outerHTML+'</div><div>'+lib.translate[es[i].name+'_info']+'</div></div>');
@ -33055,7 +33080,7 @@
uiintro.add(addFavourite); uiintro.add(addFavourite);
} }
if(!simple||lib.config.layout=='phone'){ if(!simple||lib.isPhoneLayout()){
if(lib.falseitem){ if(lib.falseitem){
uiintro.add(ui.create.div('.placeholder')); uiintro.add(ui.create.div('.placeholder'));
var table,tr,td; var table,tr,td;

View File

@ -44,6 +44,8 @@ window.noname_source_list=[
// 'layout/default/hearthstone.css', // 'layout/default/hearthstone.css',
'layout/default/layout.css', 'layout/default/layout.css',
'layout/default/menu.css', 'layout/default/menu.css',
'layout/default/phone.css',
'layout/long/layout.css',
'layout/mobile/equip.css', 'layout/mobile/equip.css',
'layout/mobile/layout.css', 'layout/mobile/layout.css',
'layout/mode/boss.css', 'layout/mode/boss.css',
@ -53,7 +55,6 @@ window.noname_source_list=[
'layout/newlayout/equip.css', 'layout/newlayout/equip.css',
'layout/newlayout/global.css', 'layout/newlayout/global.css',
'layout/newlayout/layout.css', 'layout/newlayout/layout.css',
'layout/phone/layout.css',
'mode/boss.js', 'mode/boss.js',
'mode/chess.js', 'mode/chess.js',
'mode/guozhan.js', 'mode/guozhan.js',

View File

@ -1,8 +1,10 @@
@import "../mobile/layout.css";
#arena{ #arena{
height: calc(97% + 30px); height: calc(97% + 30px);
top:3% top:3%
} }
#arena.oblongcard:not(.chess):not(.nome){
height: calc(97% + 10px);
}
#arena.mobile>#control{ #arena.mobile>#control{
top:calc(100% - 205px); top:calc(100% - 205px);
} }

0
layout/long/layout.css Normal file
View File

View File

@ -1887,15 +1887,15 @@ mode.chess={
delete window.characterRank; delete window.characterRank;
ui.control.style.transition='all 0s'; ui.control.style.transition='all 0s';
if(lib.config.layout=='mobile'||lib.config.layout=='default'){ if(lib.isPhoneLayout()){
ui.control.style.top='calc(100% - 70px)';
}
else if(lib.config.layout=='phone'){
ui.control.style.top='calc(100% - 80px)'; ui.control.style.top='calc(100% - 80px)';
} }
else{ else if(lib.config.layout=='newlayout'){
ui.control.style.top='calc(100% - 30px)'; ui.control.style.top='calc(100% - 30px)';
} }
else{
ui.control.style.top='calc(100% - 70px)';
}
var cardNode=function(i,name,load){ var cardNode=function(i,name,load){
var node=ui.create.player(ui.window); var node=ui.create.player(ui.window);
node.style.transition='all 0.7s'; node.style.transition='all 0.7s';
@ -3433,15 +3433,16 @@ mode.chess={
jiange.childNodes[i].classList.add('squarebutton'); jiange.childNodes[i].classList.add('squarebutton');
} }
ui.control.style.transition='all 0s'; ui.control.style.transition='all 0s';
if(lib.config.layout=='mobile'||lib.config.layout=='default'){
ui.control.style.top='calc(100% - 70px)'; if(lib.isPhoneLayout()){
}
else if(lib.config.layout=='phone'){
ui.control.style.top='calc(100% - 80px)'; ui.control.style.top='calc(100% - 80px)';
} }
else{ else if(lib.config.layout=='newlayout'){
ui.control.style.top='calc(100% - 30px)'; ui.control.style.top='calc(100% - 30px)';
} }
else{
ui.control.style.top='calc(100% - 70px)';
}
var next=game.me.chooseButton(dialog,true); var next=game.me.chooseButton(dialog,true);
next._triggered=null; next._triggered=null;

View File

@ -65,19 +65,21 @@ mode.identity={
ui.create.control('继续',step2); ui.create.control('继续',step2);
} }
var step2=function(){ var step2=function(){
if(lib.config.layout!='phone'){ if(!lib.config.phonelayout){
clear(); clear();
ui.create.dialog('如果你在使用手机,可能会觉得按钮有点小'+ ui.create.dialog('如果你在使用手机,可能会觉得按钮有点小'+
',将布局改成移动可以使按钮变大'); ',将布局改成移动可以使按钮变大');
ui.dialog.add('<div class="text center">你可以在选项-外观-布局中更改此设置'); ui.dialog.add('<div class="text center">你可以在选项-外观-布局中更改此设置');
var lcontrol=ui.create.control('使用移动布局',function(){ var lcontrol=ui.create.control('使用移动布局',function(){
if(lib.config.layout=='phone'){ if(lib.config.phonelayout){
ui.control.firstChild.firstChild.innerHTML='使用移动布局'; ui.control.firstChild.firstChild.innerHTML='使用移动布局';
game.saveConfig('phonelayout',false);
lib.init.layout('mobile'); lib.init.layout('mobile');
} }
else{ else{
ui.control.firstChild.firstChild.innerHTML='使用默认布局'; ui.control.firstChild.firstChild.innerHTML='使用默认布局';
lib.init.layout('phone'); game.saveConfig('phonelayout',true);
lib.init.layout('mobile');
} }
}); });
ui.create.control('继续',step3); ui.create.control('继续',step3);

View File

@ -1094,15 +1094,15 @@ mode.versus={
game.resume(); game.resume();
}; };
ui.control.style.transition='all 0s'; ui.control.style.transition='all 0s';
if(lib.config.layout=='mobile'){ if(lib.isPhoneLayout()){
ui.control.style.top='calc(100% - 70px)';
}
else if(lib.config.layout=='phone'){
ui.control.style.top='calc(100% - 80px)'; ui.control.style.top='calc(100% - 80px)';
} }
else{ else if(lib.config.layout=='newlayout'){
ui.control.style.top='calc(100% - 30px)'; ui.control.style.top='calc(100% - 30px)';
} }
else{
ui.control.style.top='calc(100% - 70px)';
}
_status.friend=[]; _status.friend=[];
_status.enemy=[]; _status.enemy=[];
game.additionaldead=[]; game.additionaldead=[];