I have another question. I have the default Viewport done now however when I try to make a new layout it won't show it.
Here's the code:
Code:
lpanels:CreateLayout("Simple Viewport", {
-- Main viewport background
{ name = "GreyBox",
strata = "BACKGROUND", level = 0,
x_off = "1%", y_off = "1%",
achor_to = "BOTTOM",
width = "98%", height = 165,
bg_color = "0 0 0", bg_alpha = 1,
},
-- A colored border anchored to the top of the viewport
{ name = "TopBorder", parent = "GreyBox",
anchor_to = "TOP", y_off = 0,
width = "100%", height = 2,
bg_color = "0.4 0.6 1", bg_alpha = 1,
},
-- A colored border anchored to the bottom of the viewport
{ name = "BottomBorder", parent = "GreyBox",
anchor_to = "BOTTOM", y_off = 0,
width = "100%", height = 2,
bg_color = "0.4 0.6 1", bg_alpha = 1,
},
-- A colored border anchored to the left of the viewport
{ name = "LeftBorder", parent = "GreyBox",
anchor_to = "LEFT", x_off = 0,
width = 2, height = "100%",
bg_color = "0.4 0.6 1", bg_alpha = 1,
},
-- A colored border anchored to the right of the viewport
{ name = "RightBorder", parent = "GreyBox",
anchor_to = "LEFT", x_off = "98%",
width = 2, heigth = "100%",
bg_color = "0.4 0.6 1", bg_alpha = 1,
},
});
lpanels:CreateLayout("Simple Topbar", {
-- Main Topbar background
{ name = "Simple Topbar",
strata = "BACKGROUND", level = 0,
x_off = "1%", y_off = 0,
anchor_to = "BOTTOM",
width = "98%", heigth = -55,
bg_color = "0 0 0", bg_alpha = 1,
},
});
lpanels:ApplyLayout(nil, "Simple Viewport", "Simple Topbar")