Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Make widgets more compact #14

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/widgets/button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ return Runtime.widget(function(text)
[ref] = "button",
BackgroundColor3 = style.bg3,
BorderSizePixel = 0,
Font = Enum.Font.SourceSans,
Size = UDim2.new(0, 100, 0, 40),
Font = Enum.Font.Gotham,
Size = UDim2.new(0, 0, 0, 20),
TextColor3 = style.textColor,
AutomaticSize = Enum.AutomaticSize.X,
TextSize = 21,
TextSize = 16,

create("UIPadding", {
PaddingLeft = UDim.new(0, 10),
Expand Down
10 changes: 5 additions & 5 deletions src/widgets/checkbox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ return Runtime.widget(function(text, options)
[ref] = "checkbox",
BackgroundTransparency = 1,
Name = "Checkbox",
Size = UDim2.new(0, 30, 0, 30),
Size = UDim2.new(0, 20, 0, 20),
AutomaticSize = Enum.AutomaticSize.X,

create("TextButton", {
BackgroundColor3 = Color3.fromRGB(54, 54, 54),
BorderSizePixel = 0,
Font = Enum.Font.SourceSansBold,
Size = UDim2.new(0, 30, 0, 30),
Font = Enum.Font.GothamBold,
Size = UDim2.new(0, 20, 0, 20),
TextColor3 = Color3.fromRGB(153, 153, 153),
TextSize = 24,
TextSize = 18,

create("UICorner", {
CornerRadius = UDim.new(0, 8),
Expand All @@ -77,7 +77,7 @@ return Runtime.widget(function(text, options)
BackgroundColor3 = Color3.fromRGB(255, 255, 255),
Font = Enum.Font.GothamMedium,
TextColor3 = Color3.fromRGB(203, 203, 203),
TextSize = 18,
TextSize = 14,
AutomaticSize = Enum.AutomaticSize.X,
RichText = true,
}),
Expand Down
6 changes: 3 additions & 3 deletions src/widgets/error.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return Runtime.widget(function(text)
return create("Frame", {
[ref] = "error",
BackgroundTransparency = 0,
BackgroundColor3 = Color3.fromRGB(231, 76, 60),
BackgroundColor3 = Color3.fromRGB(113, 113, 113),
Name = "Error",
Size = UDim2.new(0, 100, 0, 75),
AutomaticSize = Enum.AutomaticSize.XY,
Expand All @@ -24,7 +24,7 @@ return Runtime.widget(function(text)
Font = Enum.Font.GothamBold,
BackgroundTransparency = 1,
TextColor3 = Color3.fromRGB(255, 255, 255),
TextSize = 25,
TextSize = 18,
AutomaticSize = Enum.AutomaticSize.X,
Text = "⚠️ An Error Occurred",
Size = UDim2.fromOffset(0, 75),
Expand All @@ -35,7 +35,7 @@ return Runtime.widget(function(text)
Font = Enum.Font.GothamMedium,
BackgroundTransparency = 1,
TextColor3 = Color3.fromRGB(255, 255, 255),
TextSize = 20,
TextSize = 16,
LineHeight = 1.2,
AutomaticSize = Enum.AutomaticSize.XY,
Size = UDim2.fromOffset(100, 75),
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/heading.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local Runtime = require(script.Parent.Parent.Runtime)
local create = require(script.Parent.Parent.create)
local Style = require(script.Parent.Parent.Style)
local create = require(script.Parent.Parent.create)

--[=[
@within Plasma
Expand All @@ -22,7 +22,7 @@ return Runtime.widget(function(text, options)
Font = Enum.Font.GothamBold,
AutomaticSize = Enum.AutomaticSize.XY,
TextColor3 = style.mutedTextColor,
TextSize = 20,
TextSize = 18,
RichText = true,
})
end)
Expand Down
6 changes: 3 additions & 3 deletions src/widgets/label.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local Runtime = require(script.Parent.Parent.Runtime)
local create = require(script.Parent.Parent.create)
local Style = require(script.Parent.Parent.Style)
local automaticSize = require(script.Parent.Parent.automaticSize)
local create = require(script.Parent.Parent.create)

--[=[
@within Plasma
Expand All @@ -18,9 +18,9 @@ return Runtime.widget(function(text)
create("TextLabel", {
[ref] = "label",
BackgroundTransparency = 1,
Font = Enum.Font.SourceSans,
Font = Enum.Font.Gotham,
TextColor3 = style.textColor,
TextSize = 20,
TextSize = 16,
RichText = true,
})

Expand Down
8 changes: 4 additions & 4 deletions src/widgets/table.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
local RunService = game:GetService("RunService")
local Runtime = require(script.Parent.Parent.Runtime)
local Style = require(script.Parent.Parent.Style)
local create = require(script.Parent.Parent.create)
local automaticSize = require(script.Parent.Parent.automaticSize)
local create = require(script.Parent.Parent.create)

local cell = Runtime.widget(function(text, font)
local refs = Runtime.useInstance(function(ref)
Expand All @@ -11,10 +11,10 @@ local cell = Runtime.widget(function(text, font)
return create("TextLabel", {
[ref] = "label",
BackgroundTransparency = 1,
Font = Enum.Font.SourceSans,
Font = Enum.Font.Gotham,
AutomaticSize = Enum.AutomaticSize.XY,
TextColor3 = style.textColor,
TextSize = 20,
TextSize = 16,
TextXAlignment = Enum.TextXAlignment.Left,
RichText = true,

Expand All @@ -27,7 +27,7 @@ local cell = Runtime.widget(function(text, font)
})
end)

refs.label.Font = font or Enum.Font.SourceSans
refs.label.Font = font or Enum.Font.Gotham
refs.label.Text = text
end)

Expand Down
18 changes: 9 additions & 9 deletions src/widgets/window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ local UserInputService = game:GetService("UserInputService")
]=]

local Runtime = require(script.Parent.Parent.Runtime)
local createConnect = require(script.Parent.Parent.createConnect)
local Style = require(script.Parent.Parent.Style)
local automaticSize = require(script.Parent.Parent.automaticSize)
local c = require(script.Parent.Parent.create)
local createConnect = require(script.Parent.Parent.createConnect)

local MIN_SIZE = Vector2.new(50, 50)
local MAX_SIZE = Vector2.new(1500, 500)
Expand Down Expand Up @@ -70,7 +70,7 @@ return Runtime.widget(function(options, fn)

c("TextButton", {
[ref] = "titleBar",
Size = UDim2.new(1, 0, 0, 40),
Size = UDim2.new(1, 0, 0, 20),
BackgroundTransparency = 1,
Text = "",

Expand Down Expand Up @@ -124,23 +124,23 @@ return Runtime.widget(function(options, fn)
Text = "..",
Position = UDim2.new(0, 0, 0, 0),
BackgroundTransparency = 1,
TextSize = 20,
TextSize = 16,
TextColor3 = style.mutedTextColor,
}),

c("TextLabel", {
Text = "..",
Position = UDim2.new(0, 0, 0, 7),
BackgroundTransparency = 1,
TextSize = 20,
TextSize = 16,
TextColor3 = style.mutedTextColor,
}),

c("TextLabel", {
Text = "..",
Position = UDim2.new(0, 0, 0, -7),
BackgroundTransparency = 1,
TextSize = 20,
TextSize = 16,
TextColor3 = style.mutedTextColor,
}),
}),
Expand All @@ -151,7 +151,7 @@ return Runtime.widget(function(options, fn)
Font = Enum.Font.GothamBold,
Size = UDim2.new(1, 0, 1, 0),
TextColor3 = style.mutedTextColor,
TextSize = 20,
TextSize = 16,
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
TextTruncate = Enum.TextTruncate.AtEnd,
Expand All @@ -165,7 +165,7 @@ return Runtime.widget(function(options, fn)
AnchorPoint = Vector2.new(0.5, 0),
Position = UDim2.new(1, -10, 0, 0),
TextColor3 = Color3.fromHex("#71190f"),
TextSize = 20,
TextSize = 16,
Font = Enum.Font.Gotham,

MouseEnter = function()
Expand Down Expand Up @@ -205,8 +205,8 @@ return Runtime.widget(function(options, fn)
[ref] = "resizeHandle",
Size = UDim2.new(0, 20, 0, 20),
Text = "≡",
Font = Enum.Font.SourceSans,
TextSize = 20,
Font = Enum.Font.Gotham,
TextSize = 16,
Rotation = -45,
BackgroundTransparency = 1,
TextColor3 = style.mutedTextColor,
Expand Down