This commit is contained in:
libccy 2017-08-10 12:34:43 +08:00
parent abb5eade9c
commit 79d6073284
4 changed files with 104 additions and 7 deletions

View File

@ -1,5 +1,5 @@
window.noname_asset_list=[ window.noname_asset_list=[
'1.9.35.1', '1.9.36',
'image/background/huangtian_bg.jpg', 'image/background/huangtian_bg.jpg',
'image/background/ol_bg.jpg', 'image/background/ol_bg.jpg',
'image/background/september_bg.jpg', 'image/background/september_bg.jpg',

View File

@ -2563,7 +2563,7 @@
map.clear_log.hide(); map.clear_log.hide();
} }
if(get.is.phoneLayout()){ if(get.is.phoneLayout()){
map.show_time2.show(); map.show_time2.show();
map.show_time.hide(); map.show_time.hide();
if(lib.config.show_time2){ if(lib.config.show_time2){
map.watchface.show(); map.watchface.show();
@ -2573,7 +2573,7 @@
} }
} }
else{ else{
map.show_time2.hide(); map.show_time2.hide();
map.show_time.show(); map.show_time.show();
map.watchface.hide(); map.watchface.hide();
} }
@ -2690,6 +2690,11 @@
ui.roundmenu.dataset.watchface=item; ui.roundmenu.dataset.watchface=item;
} }
}, },
show_time3:{
name:'显示游戏时间',
init:false,
unfrequent:true
},
show_statusbar_android:{ show_statusbar_android:{
name:'显示状态栏', name:'显示状态栏',
init:false, init:false,
@ -2999,7 +3004,7 @@
unfrequent:true, unfrequent:true,
onclick:function(bool){ onclick:function(bool){
game.saveConfig('show_cardpile',bool); game.saveConfig('show_cardpile',bool);
if(lib.config.show_cardpile){ if(bool){
ui.cardPileButton.style.display=''; ui.cardPileButton.style.display='';
} }
else{ else{
@ -3007,6 +3012,20 @@
} }
} }
}, },
show_cardpile_number:{
name:'显示剩余牌数',
init:false,
unfrequent:true,
onclick:function(bool){
game.saveConfig('show_cardpile_number',bool);
if(bool){
ui.cardPileNumber.style.display='';
}
else{
ui.cardPileNumber.style.display='none';
}
}
},
show_handcardbutton:{ show_handcardbutton:{
name:'显示手牌按钮', name:'显示手牌按钮',
init:true, init:true,
@ -28344,6 +28363,7 @@
} }
ui.arena.classList.remove('menupaused'); ui.arena.classList.remove('menupaused');
ui.historybar.classList.remove('menupaused'); ui.historybar.classList.remove('menupaused');
ui.window.classList.remove('touchinfohidden');
ui.config2.classList.remove('pressdown2'); ui.config2.classList.remove('pressdown2');
} }
}; };
@ -28604,6 +28624,7 @@
ui.config2.classList.add('pressdown2'); ui.config2.classList.add('pressdown2');
ui.arena.classList.add('menupaused'); ui.arena.classList.add('menupaused');
ui.historybar.classList.add('menupaused'); ui.historybar.classList.add('menupaused');
ui.window.classList.add('touchinfohidden');
menuContainer.classList.remove('hidden'); menuContainer.classList.remove('hidden');
for(var i=0;i<menuUpdates.length;i++){ for(var i=0;i<menuUpdates.length;i++){
menuUpdates[i](); menuUpdates[i]();
@ -36091,6 +36112,8 @@
ui.arena.dataset.framedecoration=lib.config.border_style.slice(7); ui.arena.dataset.framedecoration=lib.config.border_style.slice(7);
} }
ui.gameinfo=ui.create.div('#time',ui.window);
ui.arenalog=ui.create.div('#arenalog',ui.arena); ui.arenalog=ui.create.div('#arenalog',ui.arena);
if(lib.config.show_log=='off'){ if(lib.config.show_log=='off'){
ui.arenalog.style.display='none'; ui.arenalog.style.display='none';
@ -36126,6 +36149,47 @@
ui.roundmenu.classList.add('clock'); ui.roundmenu.classList.add('clock');
} }
ui.roundmenu.dataset.watchface=lib.config.watchface||'none'; ui.roundmenu.dataset.watchface=lib.config.watchface||'none';
if(get.is.phoneLayout()){
if(lib.config.show_time3){
ui.time3=ui.create.div('.touchinfo.left',ui.window);
}
ui.cardPileNumber=ui.create.div('.touchinfo.right',ui.window);
}
else{
if(lib.config.show_time3){
ui.time3=ui.create.div(ui.gameinfo);
}
ui.cardPileNumber=ui.create.div(ui.gameinfo);
}
if(!lib.config.show_cardpile_number){
ui.cardPileNumber.style.display='none';
}
if(ui.time3){
ui.time3.starttime=get.utc();
ui.time3.interval=setInterval(function(){
var num=Math.round((get.utc()-ui.time3.starttime)/1000);
if(num>=3600){
var num1=Math.floor(num/3600);
var num2=Math.floor((num-num1*3600)/60);
if(num2<10){
num2='0'+num2.toString();
}
var num3=num-num1*3600-num2*60;
if(num3<10){
num3='0'+num3.toString();
}
ui.time3.innerHTML=num+':'+num2+':'+num3;
}
else{
var num1=Math.floor(num/60);
var num2=num-num1*60;
if(num2<10){
num2='0'+num2.toString();
}
ui.time3.innerHTML=num1+':'+num2;
}
},1000);
}
if(get.is.nomenu()){ if(get.is.nomenu()){
if(!['menu','system'].contains(lib.config.round_menu_func)){ if(!['menu','system'].contains(lib.config.round_menu_func)){
lib.config.round_menu_func='system'; lib.config.round_menu_func='system';
@ -36298,7 +36362,7 @@
ui.controls=[]; ui.controls=[];
ui.style={}; ui.style={};
ui.time=ui.create.div('#time',ui.window); ui.time=ui.create.div(ui.gameinfo);
var timeInterval=function(){ var timeInterval=function(){
var date=new Date(); var date=new Date();
var hours=date.getHours(); var hours=date.getHours();
@ -36980,6 +37044,7 @@
ui.create.card(ui.cardPile).init(lib.card.list[i]); ui.create.card(ui.cardPile).init(lib.card.list[i]);
} }
} }
ui.cardPileNumber.innerHTML='0轮 剩余牌: '+ui.cardPile.childElementCount;
}, },
}, },
click:{ click:{
@ -40036,6 +40101,7 @@
node.appendChild(ui.sidebar3); node.appendChild(ui.sidebar3);
ui.historybar.classList.add('paused'); ui.historybar.classList.add('paused');
ui.arena.classList.add('paused'); ui.arena.classList.add('paused');
ui.window.classList.add('touchinfohidden');
ui.time.hide(); ui.time.hide();
if(game.onpause){ if(game.onpause){
game.onpause(); game.onpause();
@ -40050,6 +40116,7 @@
ui.time.show(); ui.time.show();
ui.historybar.classList.remove('paused'); ui.historybar.classList.remove('paused');
ui.arena.classList.remove('paused'); ui.arena.classList.remove('paused');
ui.window.classList.remove('touchinfohidden');
game.resume2(); game.resume2();
e.stopPropagation(); e.stopPropagation();
if(game.onresume){ if(game.onresume){

View File

@ -2,7 +2,8 @@ window.noname_update={
version:'1.9.36', version:'1.9.36',
// update:'1.9.35', // update:'1.9.35',
changeLog:[ changeLog:[
'新武将', '武将修改',
'显示剩余牌堆数'
], ],
files:[ files:[
'game/game.js', 'game/game.js',

View File

@ -122,12 +122,20 @@ table {
margin: 0; margin: 0;
position: absolute; position: absolute;
left: 0; left: 0;
top: 16px; top: 11px;
text-align: center; text-align: center;
pointer-events: none; pointer-events: none;
display: block; display: block;
font-family: 'xinwei' font-family: 'xinwei'
} }
#time>div{
margin: 0;
padding: 0;
display: inline-block;
margin-left: 6px;
margin-right: 6px;
position: relative;
}
#shortcut { #shortcut {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -535,6 +543,27 @@ table {
left: 8px; left: 8px;
} }
.touchinfo{
padding: 6px;
position: absolute;
color: white;
text-shadow: black 0 0 2px;
top: 0;
margin: 0;
font-family: 'xinwei'
}
.touchinfo.left{
left: 0;
}
.touchinfo.right{
left: auto;
right: 0;
text-align: right;
}
#window.touchinfohidden>.touchinfo{
opacity: 0;
}
.roundarenabutton { .roundarenabutton {
/*width: 50px; /*width: 50px;
height: 50px;*/ height: 50px;*/