This commit is contained in:
libccy 2017-03-26 14:00:38 +08:00
parent f86b26c198
commit ad25c652ce
4 changed files with 122 additions and 8 deletions

View File

@ -371,6 +371,12 @@
else{
map.touchscreen.hide();
}
if(lib.device){
map.enable_vibrate.show();
}
else{
map.enable_vibrate.hide();
}
if(lib.config.touchscreen){
map.mousewheel.hide();
map.hover_all.hide();
@ -2369,6 +2375,27 @@
else{
map.show_handcardbutton.hide();
}
if(lib.device){
if(lib.device=='android'){
map.show_statusbar_android.show();
map.show_statusbar_ios.hide();
}
else if(lib.device=='ios'){
map.show_statusbar_ios.show();
map.show_statusbar_android.hide();
}
if(!game.download){
setTimeout(function(){
if(!window.StatusBar){
map.show_statusbar.hide();
}
},5000);
}
}
else{
map.show_statusbar_ios.hide();
map.show_statusbar_android.hide();
}
if(get.is.phoneLayout()){
map.remember_round_button.show();
map.reset_round_button.show();
@ -2497,7 +2524,7 @@
show_time2:{
name:'显示时间',
intro:'在触屏按钮处显示当前时间',
init:true,
init:false,
unfrequent:true,
onclick:function(bool){
game.saveConfig('show_time2',bool);
@ -2522,6 +2549,56 @@
ui.roundmenu.dataset.watchface=item;
}
},
show_statusbar_android:{
name:'显示状态栏',
init:false,
unfrequent:true,
content:function(bool){
game.saveConfig('show_statusbar',bool);
if(window.StatusBar&&lib.device=='android'){
if(bool){
window.StatusBar.overlaysWebView(false);
window.StatusBar.backgroundColorByName('black');
window.StatusBar.show();
}
else{
ui.window.classList.remove('statusbar');
window.StatusBar.hide();
}
}
}
},
show_statusbar_ios:{
name:'显示状态栏',
init:'off',
unfrequent:true,
item:{
default:'默认',
overlay:'嵌入',
off:'关闭'
},
onclick:function(bool){
game.saveConfig('show_statusbar_ios',bool);
if(window.StatusBar&&lib.device=='ios'){
if(bool!='off'){
if(lib.config.show_statusbar_ios=='default'){
window.StatusBar.overlaysWebView(false);
ui.window.classList.remove('statusbar');
}
else{
window.StatusBar.overlaysWebView(true);
ui.window.classList.add('statusbar');
}
window.StatusBar.backgroundColorByName('black');
window.StatusBar.show();
}
else{
ui.window.classList.remove('statusbar');
window.StatusBar.hide();
}
}
}
},
show_card_prompt:{
name:'显示出牌信息',
intro:'出牌时在使用者上显示卡牌名称',
@ -6153,6 +6230,29 @@
if(ui.updateUpdate){
ui.updateUpdate();
}
if(window.StatusBar){
if(lib.device=='android'){
if(lib.config.show_statusbar_android){
window.StatusBar.overlaysWebView(false);
window.StatusBar.backgroundColorByName('black');
window.StatusBar.show();
}
}
else if(lib.device=='ios'){
if(lib.config.show_statusbar_ios!='off'){
if(lib.config.show_statusbar_ios=='default'){
window.StatusBar.overlaysWebView(false);
ui.window.classList.remove('statusbar');
}
else{
window.StatusBar.overlaysWebView(true);
ui.window.classList.add('statusbar');
}
window.StatusBar.backgroundColorByName('black');
window.StatusBar.show();
}
}
}
}
}
if(!lib.config.touchscreen){
@ -6210,6 +6310,7 @@
break;
}
}
game.metaZoom=zoom;
}
}
game.documentZoom=1;

View File

@ -1,8 +1,8 @@
window.noname_update={
version:'1.9.15',
version:'1.9.16',
// update:'1.9.14',
changeLog:[
'bug修复',
'状态栏选项需更新ios/android客户端',
],
files:[
'game/game.js',
@ -22,8 +22,8 @@ window.noname_update={
// 'mode/tafang.js',
'mode/stone.js',
// 'theme/woodden/style.css',
// 'layout/default/layout.css',
// 'layout/default/phone.css',
'layout/default/layout.css',
'layout/default/phone.css',
// 'layout/default/menu.css',
// 'theme/style/cardback/*',
// 'layout/long/layout.css',

View File

@ -42,9 +42,19 @@ table {
transition-property: opacity;
overflow: hidden
}
#window.ipad {
height: calc(100% - 15px);
top: 15px;
#window.statusbar {
top: 30px;
height: calc(100% - 30px);
overflow: visible;
}
#window.statusbar::before{
content:'';
position:absolute;
left: 0;
top: -30px;
width: 100%;
height: 30px;
background: rgba(0,0,0,0.4);
}
#window>.tutorial_tap {
width: 30px;

View File

@ -49,6 +49,9 @@
#system>div:not(.shown){
transform: translateY(-80px);
}
#window.statusbar #system>div:not(.shown){
transform: translateY(-120px);
}
#system>#system1{
width: 140px;
}