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/wood3.png',
'theme/simple/card.png',
'theme/simple/card2.png',
'theme/simple/grid.png',
'theme/simple/unknown.png',
'theme/simple/wood.png',

View File

@ -38750,31 +38750,116 @@
}
}
else{
var nodes=[];
_status.clickingidentity=[this.parentNode,nodes];
var num=1;
var dy=30;
if(get.is.phoneLayout()){
dy=40;
var list2=get.copy(list);
if(game.getIdentityList2){
game.getIdentityList2(list2);
}
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);
}
}
var rect=this.getBoundingClientRect();
this._customintro=function(uiintro){
if(get.mode()=='guozhan'){
uiintro.clickintro=true;
}
else{
uiintro.touchclose=true;
}
// if(lib.config.theme!='woodden'){
uiintro.classList.add('woodbg');
// }
if(get.is.phoneLayout()){
uiintro.style.width='100px';
}
else{
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(){
@ -41102,6 +41187,9 @@
uiintro.addEventListener('mouseleave',clickintro);
uiintro.addEventListener('click',clickintro);
}
else if(uiintro.touchclose){
uiintro.listen(clickintro);
}
game.pause2();
return uiintro;

View File

@ -3706,6 +3706,17 @@ div[data-decoration="bronze"]::after,
.button[data-decoration="bronze"]::after{
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,

View File

@ -2144,6 +2144,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
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(){
var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2);
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(){
var str=get.translation(game.me.name);
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;
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){
for(var i=0;i<_status.clickingidentity[1].length;i++){
_status.clickingidentity[1][i].delete();
@ -1704,7 +1715,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
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;
}
.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']{
background: repeating-linear-gradient(
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;
}
.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{
left: 0;
top: 0;