For sure I can

Inventory_init.cgui
Code:
InvBg = gui:new("WindowT", "InvBg");
Inventory = gui:new("WindowT", "Inventory");
gui:SetRootWindow(InvBg);
-- Setup the window hierarchy.
-- ***************************
InvBg:AddChild(Inventory);
-- Initialization of the window contents ("constructor code").
-- ***********************************************************
function InvBg:OnInit()
self:set("backColor", 1, 0, 0, 0.7);
gui:activate (false);
gui:setInteractive(true);
gui:showMouse (true);
end
function Inventory:OnInit()
self:set("rect", 400, 100, 100, 300);
self:set("backColor", 0, 0.25, 0.7, 0.4);
self:set("borderWidth", 0.5);
self:set("borderColor", 0.7, 0.8, 0.9, 1);
gui:setFocus(Inventory);
end
and my Inventory.cgui
Code:
dofile("Games/obg/GUIs/Inventory_init.cgui");
function InitInventorySlots(SlotsCnt, ...)
local i = 1;
local ItemsPerLine = 5;
Slots = {};
for i = 1, SlotsCnt, 1 do
Slots[i] = gui:new("WindowT", "Slot" .. i);
Slots[i]:set("rect", 540 + ((i % ItemsPerLine) * 28), math.floor(i / ItemsPerLine) * 28, 25, 25);
Slots[i]:set("backColor", 0, 0.25, 0.7, 0.4);
Slots[i]:set("borderWidth", 0.5);
Slots[i]:set("borderColor", 0.7, 0.8, 0.9, 1);
Inventory:AddChild(Slots[i]);
end
end
function InvBg:OnChar(ch)
if (ch == 0x1B or ch == 0x69) then -- ESC or I
gui:activate(false);
return true;
end
return false;
end