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

Make debugger widgets more compact #94

Draft
wants to merge 7 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: 4 additions & 2 deletions lib/debugger/formatTable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ local function formatTable(object, mode, _padLength, _depth)
end

if mode == FormatMode.Long then
part ..= "\n" .. string.rep(" ", _depth - 1)
local spaces = string.rep(" ", _depth - 1)
part ..= if count == 0 then spaces else "\n" .. spaces
end

count += 1
Expand Down Expand Up @@ -94,7 +95,8 @@ local function formatTable(object, mode, _padLength, _depth)
end

if mode == FormatMode.Long then
str ..= "\n" .. string.rep(" ", _depth - 2)
local spaces = string.rep(" ", _depth - 1)
str ..= if count == #values then spaces else "\n" .. spaces
end

if mode == FormatMode.Short or _depth > 1 then
Expand Down
6 changes: 3 additions & 3 deletions lib/debugger/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ local function ui(debugger, loop)
end
end

plasma.space(30)
plasma.space(20)

plasma.heading("STATE")
plasma.space(10)
Expand Down Expand Up @@ -115,7 +115,7 @@ local function ui(debugger, loop)
end
end

plasma.space(30)
plasma.space(20)
plasma.heading("SYSTEMS")
plasma.space(10)

Expand Down Expand Up @@ -172,7 +172,7 @@ local function ui(debugger, loop)
end
end

plasma.space(20)
plasma.space(10)
end
end)

Expand Down
2 changes: 1 addition & 1 deletion lib/debugger/widgets/codeText.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ return function(Plasma)
Text = "",
AutomaticSize = Enum.AutomaticSize.Y,
Font = Enum.Font.Code,
TextSize = 22,
TextSize = 18,
TextStrokeTransparency = 0.5,
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
Expand Down
6 changes: 3 additions & 3 deletions lib/debugger/widgets/link.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ return function(Plasma)
Size = UDim2.new(0, 30, 1, 0),
Text = options.icon,
TextXAlignment = Enum.TextXAlignment.Left,
TextSize = 23,
TextSize = 18,
TextColor3 = style.textColor,
Font = Enum.Font.GothamBold,
}),
Expand All @@ -50,7 +50,7 @@ return function(Plasma)
Text = text,
TextXAlignment = Enum.TextXAlignment.Left,
TextColor3 = color,
TextSize = 19,
TextSize = 16,
}),

Activated = function()
Expand Down Expand Up @@ -87,7 +87,7 @@ return function(Plasma)
refs.button.Icon.Text = options.icon or ""
refs.button.Icon.Visible = not not options.icon

refs.mainText.Font = options.font or Enum.Font.SourceSans
refs.mainText.Font = options.font or Enum.Font.Gotham

return {
clicked = function()
Expand Down
1 change: 1 addition & 0 deletions lib/debugger/widgets/panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ return function(Plasma)
Position = UDim2.new(1, -20, 0.5, 0),
AnchorPoint = Vector2.new(1, 0.5),
BackgroundTransparency = 1,
BorderSizePixel = 0,
Size = UDim2.new(0, 120, 0, 26),
Image = "rbxassetid://10111567777",
}),
Expand Down
6 changes: 4 additions & 2 deletions lib/debugger/widgets/realmSwitch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,21 @@ return function(Plasma)
Text = left,
Size = UDim2.new(0.5, 0, 1, 0),
BackgroundColor3 = style.primaryColor,
BorderSizePixel = 0,
TextColor3 = style.textColor,
Font = Enum.Font.GothamMedium,
TextSize = 15,
TextSize = 14,
}),

create("TextLabel", {
[ref] = "right",
Text = right,
Size = UDim2.new(0.5, 0, 1, 0),
BackgroundColor3 = style.bg1,
BorderSizePixel = 0,
TextColor3 = style.textColor,
Font = Enum.Font.GothamMedium,
TextSize = 15,
TextSize = 14,
}),

MouseEnter = function()
Expand Down
15 changes: 8 additions & 7 deletions lib/debugger/widgets/selectionList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ return function(Plasma)
local refs = Plasma.useInstance(function(ref)
local button = create("TextButton", {
[ref] = "button",
Size = UDim2.new(1, 0, 0, 40),
Size = UDim2.new(1, 0, 0, 24),
Text = "",

create("UICorner", {
Expand All @@ -31,10 +31,11 @@ return function(Plasma)
create("TextLabel", {
Name = "Icon",
BackgroundTransparency = 1,
Size = UDim2.new(0, 22, 1, 0),
AutomaticSize = Enum.AutomaticSize.X,
Size = UDim2.new(0, 0, 1, 0),
Text = icon,
TextXAlignment = Enum.TextXAlignment.Left,
TextSize = 23,
TextSize = 18,
TextColor3 = style.textColor,
Font = Enum.Font.GothamBold,
}),
Expand All @@ -45,9 +46,9 @@ return function(Plasma)
Size = UDim2.new(0, 0, 1, 0),
Text = text,
TextXAlignment = Enum.TextXAlignment.Left,
TextSize = 19,
TextSize = 14,
TextColor3 = style.textColor,
Font = Enum.Font.SourceSans,
Font = Enum.Font.Gotham,
TextTruncate = Enum.TextTruncate.AtEnd,

create("UISizeConstraint", {
Expand All @@ -62,9 +63,9 @@ return function(Plasma)
Size = UDim2.new(0, 0, 1, 0),
Text = "",
TextXAlignment = Enum.TextXAlignment.Left,
TextSize = 15,
TextSize = 12,
TextColor3 = style.mutedTextColor,
Font = Enum.Font.SourceSans,
Font = Enum.Font.Gotham,
}),

Activated = function()
Expand Down
2 changes: 1 addition & 1 deletion lib/debugger/widgets/tooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ return function(plasma)
[ref] = "label",
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
TextSize = 20,
TextSize = 16,
BorderSizePixel = 0,
Font = Enum.Font.Code,
TextStrokeTransparency = 0.5,
Expand Down