Because Controls cant removed, i want to reuse them and if need more add them.
This is my function, it dont work, what ever I try.
Code:
function RMM.CreateControl(iY,iX)
if not RMM.c.map:GetNamedChild("RMM_MAPS_"..iX..iY) then
RMM.maps[iY][iX] = WINDOW_MANAGER:CreateControl("RMM_MAPS_"..iX..iY, RMM.c.map, CT_TEXTURE)
end
end
if not RMM.c.map:GetNamedChild("RMM_MAPS_"..iX..iY) <--- everytime true
RMM.c.map is a CT_CONTROLk, wrong type?
I have also tryed:
if not RMM.maps[iY][iX] then <--- everytime false
And a lot other with: ==nil, ~=nil then return ........