This commit is contained in:
libccy 2017-05-31 15:55:11 +08:00
parent 2255244038
commit 9b8f4dee4e
6 changed files with 113 additions and 88 deletions

View File

@ -4674,8 +4674,8 @@
name:'专属武将出场率', name:'专属武将出场率',
init:'increase', init:'increase',
item:{ item:{
increase:'大概率出现', increase:'大概率',
normal:'与其他武将一致', normal:'默认概率',
off:'不出现', off:'不出现',
}, },
frequent:true frequent:true
@ -12951,7 +12951,7 @@
return this; return this;
}, },
smoothAvatar:function(){ smoothAvatar:function(){
var div=ui.create.div('.fulldiv'); var div=ui.create.div('.fullsize');
div.style.background=getComputedStyle(this.node.avatar).background; div.style.background=getComputedStyle(this.node.avatar).background;
this.node.avatar.appendChild(div); this.node.avatar.appendChild(div);
ui.refresh(div); ui.refresh(div);
@ -33785,7 +33785,7 @@
text.style.left='30px'; text.style.left='30px';
text.style.top='50px'; text.style.top='50px';
text.style.wordBreak='break-all'; text.style.wordBreak='break-all';
var pre=ui.create.node('pre.fulldiv',text); var pre=ui.create.node('pre.fullsize',text);
pre.style.margin=0; pre.style.margin=0;
pre.style.padding=0; pre.style.padding=0;
pre.style.position='relative'; pre.style.position='relative';
@ -39966,7 +39966,7 @@
ui.dialog.classList.add('scroll1'); ui.dialog.classList.add('scroll1');
ui.dialog.classList.add('scroll2'); ui.dialog.classList.add('scroll2');
if(game.layout!='default'){ if(game.layout!='default'){
ui.dialog.style.height=Math.min(height1,400)+'px'; ui.dialog.style.height=Math.min(height1,410)+'px';
ui.dialog._scrollset=true; ui.dialog._scrollset=true;
} }
} }

View File

@ -1089,7 +1089,7 @@ body>.background.upper {
transition-property: top,box-shadow,opacity,transform; transition-property: top,box-shadow,opacity,transform;
transition-duration: 0.5s; transition-duration: 0.5s;
} }
.fulldiv{ .fullsize{
width: 100%; width: 100%;
height: 100%; height: 100%;
left: 0; left: 0;

View File

@ -1072,7 +1072,8 @@ input.fileinput::-webkit-file-upload-button {
background-image: linear-gradient(rgba(75,75,75,1), rgba(70,70,70,1)); background-image: linear-gradient(rgba(75,75,75,1), rgba(70,70,70,1));
} }
.menubutton.large.blue, .menubutton.large.blue,
.menubutton.large.red{ .menubutton.large.red,
.redbg{
color:white !important; color:white !important;
box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 3px 10px !important; box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 3px 10px !important;
} }
@ -1080,6 +1081,9 @@ input.fileinput::-webkit-file-upload-button {
.menubutton.blue{ .menubutton.blue{
background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1)); background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1));
} }
.bluebg{
background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1)) !important;
}
#system>div>.pressdown{ #system>div>.pressdown{
transform: scale(0.97); transform: scale(0.97);
} }

View File

@ -2280,31 +2280,35 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var addSetting=function(dialog){ var addSetting=function(dialog){
dialog.add('选择座位').classList.add('add-setting'); dialog.add('选择座位').classList.add('add-setting');
var seats=document.createElement('table'); var seats=document.createElement('table');
seats.classList.add('pointertable');
seats.classList.add('add-setting'); seats.classList.add('add-setting');
seats.style.margin='0 auto'; seats.style.margin='0';
seats.style.maxWidth=(60*parseInt(get.config('player_number')))+'px'; seats.style.width='100%';
var tr=document.createElement('tr'); seats.style.position='relative';
seats.appendChild(tr);
for(var i=1;i<=game.players.length;i++){ for(var i=1;i<=game.players.length;i++){
var td=document.createElement('td'); var td=ui.create.div('.shadowed.reduce_radius.pointerdiv');
tr.appendChild(td); td.style.position='relative';
td.style.width='40px'; td.style.display='inline-block';
td.style.fontSize='25px'; td.style.padding='5px';
td.style.fontFamily='xinwei'; td.style.paddingLeft='8px';
td.style.paddingRight='8px';
td.style.fontSize='18px';
td.style.margin='4px';
td.style.marginLeft='6px';
td.style.marginRight='6px';
td.innerHTML='<span>'+get.cnNumber(i,true)+'</span>'; td.innerHTML='<span>'+get.cnNumber(i,true)+'</span>';
td.link=i-1; td.link=i-1;
seats.appendChild(td);
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
if(_status.dragged) return; if(_status.dragged) return;
if(_status.justdragged) return; if(_status.justdragged) return;
if(_status.cheat_seat){ if(_status.cheat_seat){
_status.cheat_seat.classList.remove('thundertext'); _status.cheat_seat.classList.remove('bluebg');
if(_status.cheat_seat==this){ if(_status.cheat_seat==this){
delete _status.cheat_seat; delete _status.cheat_seat;
return; return;
} }
} }
this.classList.add('thundertext'); this.classList.add('bluebg');
_status.cheat_seat=this; _status.cheat_seat=this;
}); });
} }

View File

@ -639,13 +639,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var addSetting=function(dialog){ var addSetting=function(dialog){
dialog.add('选择身份').classList.add('add-setting'); dialog.add('选择身份').classList.add('add-setting');
var table=document.createElement('table'); var table=document.createElement('div');
table.style.margin='0 auto';
table.style.maxWidth='400px';
table.classList.add('pointertable');
table.classList.add('add-setting'); table.classList.add('add-setting');
var tr=document.createElement('tr'); table.style.margin='0';
table.appendChild(tr); table.style.width='100%';
table.style.position='relative';
var listi; var listi;
if(event.zhongmode){ if(event.zhongmode){
listi=['random','zhu','mingzhong','zhong','nei','fan']; listi=['random','zhu','mingzhong','zhong','nei','fan'];
@ -655,14 +653,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
for(var i=0;i<listi.length;i++){ for(var i=0;i<listi.length;i++){
var td=document.createElement('td'); var td=ui.create.div('.shadowed.reduce_radius.pointerdiv');
tr.appendChild(td); td.style.position='relative';
td.style.display='inline-block';
td.link=listi[i]; td.link=listi[i];
td.style.fontSize='25px'; td.style.padding='5px';
td.style.fontFamily='xinwei'; td.style.paddingLeft='8px';
td.style.paddingRight='8px';
td.style.fontSize='18px';
td.style.margin='4px';
td.style.marginLeft='6px';
td.style.marginRight='6px';
if(td.link===game.me.identity){ if(td.link===game.me.identity){
td.classList.add('thundertext'); td.classList.add('bluebg');
} }
table.appendChild(td);
td.innerHTML='<span>'+get.translation(listi[i]+'2')+'</span>'; td.innerHTML='<span>'+get.translation(listi[i]+'2')+'</span>';
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
if(_status.dragged) return; if(_status.dragged) return;
@ -680,13 +685,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
delete game.zhu.isZhu; delete game.zhu.isZhu;
delete game.zhu.identityShown; delete game.zhu.identityShown;
} }
var current=this.parentNode.querySelector('.thundertext'); var current=this.parentNode.querySelector('.bluebg');
if(current){ if(current){
current.classList.remove('thundertext'); current.classList.remove('bluebg');
} }
current=seats.querySelector('.thundertext'); current=seats.querySelector('.bluebg');
if(current){ if(current){
current.classList.remove('thundertext'); current.classList.remove('bluebg');
} }
if(link=='random'){ if(link=='random'){
if(event.zhongmode){ if(event.zhongmode){
@ -697,12 +702,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
for(var i=0;i<this.parentNode.childElementCount;i++){ for(var i=0;i<this.parentNode.childElementCount;i++){
if(this.parentNode.childNodes[i].link==link){ if(this.parentNode.childNodes[i].link==link){
this.parentNode.childNodes[i].classList.add('thundertext'); this.parentNode.childNodes[i].classList.add('bluebg');
} }
} }
} }
else{ else{
this.classList.add('thundertext'); this.classList.add('bluebg');
} }
num=get.config('choice_'+link); num=get.config('choice_'+link);
if(event.zhongmode){ if(event.zhongmode){
@ -722,7 +727,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.check(); game.check();
for(var i=0;i<seats.firstChild.childElementCount;i++){ for(var i=0;i<seats.firstChild.childElementCount;i++){
if(get.distance(game.zhu,game.me,'absolute')===seats.firstChild.childNodes[i].link){ if(get.distance(game.zhu,game.me,'absolute')===seats.firstChild.childNodes[i].link){
seats.firstChild.childNodes[i].classList.add('thundertext'); seats.firstChild.childNodes[i].classList.add('bluebg');
} }
} }
} }
@ -743,33 +748,37 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
dialog.content.appendChild(table); dialog.content.appendChild(table);
dialog.add('选择座位').classList.add('add-setting'); dialog.add('选择座位').classList.add('add-setting');
var seats=document.createElement('table'); var seats=document.createElement('div');
seats.classList.add('pointertable');
seats.classList.add('add-setting'); seats.classList.add('add-setting');
seats.style.margin='0 auto'; seats.style.margin='0';
seats.style.maxWidth=(60*get.playerNumber()-1)+'px'; seats.style.width='100%';
var tr=document.createElement('tr'); seats.style.position='relative';
seats.appendChild(tr);
for(var i=2;i<=game.players.length;i++){ for(var i=2;i<=game.players.length;i++){
var td=document.createElement('td'); var td=ui.create.div('.shadowed.reduce_radius.pointerdiv');
tr.appendChild(td); td.style.position='relative';
td.style.width='40px'; td.style.display='inline-block';
td.style.fontSize='25px'; td.style.padding='5px';
td.style.fontFamily='xinwei'; td.style.paddingLeft='8px';
td.innerHTML='<span>'+get.cnNumber(i,true)+'</span>'; td.style.paddingRight='8px';
td.style.fontSize='18px';
td.style.margin='4px';
td.style.marginLeft='6px';
td.style.marginRight='6px';
td.innerHTML=get.cnNumber(i,true);
td.link=i-1; td.link=i-1;
seats.appendChild(td);
if(get.distance(game.zhu,game.me,'absolute')===i-1){ if(get.distance(game.zhu,game.me,'absolute')===i-1){
td.classList.add('thundertext'); td.classList.add('bluebg');
} }
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
if(_status.dragged) return; if(_status.dragged) return;
if(_status.justdragged) return; if(_status.justdragged) return;
if(get.distance(game.zhu,game.me,'absolute')==this.link) return; if(get.distance(game.zhu,game.me,'absolute')==this.link) return;
var current=this.parentNode.querySelector('.thundertext'); var current=this.parentNode.querySelector('.bluebg');
if(current){ if(current){
current.classList.remove('thundertext'); current.classList.remove('bluebg');
} }
this.classList.add('thundertext'); this.classList.add('bluebg');
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(get.distance(game.players[i],game.me,'absolute')==this.link){ if(get.distance(game.players[i],game.me,'absolute')==this.link){
game.swapSeat(game.zhu,game.players[i],false);return; game.swapSeat(game.zhu,game.players[i],false);return;

View File

@ -793,32 +793,36 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var addSetting=function(dialog){ var addSetting=function(dialog){
dialog.add('选择座位').classList.add('add-setting'); dialog.add('选择座位').classList.add('add-setting');
var seats=document.createElement('table'); var seats=document.createElement('table');
seats.classList.add('pointertable'); seats.classList.add('add-setting');
seats.classList.add('add-setting'); seats.style.margin='0';
seats.style.margin='0 auto'; seats.style.width='100%';
seats.style.width='200px'; seats.style.position='relative';
var tr=document.createElement('tr');
seats.appendChild(tr);
for(var i=1;i<=game.players.length;i++){ for(var i=1;i<=game.players.length;i++){
var td=document.createElement('td'); var td=ui.create.div('.shadowed.reduce_radius.pointerdiv');
tr.appendChild(td); td.style.position='relative';
td.style.width='40px'; td.style.display='inline-block';
td.style.fontSize='25px'; td.style.padding='5px';
td.style.fontFamily='xinwei'; td.style.paddingLeft='8px';
td.innerHTML='<span>'+get.cnNumber(i,true)+'</span>'; td.style.paddingRight='8px';
td.link=i-1; td.style.fontSize='18px';
td.style.margin='4px';
td.style.marginLeft='6px';
td.style.marginRight='6px';
td.innerHTML=get.cnNumber(i,true);
td.link=i-1;
seats.appendChild(td);
if(get.distance(_status.firstAct,game.me,'absolute')===i-1){ if(get.distance(_status.firstAct,game.me,'absolute')===i-1){
td.classList.add('thundertext'); td.classList.add('bluebg');
} }
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
if(_status.dragged) return; if(_status.dragged) return;
if(_status.justdragged) return; if(_status.justdragged) return;
if(get.distance(_status.firstAct,game.me,'absolute')==this.link) return; if(get.distance(_status.firstAct,game.me,'absolute')==this.link) return;
var current=this.parentNode.querySelector('.thundertext'); var current=this.parentNode.querySelector('.bluebg');
if(current){ if(current){
current.classList.remove('thundertext'); current.classList.remove('bluebg');
} }
this.classList.add('thundertext'); this.classList.add('bluebg');
_status.firstAct=game.me; _status.firstAct=game.me;
for(var i=0;i<this.link;i++){ for(var i=0;i<this.link;i++){
_status.firstAct=_status.firstAct.previous; _status.firstAct=_status.firstAct.previous;
@ -1079,32 +1083,36 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var addSetting=function(dialog){ var addSetting=function(dialog){
dialog.add('选择座位').classList.add('add-setting'); dialog.add('选择座位').classList.add('add-setting');
var seats=document.createElement('table'); var seats=document.createElement('table');
seats.classList.add('pointertable'); seats.classList.add('add-setting');
seats.classList.add('add-setting'); seats.style.margin='0';
seats.style.margin='0 auto'; seats.style.width='100%';
seats.style.width='200px'; seats.style.position='relative';
var tr=document.createElement('tr'); for(var i=1;i<=game.players.length;i++){
seats.appendChild(tr); var td=ui.create.div('.shadowed.reduce_radius.pointerdiv');
for(var i=1;i<=game.players.length;i++){ td.style.position='relative';
var td=document.createElement('td'); td.style.display='inline-block';
tr.appendChild(td); td.style.padding='5px';
td.style.width='40px'; td.style.paddingLeft='8px';
td.style.fontSize='25px'; td.style.paddingRight='8px';
td.style.fontFamily='xinwei'; td.style.fontSize='18px';
td.innerHTML='<span>'+get.cnNumber(i,true)+'</span>'; td.style.margin='4px';
td.link=i-1; td.style.marginLeft='6px';
td.style.marginRight='6px';
td.innerHTML=get.cnNumber(i,true);
td.link=i-1;
seats.appendChild(td);
if(get.distance(_status.firstAct,game.me,'absolute')===i-1){ if(get.distance(_status.firstAct,game.me,'absolute')===i-1){
td.classList.add('thundertext'); td.classList.add('bluebg');
} }
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
if(_status.dragged) return; if(_status.dragged) return;
if(_status.justdragged) return; if(_status.justdragged) return;
if(get.distance(_status.firstAct,game.me,'absolute')==this.link) return; if(get.distance(_status.firstAct,game.me,'absolute')==this.link) return;
var current=this.parentNode.querySelector('.thundertext'); var current=this.parentNode.querySelector('.bluebg');
if(current){ if(current){
current.classList.remove('thundertext'); current.classList.remove('bluebg');
} }
this.classList.add('thundertext'); this.classList.add('bluebg');
_status.firstAct=game.me; _status.firstAct=game.me;
for(var i=0;i<this.link;i++){ for(var i=0;i<this.link;i++){
_status.firstAct=_status.firstAct.previous; _status.firstAct=_status.firstAct.previous;