Wallpaper Engine

Wallpaper Engine

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

打开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';
}
}

}
};


然后保存文件 重新载入壁纸就可以了
< >
Showing 1-12 of 12 comments
trgfvj 4 Jan, 2017 @ 7:18am 
菜园小海 4 Jan, 2017 @ 5:17pm 
成功了!顶
Nabekane 4 Jan, 2017 @ 10:32pm 
可以了
Agni_Shine 5 Jan, 2017 @ 3:38am 
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 6 Jan, 2017 @ 2:01am 
可以解决 简直完美!
sakana1 6 Jan, 2017 @ 6:55am 
谢谢dalao:2016trophy:
たつや 7 Jan, 2017 @ 12:51pm 
效果完美,不过为什么背景会变暗了一些。。。有办法能自行调整吗?
重启后更改的背景又没了,这个是什么原因啊:steamsad:
VERX 9 Feb, 2017 @ 5:46am 
改了有什么用??
VERX 9 Feb, 2017 @ 5:53am 
不能自定义背景呢??改了没反应啊
柏峰礼 10 Feb, 2017 @ 4:51pm 
好使!但是图片好暗啊……
秋墨昱染 14 Mar, 2017 @ 6:39am 
图片偏暗。。。求解决方法
< >
Showing 1-12 of 12 comments
Per page: 1530 50