diff --git a/game/asset.js b/game/asset.js index b22cf7b1d..26003380c 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,9 +1,9 @@ window.noname_asset_list=[ - '1.9.11', + '1.9.11.1', 'image/background/huangtian_bg.jpg', + 'image/background/september_bg.jpg', 'image/background/shengshi_bg.jpg', 'image/background/taoyuan_bg.jpg', - 'image/background/xueji_bg.jpg', 'image/background/yinxiang_bg.jpg', 'image/background/zhanhuo_bg.jpg', 'image/background/zhulian_bg.jpg', diff --git a/game/config.js b/game/config.js index 597cc270b..e8e247145 100644 --- a/game/config.js +++ b/game/config.js @@ -35,13 +35,7 @@ window.config={ theme:['woodden','music','simple'], card_font:['xiaozhuan','huangcao','caoshu','xingshu'], double_hp:['hejiansan','pingjun','zuidazhi','zuixiaozhi','zonghe'], - - image_character:['default'], - image_background:['default','huangyueying_bg','zhulian_bg', - 'zhanhuo_bg','xueji_bg','yinxiang_bg','chunhui_bg', - 'grass_bg','huangtian_bg'], image_background_filter:['default','blur','gray','sepia','invert','saturate','contrast','hue','brightness'], - background_music:['music_default','music_diaochan','music_shezhan','music_danji','music_random','music_off'] }, game:'sgs', diff --git a/game/game.js b/game/game.js index 97e6fbb4a..2c8b5a7e7 100644 --- a/game/game.js +++ b/game/game.js @@ -709,13 +709,65 @@ init:'default', item:{ default:'默认', - custom:'自定', + }, + visualBar:function(node,item,create){ + if(node.created){ + node.lastChild.classList.remove('active'); + return; + } + node.created=true; + ui.create.filediv('.menubutton','添加背景',node,function(file){ + if(file){ + var name=file.name; + if(name.indexOf('.')!=-1){ + name=name.slice(0,name.indexOf('.')); + } + var link='custom_'+name; + item[link]=name; + game.putDB('image',link,file,function(){ + create(link); + lib.config.customBackgroundPack.add(link); + game.saveConfig('customBackgroundPack',lib.config.customBackgroundPack); + }); + if(node.lastChild.classList.contains('active')){ + editbg.call(node.lastChild); + } + } + }); + var editbg=function(){ + this.classList.toggle('active'); + var page=this.parentNode.parentNode; + for(var i=0;i'+ - ''+ - '', - clear:true, - }, + // import_background:{ + // name:'
'+ + // ''+ + // '
', + // clear:true, + // }, image_background_random:{ name:'随机背景', init:false @@ -1667,7 +1756,7 @@ if(lib.config.image_background_random){ map.image_background_blur.show(); map.image_background.hide(); - map.import_background.hide(); + // map.import_background.hide(); } else{ map.image_background.show(); @@ -1677,12 +1766,12 @@ else{ map.image_background_blur.show(); } - if(lib.config.image_background=='custom'&&lib.db){ - map.import_background.show(); - } - else{ - map.import_background.hide(); - } + // if(lib.config.image_background=='custom'&&lib.db){ + // map.import_background.show(); + // } + // else{ + // map.import_background.hide(); + // } } if(config.show_card_prompt){ map.hide_card_prompt_basic.show(); @@ -1942,6 +2031,7 @@ game.saveConfig('hiddenCharacterPack',[]); game.saveConfig('hiddenCardPack',[]); game.saveConfig('hiddenPlayPack',[]); + game.saveConfig('hiddenBackgroundPack',[]); var that=this; setTimeout(function(){ that.innerHTML='重置隐藏扩展包'; @@ -4716,8 +4806,13 @@ } if(background&&background.pack){ for(i in background.pack){ + if(lib.config.hiddenBackgroundPack.contains(i)) continue; lib.configMenu.appearence.config.image_background.item[i]=background.pack[i]; } + for(var i=0;iposition2){ position.insertBefore(node,position.childNodes[position2]); @@ -23991,12 +24137,7 @@ popupContainer.appendChild(node); var rect=node.getBoundingClientRect(); if(node.classList.contains('visual')){ - if(node.querySelectorAll('.menu.visual>div').length>9){ - node.style.overflow='scroll'; - } - else{ - node.style.overflow=''; - } + var num=node.querySelectorAll('.menu.visual>div').length; node.style.top=(e.y-node.offsetHeight/2+30)+'px'; for(var i=0;ibr')); + while(br.length){ + br.shift().remove(); + } + var split=[]; + for(var i=1;i.menu.visual{ padding: 5px; - /*max-width: 300px;*/ - max-height: 305px; - overflow: hidden; + max-height: 310px; + overflow: scroll; +} +.popup-container>.menu.visual.withbar{ + max-height: 350px; } .popup-container>.menu>div{ padding-top:5px; @@ -597,6 +599,36 @@ width: 90px; height: 90px; } +.popup-container>.menu.visual.withbar>div:last-child{ + display: block; + width: calc(100% - 10px); + text-align: center; + height: auto; + cursor: default !important; +} +.popup-container>.menu.visual.withbar>div:last-child>div{ + display: inline-block; + position: relative; + margin-left: 5px; + margin-right: 5px; +} +#window:not(.nopointer) .popup-container>.menu.visual.withbar>div:last-child>div{ + cursor: pointer; +} + +input.fileinput{ + margin: 0 !important; + padding: 0 !important; + position: absolute !important; + width: 100% !important; + height: 100% !important; + left: 0 !important; + top: 0 !important; + opacity: 0 !important; +} +#window:not(.nopointer) input.fileinput{ + cursor: pointer; +} .popup-container>.menu.visual>.button.character>.name{ top: 10px; } diff --git a/theme/woodden/style.css b/theme/woodden/style.css index 4dfb64baf..8aab4356e 100644 --- a/theme/woodden/style.css +++ b/theme/woodden/style.css @@ -146,7 +146,8 @@ html{ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 0 5px !important; } .menubutton.large.active, -.menubutton.round.active{ +.menubutton.round.active, +.menubutton.active{ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 0.4) 0 0 0 2px, rgba(0, 133, 255, 1) 0 0 5px !important; } .themebutton{