Wallpaper Engine:壁纸引擎

Wallpaper Engine:壁纸引擎

冲田总司(樱saber)测试版0.21
遇事不决先卖萌Poi  [开发者] 2017 年 1 月 3 日 下午 2:20
手动添加自定义更换壁纸功能
估计是服务器问题,无法更新了,把添加功能方法在这里发一下,有动手能力的自己改一下吧。

打开X:\SteamLibrary\steamapps\workshop\content\431960\824140860 (X指的是你的steam安装库所在的盘符)

用编辑器工具或者文本文档、记事本打开index.html文件

在倒数第二行 </script> 上面 插入以下代码:

window.wallpaperPropertyListener = {
applyUserProperties: function (properties) {

if (properties.customwallpaper) {
imageElement = document.getElementsByTagName('body')[0];
if(properties.custombool.value){
imageElement.style.background = 'url('+'images/bg.jpg'+')';
imageElement.style.backgroundSize = 'cover';
}
}
if (properties.customimage) {
imageElement = document.getElementsByTagName('body')[0];
if(properties.customimage.value){
imageElement.style.background = 'url('+'file://' + properties.customimage.value+')';
imageElement.style.backgroundSize = 'cover';
}
}

}
};


然后保存文件 重新载入壁纸就可以了
< >
正在显示第 1 - 12 条,共 12 条留言
trgfvj 2017 年 1 月 4 日 上午 7:18 
菜园小海 2017 年 1 月 4 日 下午 5:17 
成功了!顶
Nabekane 2017 年 1 月 4 日 下午 10:32 
可以了
Agni_Shine 2017 年 1 月 5 日 上午 3:38 
window.wallpaperPropertyListener = {
applyUserProperties: function (properties) {
imageElement = document.getElementsByTagName('body')[0];
if (properties.customwallpaper) {
if(properties.custombool.value){
imageElement.style.background = 'url('+'images/bg.jpg'+')';
imageElement.style.backgroundSize = 'cover';
}
}
if (properties.customimage) {
if(properties.customimage.value){
imageElement.style.background = 'url('+'file://' + properties.customimage.value+')';
imageElement.style.backgroundSize = 'cover';
}
}
}
};
去掉了重复声明:bbtgem:
scarleteyes 2017 年 1 月 6 日 上午 2:01 
可以解决 简直完美!
sakana1 2017 年 1 月 6 日 上午 6:55 
谢谢dalao:2016trophy:
たつや 2017 年 1 月 7 日 下午 12:51 
效果完美,不过为什么背景会变暗了一些。。。有办法能自行调整吗?
你TM是不是要杠 2017 年 1 月 7 日 下午 8:09 
重启后更改的背景又没了,这个是什么原因啊:steamsad:
VERX 2017 年 2 月 9 日 上午 5:46 
改了有什么用??
VERX 2017 年 2 月 9 日 上午 5:53 
不能自定义背景呢??改了没反应啊
柏峰礼 2017 年 2 月 10 日 下午 4:51 
好使!但是图片好暗啊……
秋墨昱染 2017 年 3 月 14 日 上午 6:39 
图片偏暗。。。求解决方法
< >
正在显示第 1 - 12 条,共 12 条留言
每页显示数: 1530 50