This commit is contained in:
Igor Timofeev 2018-05-07 21:14:12 +03:00
parent 8274bb829b
commit 4e9f545673
2 changed files with 4 additions and 4 deletions

4
OS.lua
View File

@ -248,10 +248,10 @@ local function changeWallpaper()
local r, g, b local r, g, b
for i = 3, #MineOSInterface.mainContainer.background.wallpaper, 4 do for i = 3, #MineOSInterface.mainContainer.background.wallpaper, 4 do
r, g, b = color.IntegerToRGB(MineOSInterface.mainContainer.background.wallpaper[i]) r, g, b = color.integerToRGB(MineOSInterface.mainContainer.background.wallpaper[i])
MineOSInterface.mainContainer.background.wallpaper[i] = color.RGBToInteger(math.floor(r * MineOSCore.properties.wallpaperBrightness), math.floor(g * MineOSCore.properties.wallpaperBrightness), math.floor(b * MineOSCore.properties.wallpaperBrightness)) MineOSInterface.mainContainer.background.wallpaper[i] = color.RGBToInteger(math.floor(r * MineOSCore.properties.wallpaperBrightness), math.floor(g * MineOSCore.properties.wallpaperBrightness), math.floor(b * MineOSCore.properties.wallpaperBrightness))
r, g, b = color.IntegerToRGB(MineOSInterface.mainContainer.background.wallpaper[i + 1]) r, g, b = color.integerToRGB(MineOSInterface.mainContainer.background.wallpaper[i + 1])
MineOSInterface.mainContainer.background.wallpaper[i + 1] = color.RGBToInteger(math.floor(r * MineOSCore.properties.wallpaperBrightness), math.floor(g * MineOSCore.properties.wallpaperBrightness), math.floor(b * MineOSCore.properties.wallpaperBrightness)) MineOSInterface.mainContainer.background.wallpaper[i + 1] = color.RGBToInteger(math.floor(r * MineOSCore.properties.wallpaperBrightness), math.floor(g * MineOSCore.properties.wallpaperBrightness), math.floor(b * MineOSCore.properties.wallpaperBrightness))
end end
end end

View File

@ -3651,7 +3651,7 @@ function GUI.palette(x, y, startColor)
local function paletteDrawBigCrestPixel(x, y, symbol) local function paletteDrawBigCrestPixel(x, y, symbol)
local background, foreground = buffer.get(x, y) local background, foreground = buffer.get(x, y)
local r, g, b = color.IntegerToRGB(background) local r, g, b = color.integerToRGB(background)
buffer.set(x, y, background, (r + g + b) / 3 >= 127 and 0x0 or 0xFFFFFF, symbol) buffer.set(x, y, background, (r + g + b) / 3 >= 127 and 0x0 or 0xFFFFFF, symbol)
end end
@ -3727,7 +3727,7 @@ function GUI.palette(x, y, startColor)
local function paletteSwitchColorFromHex(hex) local function paletteSwitchColorFromHex(hex)
palette.color.integer = hex palette.color.integer = hex
palette.color.rgb.red, palette.color.rgb.green, palette.color.rgb.blue = color.IntegerToRGB(hex) palette.color.rgb.red, palette.color.rgb.green, palette.color.rgb.blue = color.integerToRGB(hex)
palette.color.hsb.hue, palette.color.hsb.saturation, palette.color.hsb.brightness = color.RGBToHSB(palette.color.rgb.red, palette.color.rgb.green, palette.color.rgb.blue) palette.color.hsb.hue, palette.color.hsb.saturation, palette.color.hsb.brightness = color.RGBToHSB(palette.color.rgb.red, palette.color.rgb.green, palette.color.rgb.blue)
paletteUpdateInputs() paletteUpdateInputs()
end end