This commit is contained in:
libccy 2017-11-13 20:05:05 +08:00
parent cef4f56aaa
commit ce43f4a1bc
8 changed files with 167 additions and 26 deletions

View File

@ -2625,6 +2625,7 @@ window.noname_asset_list=[
'theme/music/wood.png', 'theme/music/wood.png',
'theme/music/wood3.png', 'theme/music/wood3.png',
'theme/simple/card.png', 'theme/simple/card.png',
'theme/simple/card2.png',
'theme/simple/grid.png', 'theme/simple/grid.png',
'theme/simple/unknown.png', 'theme/simple/unknown.png',
'theme/simple/wood.png', 'theme/simple/wood.png',

View File

@ -38750,31 +38750,116 @@
} }
} }
else{ else{
var nodes=[]; var list2=get.copy(list);
_status.clickingidentity=[this.parentNode,nodes]; if(game.getIdentityList2){
var num=1; game.getIdentityList2(list2);
var dy=30;
if(get.is.phoneLayout()){
dy=40;
} }
for(var i in list){ var rect=this.getBoundingClientRect();
if(this.firstChild.innerHTML!=list[i]){ this._customintro=function(uiintro){
var node=ui.create.div('.identity.hidden.pointerdiv',this.parentNode,ui.click.identity2); if(get.mode()=='guozhan'){
ui.create.div(node).innerHTML=list[i]; uiintro.clickintro=true;
node.dataset.color=i; }
ui.refresh(node); else{
node.show(); uiintro.touchclose=true;
var transstr='translateY('+((num++)*dy)+'px)'; }
if(get.is.phoneLayout()){ // if(lib.config.theme!='woodden'){
transstr+=' scale(1.3)'; uiintro.classList.add('woodbg');
} // }
if(get.is.newLayout()&&this.parentNode.classList.contains('linked')){ if(get.is.phoneLayout()){
transstr+=' rotate(90deg)'; uiintro.style.width='100px';
} }
node.style.transform=transstr; else{
nodes.push(node); uiintro.style.width='85px';
} }
} var source=this.parentNode;
for(var i in list){
var node=ui.create.div();
node.classList.add('guessidentity');
node.classList.add('pointerdiv');
ui.create.div('.menubutton.large',list2[i],node);
if(!get.is.phoneLayout()){
node.firstChild.style.fontSize='24px';
node.firstChild.style.lineHeight='24px';
}
if(get.mode()=='guozhan'){
if(source._guozhanguess){
if(!source._guozhanguess.contains(i)){
node.classList.add('transparent');
}
}
node.listen(function(){
var list=[];
if(this.link[2]!='unknown'){
this.classList.toggle('transparent');
if(!this.classList.contains('transparent')){
var info=this.link;
info[0].firstChild.innerHTML=info[1];
info[0].dataset.color=info[2];
list.add(info[2]);
}
}
else{
var info=this.link;
info[0].firstChild.innerHTML=info[1];
info[0].dataset.color=info[2];
return;
}
for(var i=0;i<this.parentNode.childNodes.length;i++){
if(!this.parentNode.childNodes[i].classList.contains('transparent')){
var info=this.parentNode.childNodes[i].link;
if(!list.length){
info[0].firstChild.innerHTML=info[1];
info[0].dataset.color=info[2];
}
list.add(info[2]);
}
}
source._guozhanguess=list;
});
}
else{
node.listen(function(){
var info=this.link;
info[0].firstChild.innerHTML=info[1];
info[0].dataset.color=info[2];
_status.clicked=false;
});
}
node.link=[this,list[i],i];
uiintro.add(node);
}
};
ui.click.touchpop();
ui.click.intro.call(this,{
clientX:rect.left+rect.width/2,
clientY:rect.top+rect.height/2+30
});
// var nodes=[];
// _status.clickingidentity=[this.parentNode,nodes];
// var num=1;
// var dy=30;
// if(get.is.phoneLayout()){
// dy=45;
// }
// for(var i in list){
// if(this.firstChild.innerHTML!=list[i]){
// var node=ui.create.div('.identity.hidden.pointerdiv',this.parentNode,ui.click.identity2);
// ui.create.div(node).innerHTML=list[i];
// node.dataset.color=i;
// ui.refresh(node);
// node.show();
// var transstr='translateY('+((num++)*dy)+'px)';
// if(get.is.phoneLayout()){
// transstr+=' scale(1.3)';
// }
// if(get.is.newLayout()&&this.parentNode.classList.contains('linked')){
// transstr+=' rotate(90deg)';
// }
// node.style.transform=transstr;
// nodes.push(node);
// }
// }
} }
}, },
identity2:function(){ identity2:function(){
@ -41102,6 +41187,9 @@
uiintro.addEventListener('mouseleave',clickintro); uiintro.addEventListener('mouseleave',clickintro);
uiintro.addEventListener('click',clickintro); uiintro.addEventListener('click',clickintro);
} }
else if(uiintro.touchclose){
uiintro.listen(clickintro);
}
game.pause2(); game.pause2();
return uiintro; return uiintro;

View File

@ -3706,6 +3706,17 @@ div[data-decoration="bronze"]::after,
.button[data-decoration="bronze"]::after{ .button[data-decoration="bronze"]::after{
transform:scale(0.75) translate(9px,2px); transform:scale(0.75) translate(9px,2px);
} }
.guessidentity{
display: block;
position: relative;
}
.guessidentity>.menubutton.large{
display: block;
position: relative;
}
/*.guessidentity>.menubutton.large:not(*[data-nature="none"]){
color:white;
}*/
div[data-decoration="gold"]::before, div[data-decoration="gold"]::before,

View File

@ -2144,6 +2144,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
return list; return list;
}, },
getIdentityList2:function(list){
for(var i in list){
switch(i){
case 'unknown':list[i]='未知';break;
case 'ye':list[i]='野心家';break;
case 'qun':list[i]+='雄';break;
default:list[i]+='国';
}
}
},
getVideoName:function(){ getVideoName:function(){
var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2); var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2);
var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+ var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+

View File

@ -390,6 +390,17 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
} }
}, },
getIdentityList2:function(list){
for(var i in list){
switch(i){
case 'fan':list[i]='反贼';break;
case 'zhong':list[i]='忠臣';break;
case 'nei':list[i]='内奸';break;
case 'zhu':list[i]='主公';break;
case 'cai':list[i]='未知';break;
}
}
},
getVideoName:function(){ getVideoName:function(){
var str=get.translation(game.me.name); var str=get.translation(game.me.name);
if(game.me.name2){ if(game.me.name2){
@ -1633,7 +1644,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(this.ai.shown<-0.5) this.ai.shown=-0.5; if(this.ai.shown<-0.5) this.ai.shown=-0.5;
var marknow=(!_status.connectMode&&this!=game.me&&get.config('auto_mark_identity')&&this.ai.identity_mark!='finished'); var marknow=(!_status.connectMode&&this!=game.me&&get.config('auto_mark_identity')&&this.ai.identity_mark!='finished');
if(true){ // if(true){
if(marknow&&_status.clickingidentity&&_status.clickingidentity[0]==this){ if(marknow&&_status.clickingidentity&&_status.clickingidentity[0]==this){
for(var i=0;i<_status.clickingidentity[1].length;i++){ for(var i=0;i<_status.clickingidentity[1].length;i++){
_status.clickingidentity[1][i].delete(); _status.clickingidentity[1][i].delete();
@ -1704,7 +1715,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
this.ai.identity_mark='finished'; this.ai.identity_mark='finished';
} }
} }
} // }
}, },
} }

View File

@ -109,6 +109,15 @@ body[data-background_color_music='blue'] #arena.mobile:not(.chess) .player[data-
background-position: -6px -6px; background-position: -6px -6px;
} }
.woodbg{
color:rgba(77, 60, 51,0.8) !important;
text-shadow:none !important;
}
.woodbg .menubutton.large{
background: url('wood3.png') !important;
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 0 5px !important;
}
#window .player.minskin.obstacle[data-obscolor='blue']{ #window .player.minskin.obstacle[data-obscolor='blue']{
background: repeating-linear-gradient( background: repeating-linear-gradient(
135deg, 135deg,

BIN
theme/simple/card2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -159,6 +159,17 @@ body{
box-shadow: rgba(0,0,0,0.6) 0 0 5px inset; box-shadow: rgba(0,0,0,0.6) 0 0 5px inset;
} }
.woodbg{
color:rgba(77, 60, 51,1) !important;
text-shadow:none !important;
}
.woodbg .menubutton.large{
background: url('card2.png') !important;
background-size: 100% 100% !important;
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 0 5px !important;
}
.player>.glassbg{ .player>.glassbg{
left: 0; left: 0;
top: 0; top: 0;