EDIT: Further fiddling and I've gotten things working, but now I have new questions.
I'm building a grid of pixels, as below. However, if I increase
either xsize or ysize to 128, my UI vanishes immediately upon loading in (as if I'd hit Alt-Z to hide the interface, but there seems to be no way to recover). I can alternately avoid this and increase the limits up to 256x256 by commenting out line 16 so that I'm not setting any textures. (Higher limits cause the game to stall for a very long time just loading in.)
Is there some processing limit I'm unaware of?
Lua Code:
Grid = CreateFrame("Frame", "GridFrame", UIParent)
Grid.pixels = {}
Grid:SetPoint("CENTER")
local xsize, ysize = 127, 127
function MakeGrid()
Grid:SetSize(xsize, ysize)
for row = 1, ysize do
if not Grid.pixels[row] then Grid.pixels[row] = {} end
for column = 1, xsize do
local t = Grid:CreateTexture()
t:SetPoint("TOPLEFT", Grid, "TOPLEFT", (row-1), -(column-1))
t:SetPoint("BOTTOMRIGHT", Grid, "TOPLEFT", row, -column)
t:SetColorTexture(random(), random(), random(), 1)
Grid.pixels[row][column] = t
end
end
end
MakeGrid()