-- This is a Cafu engine GUI script file, written by CaWE, the Cafu World Editor. -- You CAN edit this file manually, but note that CaWE may overwrite your changes. -- It is recommended that you place all your customizations like method overrides -- and effects into a separate cgui file that calls loadfile() for including this. -- Instantiation of all windows. -- ***************************** local gui = ... local Background = gui:new("WindowT", "Background") Background.ScoreBoardFrame = gui:new("WindowT", "ScoreBoardFrame") Background.ScoreBoardFrame.ConsoleOutput = gui:new("WindowT", "ConsoleOutput") -- Set the GUIs root window. -- ************************* gui:SetRootWindow(Background) gui:activate(true) gui:setInteractive(false) gui:showMouse(false) gui:setFocus(Background.ScoreBoardFrame.ConsoleOutput) -- Setup the window hierarchy. -- *************************** Background:AddChild(Background.ScoreBoardFrame) Background.ScoreBoardFrame:AddChild(Background.ScoreBoardFrame.ConsoleOutput) -- Initialization of the window contents ("constructors"). -- ******************************************************* function Background:OnInit() self:GetTransform():set("Pos", 0, 0) self:GetTransform():set("Size", 640, 480) local c1 = gui:new("ComponentImageT") c1:set("Material", "") c1:set("Color", 1, 1, 0) c1:set("Alpha", 0.1) self:AddComponent(c1) end function Background.ScoreBoardFrame:OnInit() self:GetTransform():set("Pos", 20, 20) self:GetTransform():set("Size", 600, 440) local c1 = gui:new("ComponentBorderT") c1:set("Width", 0.7) c1:set("Color", 0, 0.501961, 1) c1:set("Alpha", 1) local c2 = gui:new("ComponentImageT") c2:set("Material", "") c2:set("Color", 0, 0.501961, 1) c2:set("Alpha", 0.2) self:AddComponent(c1, c2) end function Background.ScoreBoardFrame.ConsoleOutput:OnInit() self:GetTransform():set("Pos", 10, 10) self:GetTransform():set("Size", 580, 390) local c1 = gui:new("ComponentBorderT") c1:set("Width", 0.5) c1:set("Color", 0, 0.501961, 1) c1:set("Alpha", 1) local c2 = gui:new("ComponentTextT") c2:set("Text", "") c2:set("Font", "Fonts/Arial") c2:set("Scale", 0.2) c2:set("Padding", 3, 3) c2:set("Color", 0, 0.501961, 1) c2:set("Alpha", 1) c2:set("hor. Align", -1) c2:set("ver. Align", 1) self:AddComponent(c1, c2) end