From a90e2a8bfdc56313824dd6d2641916ebb2d2f2ec Mon Sep 17 00:00:00 2001 From: Wojbie Date: Sun, 4 Jun 2017 11:59:30 +0200 Subject: [PATCH] Fix to setPaletteColour in rgb8 mode. Was not saving color if called using rgb8 mode. --- src/main/resources/assets/computercraft/lua/rom/apis/window.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/assets/computercraft/lua/rom/apis/window.lua b/src/main/resources/assets/computercraft/lua/rom/apis/window.lua index 52e2655e5..08469f66b 100644 --- a/src/main/resources/assets/computercraft/lua/rom/apis/window.lua +++ b/src/main/resources/assets/computercraft/lua/rom/apis/window.lua @@ -296,6 +296,7 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible ) local tCol if type(colour) == "number" and type(r) == "number" and g == nil and b == nil then tCol = { colours.rgb8( r ) } + tPalette[ colour ] = tCol elseif type(colour) == "number" and type(r) == "number" and type(g) == "number" and type(b) == "number" then tCol = tPalette[ colour ] tCol[1] = r