View Single Post
02-08-18, 05:55 PM   #1
corveroth
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 29
UI stops drawing - processing limit/timeout?

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:
  1. Grid = CreateFrame("Frame", "GridFrame", UIParent)
  2. Grid.pixels = {}
  3. Grid:SetPoint("CENTER")
  4.  
  5. local xsize, ysize = 127, 127
  6.  
  7. function MakeGrid()
  8.     Grid:SetSize(xsize, ysize)
  9.     for row = 1, ysize do
  10.         if not Grid.pixels[row] then Grid.pixels[row] = {} end
  11.        
  12.         for column = 1, xsize do
  13.             local t = Grid:CreateTexture()
  14.             t:SetPoint("TOPLEFT", Grid, "TOPLEFT", (row-1), -(column-1))
  15.             t:SetPoint("BOTTOMRIGHT", Grid, "TOPLEFT", row, -column)
  16.             t:SetColorTexture(random(), random(), random(), 1)
  17.             Grid.pixels[row][column] = t
  18.         end
  19.     end
  20. end
  21.  
  22. MakeGrid()

Last edited by corveroth : 02-08-18 at 09:27 PM.
  Reply With Quote