Рефакторинг библиотеки палитры (снес ее на хуй), фиксы GUI.error и прочей хуйни, связанной с анимированными кнопками

This commit is contained in:
igor
2018-01-03 15:36:38 +03:00
parent 8b2ad440e0
commit 9e7a02755e
16 changed files with 338 additions and 371 deletions

View File

@@ -2038,7 +2038,7 @@ function ecs.universalWindow(x, y, width, background, closeWindowAfter, ...)
local screenWidth, screenHeight = component.gpu.getResolution()
local paletteX, paletteY = math.floor(screenWidth / 2 - paletteWidth / 2), math.floor(screenHeight / 2 - paletteHeight / 2)
local oldPixels = ecs.rememberOldPixels(paletteX, paletteY, paletteX + paletteWidth - 1, paletteY + paletteHeight - 1)
local color = require("palette").show(paletteX, paletteY, objects[key][3])
local color = require("GUI").palette(paletteX, paletteY, objects[key][3]):show()
ecs.drawOldPixels(oldPixels)
objects[key][3] = color or oldColor