From ff867f2b66eb4dc19f997d3dc30ad0be291c68d3 Mon Sep 17 00:00:00 2001 From: Cosmental Date: Tue, 22 Aug 2023 17:00:15 -0400 Subject: [PATCH] NOW its fixed LOL --- .../SocialChat/Environments/Client/Components/Channels.lua | 6 +++++- .../SocialChat/Resources/Client/Utility/SmartText.lua | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/MainModule/SocialChat/Environments/Client/Components/Channels.lua b/src/MainModule/SocialChat/Environments/Client/Components/Channels.lua index 4d7da0c..da5df11 100644 --- a/src/MainModule/SocialChat/Environments/Client/Components/Channels.lua +++ b/src/MainModule/SocialChat/Environments/Client/Components/Channels.lua @@ -418,7 +418,9 @@ function Channel:Message(Message : string, Metadata : table?, IsPrivateMessage : ImageLabel.BackgroundTransparency = 1 ImageLabel.Image = "rbxthumb://type=Asset&id="..(Metadata.Tag.Icon).."&w=420&h=420" ImageLabel.Name = "TAG_ICON" - + ImageLabel.AnchorPoint = Vector2.new(0, 1); + ImageLabel.Position = UDim2.fromScale(0, 1); + StringRenderer:AddGroup("TagIcon", {ImageLabel}, Settings.MessageFont); ImageLabel.Parent = MainFrame elseif (Settings.DisplayRobloxIcons) then @@ -435,6 +437,8 @@ function Channel:Message(Message : string, Metadata : table?, IsPrivateMessage : ImageLabel.BackgroundTransparency = 1 ImageLabel.Image = RobloxIcon ImageLabel.Name = "ROBLOX_ICON" + ImageLabel.AnchorPoint = Vector2.new(0, 1); + ImageLabel.Position = UDim2.fromScale(0, 1); StringRenderer:AddGroup("RobloxIcon", {ImageLabel}, Settings.MessageFont); ImageLabel.Parent = MainFrame diff --git a/src/MainModule/SocialChat/Resources/Client/Utility/SmartText.lua b/src/MainModule/SocialChat/Resources/Client/Utility/SmartText.lua index d208b52..c300156 100644 --- a/src/MainModule/SocialChat/Resources/Client/Utility/SmartText.lua +++ b/src/MainModule/SocialChat/Resources/Client/Utility/SmartText.lua @@ -263,7 +263,11 @@ function SmartStringObject:Update() if ((not Object:IsA("TextLabel")) and (not Object:IsA("TextButton")) and (not Object:IsA("TextBox")) or (Object:GetAttribute("_smImg"))) then Object.Size = UDim2.fromOffset(GroupFontSize - 2, GroupFontSize - 2); - Object.Position = UDim2.fromOffset(TotalSizeX, TotalSizeY); + + if (TotalSizeX > 0 or TotalSizeY > 0) then + Object.Position = UDim2.fromOffset(TotalSizeX, TotalSizeY); + end + TotalSizeX += GroupFontSize continue;