This commit is contained in:
Michael Freno
2025-10-13 09:44:33 -04:00
parent 2d724bf120
commit a0cea8081b
12 changed files with 313 additions and 123 deletions

View File

@@ -70,7 +70,7 @@ local pauseMenu = Gui.new({
flexDirection = "vertical",
justifyContent = "center",
alignItems = "center",
background = Color.new(0.1, 0.1, 0.1, 0.9),
backgroundColor = Color.new(0.1, 0.1, 0.1, 0.9),
})
local title = Gui.new({

View File

@@ -19,7 +19,7 @@ function EventSystemDemo.init()
y = 50,
width = 700,
height = 500,
background = Color.new(0.15, 0.15, 0.2, 0.95),
backgroundColor = Color.new(0.15, 0.15, 0.2, 0.95),
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(0.8, 0.8, 0.8, 1),
positioning = "flex",
@@ -36,7 +36,7 @@ function EventSystemDemo.init()
textSize = 18,
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
background = Color.new(0.2, 0.2, 0.3, 1),
backgroundColor = Color.new(0.2, 0.2, 0.3, 1),
})
-- Button container
@@ -46,7 +46,7 @@ function EventSystemDemo.init()
positioning = "flex",
flexDirection = "horizontal",
gap = 15,
background = Color.new(0.1, 0.1, 0.15, 0.5),
backgroundColor = Color.new(0.1, 0.1, 0.15, 0.5),
padding = { top = 15, right = 15, bottom = 15, left = 15 },
})
@@ -67,7 +67,7 @@ function EventSystemDemo.init()
text = "Left Click Me",
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
background = Color.new(0.2, 0.6, 0.9, 0.8),
backgroundColor = Color.new(0.2, 0.6, 0.9, 0.8),
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(0.4, 0.8, 1, 1),
callback = function(element, event)
@@ -85,7 +85,7 @@ function EventSystemDemo.init()
text = "Right Click Me",
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
background = Color.new(0.9, 0.4, 0.4, 0.8),
backgroundColor = Color.new(0.9, 0.4, 0.4, 0.8),
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(1, 0.6, 0.6, 1),
callback = function(element, event)
@@ -105,7 +105,7 @@ function EventSystemDemo.init()
text = "Try Shift/Ctrl",
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
background = Color.new(0.6, 0.9, 0.4, 0.8),
backgroundColor = Color.new(0.6, 0.9, 0.4, 0.8),
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(0.8, 1, 0.6, 1),
callback = function(element, event)
@@ -133,7 +133,7 @@ function EventSystemDemo.init()
text = "All Events",
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
background = Color.new(0.9, 0.7, 0.3, 0.8),
backgroundColor = Color.new(0.9, 0.7, 0.3, 0.8),
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(1, 0.9, 0.5, 1),
callback = function(element, event)
@@ -151,7 +151,7 @@ function EventSystemDemo.init()
textSize = 14,
textAlign = "start",
textColor = Color.new(0.9, 0.9, 1, 1),
background = Color.new(0.05, 0.05, 0.1, 1),
backgroundColor = Color.new(0.05, 0.05, 0.1, 1),
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(0.3, 0.3, 0.4, 1),
padding = { top = 10, right = 10, bottom = 10, left = 10 },

View File

@@ -20,7 +20,7 @@ function OnClickAnimDemo.init()
z = 10,
w = 300,
h = 200,
background = Color.new(0.1, 0.1, 0.3, 0.8),
backgroundColor = Color.new(0.1, 0.1, 0.3, 0.8),
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(0.7, 0.7, 0.7, 1),
})
@@ -33,7 +33,7 @@ function OnClickAnimDemo.init()
w = 100,
h = 40,
text = "Fade",
background = Color.new(0.2, 0.9, 0.6, 0.8),
backgroundColor = Color.new(0.2, 0.9, 0.6, 0.8),
textColor = Color.new(1, 1, 1),
borderColor = Color.new(0.4, 1, 0.8, 1),
callback = function()
@@ -51,7 +51,7 @@ function OnClickAnimDemo.init()
w = 100,
h = 40,
text = "Scale",
background = Color.new(0.9, 0.6, 0.2, 0.8),
backgroundColor = Color.new(0.9, 0.6, 0.2, 0.8),
textColor = Color.new(1, 1, 1),
borderColor = Color.new(1, 0.8, 0.4, 1),
callback = function()

View File

@@ -24,7 +24,7 @@ local grid1 = Gui.new({
gridColumns = 3,
columnGap = 10,
rowGap = 10,
background = Color.new(0.9, 0.9, 0.9, 1),
backgroundColor = Color.new(0.9, 0.9, 0.9, 1),
padding = { horizontal = 20, vertical = 20 },
})
@@ -32,7 +32,7 @@ local grid1 = Gui.new({
for i = 1, 6 do
Gui.new({
parent = grid1,
background = Color.new(0.2, 0.5, 0.8, 1),
backgroundColor = Color.new(0.2, 0.5, 0.8, 1),
text = "Item " .. i,
textColor = Color.new(1, 1, 1, 1),
textAlign = enums.TextAlign.CENTER,
@@ -58,14 +58,14 @@ local grid2 = Gui.new({
gridColumns = 4,
columnGap = 5,
rowGap = 5,
background = Color.new(0.9, 0.9, 0.9, 1),
backgroundColor = Color.new(0.9, 0.9, 0.9, 1),
padding = { horizontal = 10, vertical = 10 },
})
for i = 1, 16 do
Gui.new({
parent = grid2,
background = Color.new(0.3, 0.6, 0.3, 1),
backgroundColor = Color.new(0.3, 0.6, 0.3, 1),
text = tostring(i),
textColor = Color.new(1, 1, 1, 1),
textAlign = enums.TextAlign.CENTER,
@@ -90,7 +90,7 @@ local grid3 = Gui.new({
gridColumns = 5,
columnGap = 10,
rowGap = 0,
background = Color.new(0.9, 0.9, 0.9, 1),
backgroundColor = Color.new(0.9, 0.9, 0.9, 1),
padding = { horizontal = 10, vertical = 10 },
})
@@ -98,7 +98,7 @@ local labels = { "Home", "Products", "About", "Contact", "Login" }
for i = 1, 5 do
Gui.new({
parent = grid3,
background = Color.new(0.3, 0.3, 0.8, 1),
backgroundColor = Color.new(0.3, 0.3, 0.8, 1),
text = labels[i],
textColor = Color.new(1, 1, 1, 1),
textAlign = enums.TextAlign.CENTER,
@@ -122,14 +122,14 @@ local grid4 = Gui.new({
gridColumns = 1,
columnGap = 0,
rowGap = 10,
background = Color.new(0.9, 0.9, 0.9, 1),
backgroundColor = Color.new(0.9, 0.9, 0.9, 1),
padding = { horizontal = 10, vertical = 10 },
})
for i = 1, 5 do
Gui.new({
parent = grid4,
background = Color.new(0.5, 0.3, 0.7, 1),
backgroundColor = Color.new(0.5, 0.3, 0.7, 1),
text = "Option " .. i,
textColor = Color.new(1, 1, 1, 1),
textAlign = enums.TextAlign.CENTER,
@@ -153,14 +153,14 @@ local outerGrid = Gui.new({
gridColumns = 2,
columnGap = 10,
rowGap = 10,
background = Color.new(0.85, 0.85, 0.85, 1),
backgroundColor = Color.new(0.85, 0.85, 0.85, 1),
padding = { horizontal = 10, vertical = 10 },
})
-- Top-left: Simple item
Gui.new({
parent = outerGrid,
background = Color.new(0.5, 0.3, 0.7, 1),
backgroundColor = Color.new(0.5, 0.3, 0.7, 1),
text = "Single Item",
textColor = Color.new(1, 1, 1, 1),
textAlign = enums.TextAlign.CENTER,
@@ -174,14 +174,14 @@ local nestedGrid1 = Gui.new({
gridColumns = 2,
columnGap = 5,
rowGap = 5,
background = Color.new(0.7, 0.7, 0.7, 1),
backgroundColor = Color.new(0.7, 0.7, 0.7, 1),
padding = { horizontal = 5, vertical = 5 },
})
for i = 1, 4 do
Gui.new({
parent = nestedGrid1,
background = Color.new(0.3, 0.6, 0.9, 1),
backgroundColor = Color.new(0.3, 0.6, 0.9, 1),
text = "A" .. i,
textColor = Color.new(1, 1, 1, 1),
textAlign = enums.TextAlign.CENTER,
@@ -196,14 +196,14 @@ local nestedGrid2 = Gui.new({
gridColumns = 3,
columnGap = 5,
rowGap = 5,
background = Color.new(0.7, 0.7, 0.7, 1),
backgroundColor = Color.new(0.7, 0.7, 0.7, 1),
padding = { horizontal = 5, vertical = 5 },
})
for i = 1, 3 do
Gui.new({
parent = nestedGrid2,
background = Color.new(0.9, 0.6, 0.3, 1),
backgroundColor = Color.new(0.9, 0.6, 0.3, 1),
text = "B" .. i,
textColor = Color.new(1, 1, 1, 1),
textAlign = enums.TextAlign.CENTER,
@@ -213,7 +213,7 @@ end
-- Bottom-right: Another simple item
Gui.new({
parent = outerGrid,
background = Color.new(0.3, 0.7, 0.5, 1),
backgroundColor = Color.new(0.3, 0.7, 0.5, 1),
text = "Another Item",
textColor = Color.new(1, 1, 1, 1),
textAlign = enums.TextAlign.CENTER,

View File

@@ -95,7 +95,7 @@ local box = Gui.new({
text = "Responsive Box",
textSize = "10ew",
textAlign = "center",
background = Color.new(0.2, 0.2, 0.2),
backgroundColor = Color.new(0.2, 0.2, 0.2),
textColor = Color.new(1, 1, 1),
})
print(" Initial (width=200): textSize = " .. box.textSize .. "px")

View File

@@ -73,7 +73,7 @@ local container = Gui.new({
flexDirection = "vertical",
gap = 10,
padding = { horizontal = 20, vertical = 20 },
background = Color.new(0.1, 0.1, 0.1),
backgroundColor = Color.new(0.1, 0.1, 0.1),
})
local title = Gui.new({

View File

@@ -0,0 +1,196 @@
-- Demo showing the new layering system:
-- backgroundColor -> theme -> borders -> text
local FlexLove = require("FlexLove")
local Gui = FlexLove.GUI
local Theme = FlexLove.Theme
local Color = FlexLove.Color
function love.load()
-- Initialize FlexLove with the space theme
Gui.init({
baseScale = { width = 1920, height = 1080 },
theme = "space"
})
-- Create main container
local container = Gui.new({
x = 50,
y = 50,
width = 700,
height = 500,
backgroundColor = Color.new(0.1, 0.1, 0.15, 1),
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(0.5, 0.5, 0.6, 1),
positioning = "flex",
flexDirection = "vertical",
gap = 20,
padding = { top = 20, right = 20, bottom = 20, left = 20 },
})
-- Title
Gui.new({
parent = container,
height = 40,
text = "Theme Layering Demo",
textSize = 24,
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
backgroundColor = Color.new(0.2, 0.2, 0.3, 1),
})
-- Description
Gui.new({
parent = container,
height = 60,
text = "Layering order: backgroundColor -> theme -> borders -> text\nAll layers are always rendered when specified",
textSize = 14,
textAlign = "center",
textColor = Color.new(0.8, 0.9, 1, 1),
backgroundColor = Color.new(0.15, 0.15, 0.2, 0.8),
padding = { top = 10, right = 10, bottom = 10, left = 10 },
})
-- Example 1: Theme with backgroundColor
local example1 = Gui.new({
parent = container,
height = 100,
positioning = "flex",
flexDirection = "vertical",
gap = 10,
backgroundColor = Color.new(0.12, 0.12, 0.17, 1),
padding = { top = 10, right = 10, bottom = 10, left = 10 },
})
Gui.new({
parent = example1,
height = 20,
text = "Example 1: Theme with backgroundColor (red tint behind)",
textSize = 14,
textColor = Color.new(0.8, 0.9, 1, 1),
backgroundColor = Color.new(0, 0, 0, 0),
})
Gui.new({
parent = example1,
width = 200,
height = 50,
text = "Themed Button",
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
backgroundColor = Color.new(0.8, 0.2, 0.2, 0.5), -- Red tint behind theme
themeComponent = "button",
callback = function(element, event)
if event.type == "click" then
print("Button with backgroundColor clicked!")
end
end
})
-- Example 2: Theme with borders
local example2 = Gui.new({
parent = container,
height = 100,
positioning = "flex",
flexDirection = "vertical",
gap = 10,
backgroundColor = Color.new(0.12, 0.12, 0.17, 1),
padding = { top = 10, right = 10, bottom = 10, left = 10 },
})
Gui.new({
parent = example2,
height = 20,
text = "Example 2: Theme with borders (yellow borders on top)",
textSize = 14,
textColor = Color.new(0.8, 0.9, 1, 1),
backgroundColor = Color.new(0, 0, 0, 0),
})
Gui.new({
parent = example2,
width = 200,
height = 50,
text = "Bordered Button",
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
backgroundColor = Color.new(0.2, 0.2, 0.3, 0.5),
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(1, 1, 0, 1), -- Yellow border on top of theme
themeComponent = "button",
callback = function(element, event)
if event.type == "click" then
print("Button with borders clicked!")
end
end
})
-- Example 3: Theme with both backgroundColor and borders
local example3 = Gui.new({
parent = container,
height = 120,
positioning = "flex",
flexDirection = "vertical",
gap = 10,
backgroundColor = Color.new(0.12, 0.12, 0.17, 1),
padding = { top = 10, right = 10, bottom = 10, left = 10 },
})
Gui.new({
parent = example3,
height = 20,
text = "Example 3: Theme with backgroundColor AND borders",
textSize = 14,
textColor = Color.new(0.8, 0.9, 1, 1),
backgroundColor = Color.new(0, 0, 0, 0),
})
Gui.new({
parent = example3,
width = 250,
height = 60,
text = "Full Layering",
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
backgroundColor = Color.new(0.2, 0.6, 0.8, 0.3), -- Blue tint behind
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(0, 1, 0, 1), -- Green border on top
themeComponent = "button",
callback = function(element, event)
if event.type == "click" then
print("Full layering button clicked!")
end
end
})
-- Example 4: Panel with backgroundColor
Gui.new({
x = 800,
y = 50,
width = 300,
height = 200,
backgroundColor = Color.new(0.3, 0.1, 0.3, 0.5), -- Purple tint
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(1, 0.5, 0, 1), -- Orange border
themeComponent = "panel",
padding = { top = 20, right = 20, bottom = 20, left = 20 }
})
end
function love.update(dt)
Gui.update(dt)
end
function love.draw()
love.graphics.clear(0.05, 0.05, 0.1, 1)
Gui.draw()
-- Draw instructions
love.graphics.setColor(1, 1, 1, 1)
love.graphics.print("Theme Layering System", 10, 10)
love.graphics.print("Hover over buttons to see state changes", 10, 30)
end
function love.resize(w, h)
Gui.resize()
end

View File

@@ -30,7 +30,7 @@ function ThemeDemo.init()
y = 50,
width = 700,
height = 550,
background = Color.new(0.15, 0.15, 0.2, 0.95),
backgroundColor = Color.new(0.15, 0.15, 0.2, 0.95),
border = { top = true, bottom = true, left = true, right = true },
borderColor = Color.new(0.8, 0.8, 0.8, 1),
positioning = "flex",
@@ -47,7 +47,7 @@ function ThemeDemo.init()
textSize = 20,
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
background = Color.new(0.2, 0.2, 0.3, 1),
backgroundColor = Color.new(0.2, 0.2, 0.3, 1),
})
-- Status message
@@ -59,7 +59,7 @@ function ThemeDemo.init()
textSize = 14,
textAlign = "center",
textColor = themeLoaded and Color.new(0.3, 0.9, 0.3, 1) or Color.new(0.9, 0.7, 0.3, 1),
background = Color.new(0.1, 0.1, 0.15, 0.8),
backgroundColor = Color.new(0.1, 0.1, 0.15, 0.8),
padding = { top = 10, right = 10, bottom = 10, left = 10 },
})
@@ -70,7 +70,7 @@ function ThemeDemo.init()
positioning = "flex",
flexDirection = "vertical",
gap = 15,
background = Color.new(0.1, 0.1, 0.15, 0.5),
backgroundColor = Color.new(0.1, 0.1, 0.15, 0.5),
padding = { top = 15, right = 15, bottom = 15, left = 15 },
})
@@ -81,7 +81,7 @@ function ThemeDemo.init()
positioning = "flex",
flexDirection = "vertical",
gap = 10,
background = Color.new(0.12, 0.12, 0.17, 1),
backgroundColor = Color.new(0.12, 0.12, 0.17, 1),
padding = { top = 10, right = 10, bottom = 10, left = 10 },
})
@@ -91,7 +91,7 @@ function ThemeDemo.init()
text = "Example 1: Basic Themed Button",
textSize = 14,
textColor = Color.new(0.8, 0.9, 1, 1),
background = Color.new(0, 0, 0, 0),
backgroundColor = Color.new(0, 0, 0, 0),
})
-- This button would use theme if loaded
@@ -102,7 +102,7 @@ function ThemeDemo.init()
text = "Themed Button",
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
background = Color.new(0.2, 0.6, 0.9, 0.8),
backgroundColor = Color.new(0.2, 0.6, 0.9, 0.8),
-- theme = "button", -- Uncomment when theme atlas exists
callback = function(element, event)
if event.type == "click" then
@@ -118,7 +118,7 @@ function ThemeDemo.init()
positioning = "flex",
flexDirection = "vertical",
gap = 10,
background = Color.new(0.12, 0.12, 0.17, 1),
backgroundColor = Color.new(0.12, 0.12, 0.17, 1),
padding = { top = 10, right = 10, bottom = 10, left = 10 },
})
@@ -128,7 +128,7 @@ function ThemeDemo.init()
text = "Example 2: Button with Hover/Pressed States",
textSize = 14,
textColor = Color.new(0.8, 0.9, 1, 1),
background = Color.new(0, 0, 0, 0),
backgroundColor = Color.new(0, 0, 0, 0),
})
Gui.new({
@@ -137,7 +137,7 @@ function ThemeDemo.init()
text = "Hover over or click the button to see state changes (when theme is loaded)",
textSize = 11,
textColor = Color.new(0.6, 0.7, 0.8, 1),
background = Color.new(0, 0, 0, 0),
backgroundColor = Color.new(0, 0, 0, 0),
})
local stateButton = Gui.new({
@@ -147,7 +147,7 @@ function ThemeDemo.init()
text = "Interactive Button",
textAlign = "center",
textColor = Color.new(1, 1, 1, 1),
background = Color.new(0.3, 0.7, 0.4, 0.8),
backgroundColor = Color.new(0.3, 0.7, 0.4, 0.8),
-- theme = "button", -- Will automatically handle hover/pressed states
callback = function(element, event)
if event.type == "click" then
@@ -163,7 +163,7 @@ function ThemeDemo.init()
positioning = "flex",
flexDirection = "vertical",
gap = 10,
background = Color.new(0.12, 0.12, 0.17, 1),
backgroundColor = Color.new(0.12, 0.12, 0.17, 1),
padding = { top = 10, right = 10, bottom = 10, left = 10 },
})
@@ -173,14 +173,14 @@ function ThemeDemo.init()
text = "Example 3: Themed Panel/Container",
textSize = 14,
textColor = Color.new(0.8, 0.9, 1, 1),
background = Color.new(0, 0, 0, 0),
backgroundColor = Color.new(0, 0, 0, 0),
})
local themedPanel = Gui.new({
parent = example3,
width = 300,
height = 80,
background = Color.new(0.25, 0.25, 0.35, 0.9),
backgroundColor = Color.new(0.25, 0.25, 0.35, 0.9),
-- theme = "panel", -- Would use panel theme component
padding = { top = 10, right = 10, bottom = 10, left = 10 },
})
@@ -191,14 +191,14 @@ function ThemeDemo.init()
textSize = 12,
textColor = Color.new(0.9, 0.9, 1, 1),
textAlign = "center",
background = Color.new(0, 0, 0, 0),
backgroundColor = Color.new(0, 0, 0, 0),
})
-- Code example section
local codeSection = Gui.new({
parent = self.window,
height = 40,
background = Color.new(0.08, 0.08, 0.12, 1),
backgroundColor = Color.new(0.08, 0.08, 0.12, 1),
padding = { top = 10, right = 10, bottom = 10, left = 10 },
})
@@ -207,7 +207,7 @@ function ThemeDemo.init()
text = 'Usage: element = Gui.new({ theme = "button", ... })',
textSize = 12,
textColor = Color.new(0.5, 0.9, 0.5, 1),
background = Color.new(0, 0, 0, 0),
backgroundColor = Color.new(0, 0, 0, 0),
})
return self

View File

@@ -20,7 +20,7 @@ local back = Gui.new({
width = 100,
height = 100,
z = 1,
background = Color.new(1, 0, 0, 0.8),
backgroundColor = Color.new(1, 0, 0, 0.8),
text = "Z=1 (Back)",
textColor = Color.new(1, 1, 1),
})
@@ -32,7 +32,7 @@ local middle = Gui.new({
width = 100,
height = 100,
z = 2,
background = Color.new(0, 1, 0, 0.8),
backgroundColor = Color.new(0, 1, 0, 0.8),
text = "Z=2 (Middle)",
textColor = Color.new(1, 1, 1),
})
@@ -44,7 +44,7 @@ local front = Gui.new({
width = 100,
height = 100,
z = 3,
background = Color.new(0, 0, 1, 0.8),
backgroundColor = Color.new(0, 0, 1, 0.8),
text = "Z=3 (Front)",
textColor = Color.new(1, 1, 1),
})
@@ -75,7 +75,7 @@ local parent = Gui.new({
y = 0,
width = 300,
height = 300,
background = Color.new(0.1, 0.1, 0.1, 1),
backgroundColor = Color.new(0.1, 0.1, 0.1, 1),
})
-- Create children in random z-order
@@ -87,7 +87,7 @@ local child3 = Gui.new({
width = 80,
height = 80,
z = 3,
background = Color.new(0, 0, 1, 0.8),
backgroundColor = Color.new(0, 0, 1, 0.8),
text = "Z=3",
textColor = Color.new(1, 1, 1),
})
@@ -100,7 +100,7 @@ local child1 = Gui.new({
width = 80,
height = 80,
z = 1,
background = Color.new(1, 0, 0, 0.8),
backgroundColor = Color.new(1, 0, 0, 0.8),
text = "Z=1",
textColor = Color.new(1, 1, 1),
})
@@ -113,7 +113,7 @@ local child2 = Gui.new({
width = 80,
height = 80,
z = 2,
background = Color.new(0, 1, 0, 0.8),
backgroundColor = Color.new(0, 1, 0, 0.8),
text = "Z=2",
textColor = Color.new(1, 1, 1),
})
@@ -131,14 +131,14 @@ print(" Z-index can be negative for background elements\n")
Gui.destroy()
local background = Gui.new({
local backgroundColor = Gui.new({
id = "background",
x = 0,
y = 0,
width = 200,
height = 200,
z = -1,
background = Color.new(0.2, 0.2, 0.2, 1),
backgroundColor = Color.new(0.2, 0.2, 0.2, 1),
text = "Background (z=-1)",
textColor = Color.new(1, 1, 1),
})
@@ -150,7 +150,7 @@ local normal = Gui.new({
width = 100,
height = 100,
z = 0,
background = Color.new(0.5, 0.5, 0.5, 1),
backgroundColor = Color.new(0.5, 0.5, 0.5, 1),
text = "Normal (z=0)",
textColor = Color.new(1, 1, 1),
})
@@ -175,7 +175,7 @@ local default1 = Gui.new({
y = 10,
width = 50,
height = 50,
background = Color.new(1, 0, 0, 1),
backgroundColor = Color.new(1, 0, 0, 1),
})
local explicit = Gui.new({
@@ -185,7 +185,7 @@ local explicit = Gui.new({
width = 50,
height = 50,
z = 1,
background = Color.new(0, 1, 0, 1),
backgroundColor = Color.new(0, 1, 0, 1),
})
local default2 = Gui.new({
@@ -194,7 +194,7 @@ local default2 = Gui.new({
y = 50,
width = 50,
height = 50,
background = Color.new(0, 0, 1, 1),
backgroundColor = Color.new(0, 0, 1, 1),
})
print("default1.z =", default1.z, "(default)")