Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit b4c0a18

Browse files
committed
2 parents c2ade99 + 166577d commit b4c0a18

File tree

13 files changed

+187
-4198
lines changed

13 files changed

+187
-4198
lines changed

default.project.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "project",
33
"tree": {
4+
"$className": "DataModel",
45
"Workspace": {
56
"$className": "Workspace",
67
"$ignoreUnknownInstances": true,
78
"$path": "src/Workspace"
89
}
910
}
10-
}
11+
}

src/Workspace/SignsFree/PluginInfo/init.client.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ widget.Name = "SignsFree"
2828
-- Set CreateButton.Icon to match Studio theme
2929
local function setIcon()
3030
if settings().Studio.Theme == settings().Studio:GetAvailableThemes()[1] then -- Light theme
31-
button.Icon = "rbxassetid://11959767978"
31+
button.Icon = "rbxassetid://12060349104"
3232
elseif settings().Studio.Theme == settings().Studio:GetAvailableThemes()[2] then -- Dark theme
3333
button.Icon = "rbxassetid://12047486680"
3434
else
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--[[
2+
Copyright (C) 2023 The Winners Games - All Rights Reserved.
3+
Unauthorized without written permission from the author.
4+
Copying of this file, via any medium is strictly prohibited.
5+
Written by @TheWinners152 <[email protected]> from The Winners Games <https://www.roblox.com/groups/4973811/-->
6+
--]]

src/Workspace/SignsInternal/PluginGui/GuiObjectPart.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ local Selection = game:GetService("Selection")
1212
GuiObjectPart = {}
1313
GuiObjectPart.__index = GuiObjectPart
1414

15-
function GuiObjectPart.new(label: GuiObject, lightInfluence: number, alwaysOnTop: boolean, autoLocalize: boolean)
15+
function GuiObjectPart.new(label: GuiObject, lightInfluence: number?, alwaysOnTop: boolean?, autoLocalize: boolean?)
1616
local self = {}
1717
setmetatable(self, GuiObjectPart)
1818

@@ -24,7 +24,7 @@ function GuiObjectPart.new(label: GuiObject, lightInfluence: number, alwaysOnTop
2424
part.Parent = workspace
2525
part.Transparency = 1
2626
part.Size = Vector3.new(4, 4, 0)
27-
part.Position = (camera.CFrame + camera.CFrame.LookVector * 15).Position
27+
part.Position = (camera.CFrame + camera.CFrame.LookVector * 10).Position
2828
local yCameraRotation = camera.CFrame.Rotation.Y
2929
local yRotation = math.floor(yCameraRotation/90 + 0.5) * 90
3030
part.Rotation = Vector3.new(0, yRotation, 0)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
local choices = {
2+
3+
{Id = "1",
4+
Mode = Enum.LineJoinMode.Round,
5+
Text = "Round",
6+
},
7+
{Id = "2",
8+
Mode = Enum.LineJoinMode.Bevel,
9+
Text = "Bevel",
10+
},
11+
{Id = "3",
12+
Mode = Enum.LineJoinMode.Miter,
13+
Text = "Miter",
14+
},
15+
16+
}
17+
18+
return choices

src/Workspace/SignsInternal/PluginGui/init.lua

Lines changed: 62 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ local VerticallyScalingListFrame = require(targetFolder.VerticallyScalingListFra
1818
local Color = require(script.Color)
1919
local FontFace = require(script.FontFace)
2020
local GuiObjectPart = require(script.GuiObjectPart)
21+
local LineJoinMode = require(script.LineJoinMode)
2122

2223
local PluginGui = {}
2324

@@ -110,14 +111,14 @@ function PluginGui:newPluginGui(widgetGui)
110111
)
111112
wrappedCheckbox:GetFrame().Parent = textCollapse:GetContentsFrame()
112113

113-
local colorTextChoice = LabeledMultiChoice.new( -- Another hacky way to display color.
114+
local colorTextChoice = LabeledMultiChoice.new(
114115
"colorSelection", -- name suffix of gui object
115116
"Text Color", -- title text of the multi choice
116117
Color, -- choices array
117-
11 -- the starting index of the selection (in this case choice 1)
118+
11 -- the starting index of the selection
118119
)
119-
if settings().Studio.Theme == settings().Studio:GetAvailableThemes()[2] then
120-
fontTextChoice:SetSelectedIndex(1)
120+
if (GuiUtilities:ShouldUseIconsForDarkerBackgrounds()) then
121+
colorTextChoice:SetSelectedIndex(1)
121122
end
122123
colorTextChoice:GetFrame().Parent = textCollapse:GetContentsFrame()
123124

@@ -141,35 +142,62 @@ function PluginGui:newPluginGui(widgetGui)
141142
"fontTextChoice", -- name suffix of gui object
142143
"Font Face", -- title text of the multi choice
143144
FontFace, -- choices array
144-
32 -- the starting index of the selection (in this case choice 1)
145+
32 -- the starting index of the selection
145146
)
146147
fontTextChoice:GetFrame().Parent = textCollapse:GetContentsFrame()
147148

148149
local strokeCollapse = CollapsibleTitledSection.new( -- Fonts collapse
149150
"strokeCollapse", -- name suffix of the gui object
150-
"Text Stroke", -- the text displayed beside the collapsible arrow
151+
"Enabled", -- the text displayed beside the collapsible arrow
151152
true, -- have the content frame auto-update its size?
152153
true, -- minimizable?
153154
true -- minimized by default?
154155
)
155156
listFrame:AddChild(strokeCollapse:GetSectionFrame()) -- add child to expanding VerticallyScalingListFrame
156157

158+
local strokeCheckbox = LabeledCheckbox.new(
159+
"strokeCheckbox", -- name suffix of gui object
160+
"Stroke", -- text beside the checkbox
161+
false, -- initial value
162+
false -- initially disabled?
163+
)
164+
strokeCheckbox:GetFrame().Parent = strokeCollapse:GetContentsFrame()
165+
166+
local colorStrokeChoice = LabeledMultiChoice.new(
167+
"colorStrokeChoice", -- name suffix of gui object
168+
"Color", -- title text of the multi choice
169+
Color, -- choices array
170+
11 -- the starting index of the selection
171+
)
172+
if GuiUtilities:ShouldUseIconsForDarkerBackgrounds() == true then
173+
colorStrokeChoice:SetSelectedIndex(11)
174+
end
175+
colorStrokeChoice:GetFrame().Parent = strokeCollapse:GetContentsFrame()
176+
177+
local joinStrokeChoice = LabeledMultiChoice.new(
178+
"joinStrokeChoice", -- name suffix of gui object
179+
"Line Join Mode", -- title text of the multi choice
180+
LineJoinMode, -- choices array
181+
1 -- the starting index of the selection
182+
)
183+
joinStrokeChoice:GetFrame().Parent = strokeCollapse:GetContentsFrame()
184+
185+
local thicknessStrokeSlider = LabeledSlider.new( -- Size Slider
186+
"thicknessStrokeSlider", -- name suffix of gui object
187+
"Thickness", -- title text of the multi choice
188+
11, -- how many intervals to split the slider into
189+
2 -- the starting value of the slider
190+
)
191+
thicknessStrokeSlider:GetFrame().Parent = strokeCollapse:GetContentsFrame()
192+
157193
local transparencyStrokeSlider = LabeledSlider.new( -- Size Slider
158194
"transparencyStrokeSlider", -- name suffix of gui object
159195
"Transparency", -- title text of the multi choice
160196
11, -- how many intervals to split the slider into
161-
11 -- the starting value of the slider
197+
1 -- the starting value of the slider
162198
)
163199
transparencyStrokeSlider:GetFrame().Parent = strokeCollapse:GetContentsFrame()
164200

165-
local colorStrokeChoice = LabeledMultiChoice.new( -- Another hacky way to display color.
166-
"colorStrokeSelection", -- name suffix of gui object
167-
"Stroke Color", -- title text of the multi choice
168-
Color, -- choices array
169-
11 -- the starting index of the selection (in this case choice 1)
170-
)
171-
colorStrokeChoice:GetFrame().Parent = strokeCollapse:GetContentsFrame()
172-
173201
local backgroundCollapse = CollapsibleTitledSection.new( -- Fonts collapse
174202
"backgroundCollapse", -- name suffix of the gui object
175203
"Background", -- the text displayed beside the collapsible arrow
@@ -187,11 +215,11 @@ function PluginGui:newPluginGui(widgetGui)
187215
)
188216
transparencyBackgroundSlider:GetFrame().Parent = backgroundCollapse:GetContentsFrame()
189217

190-
local colorBackgroundChoice = LabeledMultiChoice.new( -- Another hacky way to display color.
218+
local colorBackgroundChoice = LabeledMultiChoice.new(
191219
"colorBackgroundSelection", -- name suffix of gui object
192220
"Background Color", -- title text of the multi choice
193221
Color, -- choices array
194-
1 -- the starting index of the selection (in this case choice 1)
222+
1 -- the starting index of the selection
195223
)
196224
colorBackgroundChoice:GetFrame().Parent = backgroundCollapse:GetContentsFrame()
197225

@@ -283,6 +311,7 @@ function PluginGui:newPluginGui(widgetGui)
283311
italicCheckbox:SetValueChangedFunction(function(newValue)
284312
CustomTextLabel:UpdateFontFaceItalic(newValue)
285313
end)
314+
286315
colorTextChoice:SetValueChangedFunction(function(newIndex)
287316
local color = Color[newIndex].Color
288317
CustomTextLabel:UpdateTextColor3(color)
@@ -293,13 +322,26 @@ function PluginGui:newPluginGui(widgetGui)
293322
CustomTextLabel:UpdateFontFace(font)
294323
end)
295324

296-
transparencyStrokeSlider:SetValueChangedFunction(function(newValue)
297-
CustomTextLabel:UpdateTextStrokeTransparency((newValue - 1) / 10)
325+
strokeCheckbox:SetValueChangedFunction(function(newValue)
326+
CustomTextLabel:UpdateStroke(newValue)
298327
end)
299328

300329
colorStrokeChoice:SetValueChangedFunction(function(newIndex)
301330
local color = Color[newIndex].Color
302-
CustomTextLabel:UpdateTextStrokeColor3(color)
331+
CustomTextLabel:UpdateStrokeColor(color)
332+
end)
333+
334+
joinStrokeChoice:SetValueChangedFunction(function(newIndex)
335+
local join = LineJoinMode[newIndex].Mode
336+
CustomTextLabel:UpdateStrokeJoin(join)
337+
end)
338+
339+
thicknessStrokeSlider:SetValueChangedFunction(function(newValue)
340+
CustomTextLabel:UpdateStrokeThickness((newValue - 1))
341+
end)
342+
343+
transparencyStrokeSlider:SetValueChangedFunction(function(newValue)
344+
CustomTextLabel:UpdateStrokeTransparency((newValue - 1) / 10)
303345
end)
304346

305347
transparencyBackgroundSlider:SetValueChangedFunction(function(newValue)

src/Workspace/SignsInternal/PluginInfo/init.client.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ pluginToolbar:SetPlugin(plugin)
1717
local toolbar = pluginToolbar:CreateToolbar("Text Tools")
1818

1919
-- Add a toolbar button
20-
local button = toolbar:CreateButton("Signs", "Hide/show the Signs Widget.", "rbxassetid://12060887019", "Signs")
20+
local button = toolbar:CreateButton("SignsInternal", "Hide/show the Signs Widget.", "rbxassetid://12168352133", "Signs Internal")
2121
button.ClickableWhenViewportHidden = true
2222

2323
-- Create new widget GUI and name it
2424
local widget = plugin:CreateDockWidgetPluginGui("Signs", widgetInfo)
25-
widget.Title = "Signs"
26-
widget.Name = "Signs"
25+
widget.Title = "Signs Internal"
26+
widget.Name = "SignsInternal"
2727

2828
-- Set CreateButton.Icon to match Studio theme
2929
local function setIcon()
3030
if settings().Studio.Theme == settings().Studio:GetAvailableThemes()[1] then -- Light theme
31-
button.Icon = "rbxassetid://12060897756"
31+
button.Icon = "rbxassetid://12168355722"
3232
elseif settings().Studio.Theme == settings().Studio:GetAvailableThemes()[2] then -- Dark theme
33-
button.Icon = "rbxassetid://12060890851"
33+
button.Icon = "rbxassetid://12168354157"
3434
else
35-
button.Icon = "rbxassetid://12060887019"
35+
button.Icon = "rbxassetid://12168352133"
3636
warn("Failed to get Studio Theme. Button Icon may have low visibility.")
3737
end
3838
end

src/Workspace/SignsInternal/ReadMe.server.lua

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/Workspace/SignsInternal/StudioWidgets/CustomTextButton.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ function CustomTextButtonClass:_updateButtonVisual()
8484
end
8585
end
8686

87-
-- Backwards compatibility (should be removed in the future)
88-
-- CustomTextButtonClass.getButton = CustomTextButtonClass.GetButton
89-
9087
function CustomTextButtonClass:GetButton()
9188
return self._button
9289
end

src/Workspace/SignsInternal/StudioWidgets/CustomTextLabel.lua

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ function CustomTextLabelClass.new(nameSuffix, height)
1919
local label = Instance.new('TextLabel')
2020
label.Text = "Preview"
2121
label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
22-
if settings().Studio.Theme == settings().Studio:GetAvailableThemes()[2] then
22+
if (GuiUtilities:ShouldUseIconsForDarkerBackgrounds()) then
2323
label.TextColor3 = Color3.fromRGB(255, 255, 255)
24-
else
25-
label.TextColor3 = Color3.fromRGB(0, 0, 0)
2624
end
2725
label.BackgroundTransparency = 1
2826
label.Size = UDim2.new(1, 0, 1, 0)
@@ -31,6 +29,14 @@ function CustomTextLabelClass.new(nameSuffix, height)
3129
label.TextWrapped = true
3230
label.Parent = frame
3331

32+
local stroke = Instance.new("UIStroke")
33+
stroke.Enabled = false
34+
stroke.Color = Color3.fromRGB(255, 255, 255)
35+
if (GuiUtilities:ShouldUseIconsForDarkerBackgrounds()) then
36+
stroke.Color = Color3.fromRGB(0, 0, 0)
37+
end
38+
stroke.Parent = label
39+
3440
function CustomTextLabelClass:UpdateText(newValue: string)
3541
label.Text = newValue
3642
end
@@ -95,12 +101,32 @@ function CustomTextLabelClass.new(nameSuffix, height)
95101
label.FontFace = newValue
96102
end
97103

98-
function CustomTextLabelClass:UpdateTextStrokeTransparency(newValue: number)
99-
label.TextStrokeTransparency = newValue
104+
-- function CustomTextLabelClass:UpdateTextStrokeTransparency(newValue: number)
105+
-- label.TextStrokeTransparency = newValue
106+
-- end
107+
108+
-- function CustomTextLabelClass:UpdateTextStrokeColor3(newValue: Color3)
109+
-- label.TextStrokeColor3 = newValue
110+
-- end
111+
112+
function CustomTextLabelClass:UpdateStroke(newValue: boolean)
113+
stroke.Enabled = newValue
114+
end
115+
116+
function CustomTextLabelClass:UpdateStrokeTransparency(newValue: number)
117+
stroke.Transparency = newValue
118+
end
119+
120+
function CustomTextLabelClass:UpdateStrokeColor(newValue: Color3)
121+
stroke.Color = newValue
122+
end
123+
124+
function CustomTextLabelClass:UpdateStrokeJoin(newValue: Enum.LineJoinMode)
125+
stroke.LineJoinMode = newValue
100126
end
101127

102-
function CustomTextLabelClass:UpdateTextStrokeColor3(newValue: Color3)
103-
label.TextStrokeColor3 = newValue
128+
function CustomTextLabelClass:UpdateStrokeThickness(newValue: number)
129+
stroke.Thickness = newValue
104130
end
105131

106132
function CustomTextLabelClass:UpdateBackgroundTransparency(newValue: number)

0 commit comments

Comments
 (0)