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

Commit 83cfcc0

Browse files
committed
Cleaned up code.
1 parent 3b4b5cb commit 83cfcc0

17 files changed

+308
-298
lines changed

src/SignsInternal/PluginGui/Color.lua

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,29 @@ local choices = {
22

33
-- Every font in existance, needs a better loop system for if new font is made. Much as a proof of concept for now.
44
-- [[<font color="rgb(_COLOR3_)">_COLOR_</font>]]
5-
{Id = "1",
5+
{
6+
Id = "1",
67
Color = Color3.fromRGB(255, 255, 255),
7-
Text = [[<stroke color="rgb(46, 46, 46)" joins="round" thickness="1" transparency="0.25"><font color="rgb(242, 243, 243)">White</font></stroke>]]},
8-
{Id = "2",
9-
Color = Color3.fromRGB(128, 128, 128),
10-
Text = [[<font color="rgb(128, 128, 128)">Grey</font>]]},
11-
{Id = "3",
12-
Color = Color3.fromRGB(255, 0, 0),
13-
Text = [[<font color="rgb(255, 0, 0)">Red</font>]]},
14-
{Id = "4",
15-
Color = Color3.fromRGB(255, 255, 0),
16-
Text = [[<font color="rgb(245, 205, 48)">Yellow</font>]]},
17-
{Id = "5",
18-
Color = Color3.fromRGB(255, 170, 0),
19-
Text = [[<font color="rgb(255, 170, 0)">Orange</font>]]},
20-
{Id = "6",
21-
Color = Color3.fromRGB(0, 255, 0),
22-
Text = [[<font color="rgb(0, 255, 0)">Green</font>]]},
23-
{Id = "7",
24-
Color = Color3.fromRGB(0, 0, 255),
25-
Text = [[<font color="rgb(0, 0, 255)">Blue</font>]]},
26-
{Id = "8",
27-
Color = Color3.fromRGB(170, 0, 255),
28-
Text = [[<font color="rgb(170, 0, 255)">Violet</font>]]},
29-
{Id = "9",
30-
Color = Color3.fromRGB(255, 0, 255),
31-
Text = [[<font color="rgb(255, 0, 255)">Pink</font>]]},
32-
{Id = "10",
8+
Text = [[<stroke color="rgb(46, 46, 46)" joins="round" thickness="1" transparency="0.25"><font color="rgb(242, 243, 243)">White</font></stroke>]],
9+
},
10+
{ Id = "2", Color = Color3.fromRGB(128, 128, 128), Text = [[<font color="rgb(128, 128, 128)">Grey</font>]] },
11+
{ Id = "3", Color = Color3.fromRGB(255, 0, 0), Text = [[<font color="rgb(255, 0, 0)">Red</font>]] },
12+
{ Id = "4", Color = Color3.fromRGB(255, 255, 0), Text = [[<font color="rgb(245, 205, 48)">Yellow</font>]] },
13+
{ Id = "5", Color = Color3.fromRGB(255, 170, 0), Text = [[<font color="rgb(255, 170, 0)">Orange</font>]] },
14+
{ Id = "6", Color = Color3.fromRGB(0, 255, 0), Text = [[<font color="rgb(0, 255, 0)">Green</font>]] },
15+
{ Id = "7", Color = Color3.fromRGB(0, 0, 255), Text = [[<font color="rgb(0, 0, 255)">Blue</font>]] },
16+
{ Id = "8", Color = Color3.fromRGB(170, 0, 255), Text = [[<font color="rgb(170, 0, 255)">Violet</font>]] },
17+
{ Id = "9", Color = Color3.fromRGB(255, 0, 255), Text = [[<font color="rgb(255, 0, 255)">Pink</font>]] },
18+
{
19+
Id = "10",
3320
Color = Color3.fromRGB(27, 42, 53),
34-
Text = [[<stroke color="rgb(255, 255, 255)" joins="round" thickness="1" transparency="0.75"><font color="rgb(27, 42, 53)">Black</font></stroke>]]},
35-
{Id = "11",
21+
Text = [[<stroke color="rgb(255, 255, 255)" joins="round" thickness="1" transparency="0.75"><font color="rgb(27, 42, 53)">Black</font></stroke>]],
22+
},
23+
{
24+
Id = "11",
3625
Color = Color3.fromRGB(17, 17, 17),
37-
Text = [[<stroke color="rgb(255, 255, 255)" joins="round" thickness="1" transparency="0.75"><font color="rgb(17, 17, 17)">Really black</font></stroke>]]}
38-
26+
Text = [[<stroke color="rgb(255, 255, 255)" joins="round" thickness="1" transparency="0.75"><font color="rgb(17, 17, 17)">Really black</font></stroke>]],
27+
},
3928
} -- Array of fonts, please fix this. I really hate this.
4029

41-
return choices
30+
return choices

src/SignsInternal/PluginGui/FontFace.lua

Lines changed: 145 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -3,115 +3,186 @@ local FontFace = {
33
-- Every font in existance, needs a better loop system for if fromName font is made. Much as a proof of concept for now.
44
-- [[<font family="rbxasset://fonts/families/_FAMILY_.json">_NAME_</font>]]
55

6-
{Id = "AccanthisADFStd",
6+
{
7+
Id = "AccanthisADFStd",
78
Font = Font.fromName("AccanthisADFStd"),
8-
Text = [[<font family="rbxasset://fonts/families/AccanthisADFStd.json">Accanthis</font>]]},
9-
{Id = "AmaticSC",
9+
Text = [[<font family="rbxasset://fonts/families/AccanthisADFStd.json">Accanthis</font>]],
10+
},
11+
{
12+
Id = "AmaticSC",
1013
Font = Font.fromName("AmaticSC"),
11-
Text = [[<font family="rbxasset://fonts/families/AmaticSC.json">Amatic SC</font>]]},
12-
{Id = "Arial",
14+
Text = [[<font family="rbxasset://fonts/families/AmaticSC.json">Amatic SC</font>]],
15+
},
16+
{
17+
Id = "Arial",
1318
Font = Font.fromName("Arial"),
14-
Text = [[<font family="rbxasset://fonts/families/Arial.json">Arial</font>]]},
15-
{Id = "Balthazar",
19+
Text = [[<font family="rbxasset://fonts/families/Arial.json">Arial</font>]],
20+
},
21+
{
22+
Id = "Balthazar",
1623
Font = Font.fromName("Balthazar"),
17-
Text = [[<font family="rbxasset://fonts/families/Balthazar.json">Balthazar</font>]]},
18-
{Id = "Bangers",
24+
Text = [[<font family="rbxasset://fonts/families/Balthazar.json">Balthazar</font>]],
25+
},
26+
{
27+
Id = "Bangers",
1928
Font = Font.fromName("Bangers"),
20-
Text = [[<font family="rbxasset://fonts/families/Bangers.json">Bangers</font>]]},
21-
{Id = "ComicNeueAngular",
29+
Text = [[<font family="rbxasset://fonts/families/Bangers.json">Bangers</font>]],
30+
},
31+
{
32+
Id = "ComicNeueAngular",
2233
Font = Font.fromName("ComicNeueAngular"),
23-
Text = [[<font family="rbxasset://fonts/families/ComicNeueAngular.json">Comic Neue</font>]]},
24-
{Id = "Creepster",
34+
Text = [[<font family="rbxasset://fonts/families/ComicNeueAngular.json">Comic Neue</font>]],
35+
},
36+
{
37+
Id = "Creepster",
2538
Font = Font.fromName("Creepster"),
26-
Text = [[<font family="rbxasset://fonts/families/Creepster.json">Creepster</font>]]},
27-
{Id = "DenkOne",
39+
Text = [[<font family="rbxasset://fonts/families/Creepster.json">Creepster</font>]],
40+
},
41+
{
42+
Id = "DenkOne",
2843
Font = Font.fromName("DenkOne"),
29-
Text = [[<font family="rbxasset://fonts/families/DenkOne.json">DenkOne</font>]]},
30-
{Id = "Fondamento",
44+
Text = [[<font family="rbxasset://fonts/families/DenkOne.json">DenkOne</font>]],
45+
},
46+
{
47+
Id = "Fondamento",
3148
Font = Font.fromName("Fondamento"),
32-
Text = [[<font family="rbxasset://fonts/families/Fondamento.json">Fondamento</font>]]},
33-
{Id = "FredokaOne",
49+
Text = [[<font family="rbxasset://fonts/families/Fondamento.json">Fondamento</font>]],
50+
},
51+
{
52+
Id = "FredokaOne",
3453
Font = Font.fromName("FredokaOne"),
35-
Text = [[<font family="rbxasset://fonts/families/FredokaOne.json">FredokaOne</font>]]},
36-
{Id = "GothamSSm",
54+
Text = [[<font family="rbxasset://fonts/families/FredokaOne.json">FredokaOne</font>]],
55+
},
56+
{
57+
Id = "GothamSSm",
3758
Font = Font.fromName("GothamSSm"),
38-
Text = [[<font family="rbxasset://fonts/families/GothamSSm.json">Gotham SSm</font>]]},
39-
{Id = "GrenzeGotisch",
59+
Text = [[<font family="rbxasset://fonts/families/GothamSSm.json">Gotham SSm</font>]],
60+
},
61+
{
62+
Id = "GrenzeGotisch",
4063
Font = Font.fromName("GrenzeGotisch"),
41-
Text = [[<font family="rbxasset://fonts/families/GrenzeGotisch.json">Grenze Gotisch </font>]]},
42-
{Id = "Guru",
64+
Text = [[<font family="rbxasset://fonts/families/GrenzeGotisch.json">Grenze Gotisch </font>]],
65+
},
66+
{
67+
Id = "Guru",
4368
Font = Font.fromName("Guru"),
44-
Text = [[<font family="rbxasset://fonts/families/Guru.json">Guru</font>]]},
45-
{Id = "HighwayGothic",
69+
Text = [[<font family="rbxasset://fonts/families/Guru.json">Guru</font>]],
70+
},
71+
{
72+
Id = "HighwayGothic",
4673
Font = Font.fromName("HighwayGothic"),
47-
Text = [[<font family="rbxasset://fonts/families/HighwayGothic.json">Highway Gothic</font>]]},
48-
{Id = "Inconsolata",
74+
Text = [[<font family="rbxasset://fonts/families/HighwayGothic.json">Highway Gothic</font>]],
75+
},
76+
{
77+
Id = "Inconsolata",
4978
Font = Font.fromName("Inconsolata"),
50-
Text = [[<font family="rbxasset://fonts/families/Inconsolata.json">Inconsolata</font>]]},
51-
{Id = "IndieFlower",
79+
Text = [[<font family="rbxasset://fonts/families/Inconsolata.json">Inconsolata</font>]],
80+
},
81+
{
82+
Id = "IndieFlower",
5283
Font = Font.fromName("IndieFlower"),
53-
Text = [[<font family="rbxasset://fonts/families/IndieFlower.json">Indie Flower</font>]]},
54-
{Id = "JosefinSans",
84+
Text = [[<font family="rbxasset://fonts/families/IndieFlower.json">Indie Flower</font>]],
85+
},
86+
{
87+
Id = "JosefinSans",
5588
Font = Font.fromName("JosefinSans"),
56-
Text = [[<font family="rbxasset://fonts/families/JosefinSans.json">Josefin Sans</font>]]},
57-
{Id = "Jura",
89+
Text = [[<font family="rbxasset://fonts/families/JosefinSans.json">Josefin Sans</font>]],
90+
},
91+
{
92+
Id = "Jura",
5893
Font = Font.fromName("Jura"),
59-
Text = [[<font family="rbxasset://fonts/families/Jura.json">Jura</font>]]},
60-
{Id = "Kalam",
94+
Text = [[<font family="rbxasset://fonts/families/Jura.json">Jura</font>]],
95+
},
96+
{
97+
Id = "Kalam",
6198
Font = Font.fromName("Kalam"),
62-
Text = [[<font family="rbxasset://fonts/families/Kalam.json">Kalam</font>]]},
63-
{Id = "LuckiestGuy",
99+
Text = [[<font family="rbxasset://fonts/families/Kalam.json">Kalam</font>]],
100+
},
101+
{
102+
Id = "LuckiestGuy",
64103
Font = Font.fromName("LuckiestGuy"),
65-
Text = [[<font family="rbxasset://fonts/families/LuckiestGuy.json">Luckiest Guy</font>]]},
66-
{Id = "Merriweather",
104+
Text = [[<font family="rbxasset://fonts/families/LuckiestGuy.json">Luckiest Guy</font>]],
105+
},
106+
{
107+
Id = "Merriweather",
67108
Font = Font.fromName("Merriweather"),
68-
Text = [[<font family="rbxasset://fonts/families/Merriweather.json">Merriweather</font>]]},
69-
{Id = "Michroma",
109+
Text = [[<font family="rbxasset://fonts/families/Merriweather.json">Merriweather</font>]],
110+
},
111+
{
112+
Id = "Michroma",
70113
Font = Font.fromName("Michroma"),
71-
Text = [[<font family="rbxasset://fonts/families/Michroma.json">Michroma</font>]]},
72-
{Id = "Nunito",
114+
Text = [[<font family="rbxasset://fonts/families/Michroma.json">Michroma</font>]],
115+
},
116+
{
117+
Id = "Nunito",
73118
Font = Font.fromName("Nunito"),
74-
Text = [[<font family="rbxasset://fonts/families/Nunito.json">Nunito</font>]]},
75-
{Id = "Oswald",
119+
Text = [[<font family="rbxasset://fonts/families/Nunito.json">Nunito</font>]],
120+
},
121+
{
122+
Id = "Oswald",
76123
Font = Font.fromName("Oswald"),
77-
Text = [[<font family="rbxasset://fonts/families/Oswald.json">Oswald</font>]]},
78-
{Id = "PatrickHand",
124+
Text = [[<font family="rbxasset://fonts/families/Oswald.json">Oswald</font>]],
125+
},
126+
{
127+
Id = "PatrickHand",
79128
Font = Font.fromName("PatrickHand"),
80-
Text = [[<font family="rbxasset://fonts/families/PatrickHand.json">Patrick Hand</font>]]},
81-
{Id = "PermanentMarker",
129+
Text = [[<font family="rbxasset://fonts/families/PatrickHand.json">Patrick Hand</font>]],
130+
},
131+
{
132+
Id = "PermanentMarker",
82133
Font = Font.fromName("PermanentMarker"),
83-
Text = [[<font family="rbxasset://fonts/families/PermanentMarker.json">Preduring Marker</font>]]},
84-
{Id = "PressStart2P",
134+
Text = [[<font family="rbxasset://fonts/families/PermanentMarker.json">Preduring Marker</font>]],
135+
},
136+
{
137+
Id = "PressStart2P",
85138
Font = Font.fromName("PressStart2P"),
86-
Text = [[<font family="rbxasset://fonts/families/PressStart2P.json">PressStart2P</font>]]},
87-
{Id = "Roboto",
139+
Text = [[<font family="rbxasset://fonts/families/PressStart2P.json">PressStart2P</font>]],
140+
},
141+
{
142+
Id = "Roboto",
88143
Font = Font.fromName("Roboto"),
89-
Text = [[<font family="rbxasset://fonts/families/Roboto.json">Roboto</font>]]},
90-
{Id = "RobotoCondensed",
144+
Text = [[<font family="rbxasset://fonts/families/Roboto.json">Roboto</font>]],
145+
},
146+
{
147+
Id = "RobotoCondensed",
91148
Font = Font.fromName("RobotoCondensed"),
92-
Text = [[<font family="rbxasset://fonts/families/RobotoCondensed.json">Roboto Condensed</font>]]},
93-
{Id = "RobotoMono",
149+
Text = [[<font family="rbxasset://fonts/families/RobotoCondensed.json">Roboto Condensed</font>]],
150+
},
151+
{
152+
Id = "RobotoMono",
94153
Font = Font.fromName("RobotoMono"),
95-
Text = [[<font family="rbxasset://fonts/families/RobotoMono.json">Roboto Mono</font>]]},
96-
{Id = "Sarpanch",
154+
Text = [[<font family="rbxasset://fonts/families/RobotoMono.json">Roboto Mono</font>]],
155+
},
156+
{
157+
Id = "Sarpanch",
97158
Font = Font.fromName("Sarpanch"),
98-
Text = [[<font family="rbxasset://fonts/families/Sarpanch.json">Sarpanch</font>]]},
99-
{Id = "SourceSansPro",
159+
Text = [[<font family="rbxasset://fonts/families/Sarpanch.json">Sarpanch</font>]],
160+
},
161+
{
162+
Id = "SourceSansPro",
100163
Font = Font.fromName("SourceSansPro"),
101-
Text = [[<font family="rbxasset://fonts/families/SourceSansPro.json">Source Sans Pro</font>]]},
102-
{Id = "SpecialElite",
164+
Text = [[<font family="rbxasset://fonts/families/SourceSansPro.json">Source Sans Pro</font>]],
165+
},
166+
{
167+
Id = "SpecialElite",
103168
Font = Font.fromName("SpecialElite"),
104-
Text = [[<font size="12" family="rbxasset://fonts/families/SpecialElite.json">Special Elite</font>]]},
105-
{Id = "TitilliumWeb",
169+
Text = [[<font size="12" family="rbxasset://fonts/families/SpecialElite.json">Special Elite</font>]],
170+
},
171+
{
172+
Id = "TitilliumWeb",
106173
Font = Font.fromName("TitilliumWeb"),
107-
Text = [[<font family="rbxasset://fonts/families/TitilliumWeb.json">Titillium Web</font>]]},
108-
{Id = "Ubuntu",
174+
Text = [[<font family="rbxasset://fonts/families/TitilliumWeb.json">Titillium Web</font>]],
175+
},
176+
{
177+
Id = "Ubuntu",
109178
Font = Font.fromName("Ubuntu"),
110-
Text = [[<font family="rbxasset://fonts/families/Ubuntu.json">Ubuntu</font>]]},
111-
{Id = "Zekton",
179+
Text = [[<font family="rbxasset://fonts/families/Ubuntu.json">Ubuntu</font>]],
180+
},
181+
{
182+
Id = "Zekton",
112183
Font = Font.fromName("Zekton"),
113-
Text = [[<font family="rbxasset://fonts/families/Zekton.json">Zekton</font>]]}
114-
184+
Text = [[<font family="rbxasset://fonts/families/Zekton.json">Zekton</font>]],
185+
},
115186
} -- Array of fonts, please fix this. I really hate this.
116187

117-
return FontFace
188+
return FontFace

src/SignsInternal/PluginGui/GuiObjectPart.lua

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@ local ChangeHistoryService = game:GetService("ChangeHistoryService")
1010
local CollectionService = game:GetService("CollectionService")
1111
local Selection = game:GetService("Selection")
1212

13-
GuiObjectPart = {}
13+
local GuiObjectPart = {}
1414
GuiObjectPart.__index = GuiObjectPart
1515

16-
function GuiObjectPart.new(label: GuiObject, autoLocalize: boolean?, lightInfluence: number?, alwaysOnTop: boolean?, size: Vector2)
16+
function GuiObjectPart.new(
17+
label: GuiObject,
18+
autoLocalize: boolean?,
19+
lightInfluence: number?,
20+
alwaysOnTop: boolean?,
21+
size: Vector2
22+
)
1723
local self = {}
1824
setmetatable(self, GuiObjectPart)
1925

@@ -29,7 +35,7 @@ function GuiObjectPart.new(label: GuiObject, autoLocalize: boolean?, lightInflue
2935
part.Size = Vector3.new(partSizeX, partSizeY, 0)
3036
part.Position = (camera.CFrame + camera.CFrame.LookVector * 10).Position
3137
local yCameraRotation = camera.CFrame.Rotation.Y
32-
local yRotation = math.floor(yCameraRotation/90 + 0.5) * 90
38+
local yRotation = math.floor(yCameraRotation / 90 + 0.5) * 90
3339
part.Rotation = Vector3.new(0, yRotation, 0)
3440

3541
CollectionService:AddTag(part, "_Sign")
@@ -45,7 +51,7 @@ function GuiObjectPart.new(label: GuiObject, autoLocalize: boolean?, lightInflue
4551
local guiObject = label:Clone()
4652
guiObject.Parent = surfaceGui
4753

48-
Selection:Set({part})
54+
Selection:Set({ part })
4955

5056
ChangeHistoryService:SetWaypoint("Insert new SignPart")
5157

@@ -68,4 +74,4 @@ function GuiObjectPart:GetGuiObject()
6874
return self._guiObject
6975
end
7076

71-
return GuiObjectPart
77+
return GuiObjectPart
Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
local choices = {
22

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-
3+
{ Id = "1", Mode = Enum.LineJoinMode.Round, Text = "Round" },
4+
{ Id = "2", Mode = Enum.LineJoinMode.Bevel, Text = "Bevel" },
5+
{ Id = "3", Mode = Enum.LineJoinMode.Miter, Text = "Miter" },
166
}
177

18-
return choices
8+
return choices

0 commit comments

Comments
 (0)