MineOS/Extensions/Pic/ContextMenu.lua
Igor Timofeev ed3fc063ec aefaefefa
2018-09-09 14:45:37 +03:00

11 lines
392 B
Lua
Executable File

local computer = require("computer")
local MineOSCore = require("MineOSCore")
local icon, menu = select(1, ...), select(2, ...)
menu:addItem(MineOSCore.localization.setAsWallpaper).onTouch = function()
MineOSCore.properties.wallpaperEnabled = true
MineOSCore.properties.wallpaper = icon.path
MineOSCore.saveProperties()
computer.pushSignal("MineOSCore", "updateWallpaper")
end