General purpose modules for Roblox development. [Read-only Codeberg mirror]
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

stylua

Signed-off-by: ClaytonTDM <claytontdm@gmail.com>

+23 -41
+23 -41
Modules/TextTransform.luau
··· 39 39 listFrame.BackgroundTransparency = 1 40 40 listFrame.ClipsDescendants = true 41 41 listFrame:SetAttribute("OriginalBackgroundColor3", originalBackgroundColor3) 42 - listFrame:SetAttribute( 43 - "OriginalBackgroundTransparency", 44 - originalBackgroundTransparency 45 - ) 42 + listFrame:SetAttribute("OriginalBackgroundTransparency", originalBackgroundTransparency) 46 43 listFrame:SetAttribute("OriginalText", originalText) 47 44 48 45 local layout = Instance.new("UIListLayout") 49 46 layout.Name = "LetterLayout" 50 47 layout.FillDirection = Enum.FillDirection.Horizontal 51 48 layout.Wraps = true 52 - layout.HorizontalAlignment = 53 - X_ALIGNMENT_MAP[originalXAlignment] or Enum.HorizontalAlignment.Left 54 - layout.VerticalAlignment = 55 - Y_ALIGNMENT_MAP[originalYAlignment] or Enum.VerticalAlignment.Top 49 + layout.HorizontalAlignment = X_ALIGNMENT_MAP[originalXAlignment] or Enum.HorizontalAlignment.Left 50 + layout.VerticalAlignment = Y_ALIGNMENT_MAP[originalYAlignment] or Enum.VerticalAlignment.Top 56 51 layout.SortOrder = Enum.SortOrder.LayoutOrder 57 52 layout.Parent = listFrame 58 53 ··· 70 65 local originalTextColor = labelToTransform.TextColor3 71 66 local originalTextTransparency = labelToTransform.TextTransparency 72 67 local originalTextStrokeColor = labelToTransform.TextStrokeColor3 73 - local originalTextStrokeTransparency = 74 - labelToTransform.TextStrokeTransparency 68 + local originalTextStrokeTransparency = labelToTransform.TextStrokeTransparency 75 69 local originalXAlignment = labelToTransform.TextXAlignment 76 70 local originalBackgroundColor3 = labelToTransform.BackgroundColor3 77 71 local originalBackgroundTransparency = labelToTransform.BackgroundTransparency ··· 85 79 listFrame:SetAttribute("LetterTextColor3", originalTextColor) 86 80 listFrame:SetAttribute("LetterTextTransparency", originalTextTransparency) 87 81 listFrame:SetAttribute("LetterTextStrokeColor3", originalTextStrokeColor) 88 - listFrame:SetAttribute( 89 - "LetterTextStrokeTransparency", 90 - originalTextStrokeTransparency 91 - ) 82 + listFrame:SetAttribute("LetterTextStrokeTransparency", originalTextStrokeTransparency) 92 83 listFrame:SetAttribute("LetterTextXAlignment", originalXAlignment) 93 84 94 85 local spaceParams = Instance.new("GetTextBoundsParams") ··· 139 130 charLabel.TextColor3 = originalTextColor 140 131 charLabel.TextTransparency = originalTextTransparency 141 132 charLabel.TextStrokeColor3 = originalTextStrokeColor 142 - charLabel.TextStrokeTransparency = 143 - originalTextStrokeTransparency 133 + charLabel.TextStrokeTransparency = originalTextStrokeTransparency 144 134 charLabel.BackgroundTransparency = 1 145 135 charLabel.Size = UDim2.fromScale(1, 1) 146 136 charLabel.Text = char ··· 168 158 -- Inserts a new letter (<code>Frame</code>) into the <code>listFrame</code> at the specified index. 169 159 -- Adjusts <code>LayoutOrder</code> of subsequent letters. 170 160 -- Returns the newly created letter <code>Frame</code> or <code>nil</code> if attributes are missing. 171 - function module.InsertLetter( 172 - listFrame: Frame, 173 - letter: string, 174 - index: number 175 - ): Frame? 161 + function module.InsertLetter(listFrame: Frame, letter: string, index: number): Frame? 176 162 local fontFace = listFrame:GetAttribute("LetterFontFace") :: Font? 177 163 local textSize = listFrame:GetAttribute("LetterTextSize") :: number? 178 164 local textColor = listFrame:GetAttribute("LetterTextColor3") :: Color3? 179 - local textTransparency = 180 - listFrame:GetAttribute("LetterTextTransparency") :: number? 181 - local textStrokeColor = 182 - listFrame:GetAttribute("LetterTextStrokeColor3") :: Color3? 183 - local textStrokeTransparency = 184 - listFrame:GetAttribute("LetterTextStrokeTransparency") :: number? 185 - local textXAlignment = 186 - listFrame:GetAttribute("LetterTextXAlignment") :: Enum.TextXAlignment? 165 + local textTransparency = listFrame:GetAttribute("LetterTextTransparency") :: number? 166 + local textStrokeColor = listFrame:GetAttribute("LetterTextStrokeColor3") :: Color3? 167 + local textStrokeTransparency = listFrame:GetAttribute("LetterTextStrokeTransparency") :: number? 168 + local textXAlignment = listFrame:GetAttribute("LetterTextXAlignment") :: Enum.TextXAlignment? 187 169 local spaceSizeX = listFrame:GetAttribute("SpaceSizeX") :: number? 188 170 local spaceSizeY = listFrame:GetAttribute("SpaceSizeY") :: number? 189 171 190 - if not ( 172 + if 173 + not ( 191 174 fontFace 192 - and textSize 193 - and textColor 194 - and textTransparency 195 - and textStrokeColor 196 - and textStrokeTransparency 197 - and textXAlignment 198 - and spaceSizeX 199 - and spaceSizeY 200 - ) then 201 - warn( 202 - "Cannot InsertLetter: listFrame is missing required style attributes." 175 + and textSize 176 + and textColor 177 + and textTransparency 178 + and textStrokeColor 179 + and textStrokeTransparency 180 + and textXAlignment 181 + and spaceSizeX 182 + and spaceSizeY 203 183 ) 184 + then 185 + warn("Cannot InsertLetter: listFrame is missing required style attributes.") 204 186 return nil 205 187 end 206 188