diff --git a/Applications.txt b/Applications.txt index 861baa86..f05b93e2 100644 --- a/Applications.txt +++ b/Applications.txt @@ -29,8 +29,8 @@ ["version"]=1.0, }, { - ["name"]="MineOS/Pictures/Afterlife.pic", - ["url"]="IgorTimofeev/OpenComputers/master/MineOS/Wallpapers/Afterlife.pic", + ["name"]="MineOS/Pictures/Govnokod.pic", + ["url"]="IgorTimofeev/OpenComputers/master/MineOS/Wallpapers/Govnokod.pic", ["type"]="Wallpaper", ["version"]=1.0, }, @@ -410,7 +410,12 @@ ["name"]="bin/get.lua", ["url"]="IgorTimofeev/OpenComputers/master/Applications/get.lua", ["type"]="Script", - ["forceDownload"]=true, + ["version"]=1.0, + }, + { + ["name"]="bin/convertImage.lua", + ["url"]="IgorTimofeev/OpenComputers/master/Applications/convertImage.lua", + ["type"]="Script", ["version"]=1.0, }, { @@ -585,7 +590,7 @@ ["icon"]="IgorTimofeev/OpenComputers/master/Applications/AppMarket/Icon.pic", ["createShortcut"]="dock", ["forceDownload"]=true, - ["version"]=1.33, + ["version"]=1.34, }, { ["name"]="MineOS/Applications/Snake", diff --git a/Applications/AppMarket/AppMarket.lua b/Applications/AppMarket/AppMarket.lua index 735da984..5293a883 100644 --- a/Applications/AppMarket/AppMarket.lua +++ b/Applications/AppMarket/AppMarket.lua @@ -202,9 +202,6 @@ local function drawMain(refreshData) getApplication(i) end x, y = drawApplication(x, y, i) - -- else - -- ecs.error(matchCount, from, from + limit - 1) - -- break end matchCount = matchCount + 1 end @@ -379,11 +376,13 @@ while true do obj.nextPageButton:press() fromY = sizes.yMain + 1 from = from + limit + currentApps = {} drawAll(true, false) elseif obj.prevPageButton:isClicked(e[3], e[4]) then if from > limit then fromY = sizes.yMain + 1 from = from - limit + currentApps = {} drawAll(true, false) end end @@ -403,22 +402,15 @@ while true do end end elseif e[1] == "scroll" then - -- if currentTopBarElement < 5 then - if e[5] == 1 then - if (fromY < sizes.yMain) then - fromY = fromY + 2 - drawAll(false, false) - end - else - fromY = fromY - 2 + if e[5] == 1 then + if (fromY < sizes.yMain) then + fromY = fromY + 2 drawAll(false, false) end - -- else - -- if e[5] == 1 then - - -- else - -- end - -- end + else + fromY = fromY - 2 + drawAll(false, false) + end end end diff --git a/Applications/convertImage.lua b/Applications/convertImage.lua new file mode 100644 index 00000000..82daa69b --- /dev/null +++ b/Applications/convertImage.lua @@ -0,0 +1,27 @@ +local args = {...} + +local libraries = { + buffer = "doubleBuffering", + image = "image", + fs = "filesystem", + GUI = "GUI", +} + +for library in pairs(libraries) do if not _G[library] then _G[library] = require(libraries[library]) end end; libraries = nil + +------------------------------------------------------------------------------------------------------------------ +buffer.start() + +if fs.exists(args[1]) then + local cyka = image.load(args[1]) + buffer.clear(0x000000) + buffer.image(1, 1, cyka) + buffer.draw() + + if args[2] then + fs.makeDirectory(fs.path(args[2]) or "") + image.save(args[2], cyka, 4) + end +else + GUI.error("Файл \"" .. args[1] .. "\" не существует") +end diff --git a/MineOS/Wallpapers/Govnokod.pic b/MineOS/Wallpapers/Govnokod.pic new file mode 100644 index 00000000..55df9603 Binary files /dev/null and b/MineOS/Wallpapers/Govnokod.pic differ