WindowResize() doesn't set the window's background color like WindowCreate() does, it just uses it in case the new size is bigger. This confused me for a good long while, because I'm trying to use WindowResize() to change the window's background color (for on-the-fly changing of the transparency color when that flag is set).
The background color is now one of the only things you can't change on the fly (with the notable exception of most hotspot callbacks). As far as I can tell, it's a one-liner change:
[EDIT] For the sake of completeness, this is what I'm doing:
I thought I'd try again at a generic miniwindow library, with my expectations set somewhat lower than before. :P
The background color is now one of the only things you can't change on the fly (with the notable exception of most hotspot callbacks). As far as I can tell, it's a one-liner change:
m_iBackgroundColour = BackgroundColour;[EDIT] For the sake of completeness, this is what I'm doing:
WindowAPI.ColorKey = function(win, color)
local x, y = WindowInfo(win._id, 1), WindowInfo(win._id, 2)
local width, height = WindowInfo(win._id, 3), WindowInfo(win._id, 4)
local pos, flags = WindowInfo(win._id, 7), WindowInfo(win._id, 8)
-- (Un)set the transparency flag
if color then
flags = bit.bor(4, flags)
else
flags = bit.band(bit.neg(4), flags)
color = 0
end
WindowPosition(win._id, x, y, pos, flags)
return WindowResize(win._id, width, height, color)
endI thought I'd try again at a generic miniwindow library, with my expectations set somewhat lower than before. :P