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

Commit 12195c5

Browse files
committed
Fix clipping
Signed-off-by: Ryan Lua <[email protected]>
1 parent 16ff83d commit 12195c5

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

src/Signs/PluginGui/GuiObjectPart.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function GuiObjectPart.new(
4444
surfaceGui.LightInfluence = lightInfluence or 0
4545
surfaceGui.AlwaysOnTop = alwaysOnTop or false
4646
surfaceGui.AutoLocalize = autoLocalize or true
47+
surfaceGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
4748
surfaceGui.Parent = part
4849

4950
local guiObject = label:Clone()
@@ -53,6 +54,14 @@ function GuiObjectPart.new(
5354
guiObject.UIStroke:Destroy()
5455
end
5556
end
57+
if guiObject.Rotation % 90 ~= 0 then
58+
local canvas = Instance.new("CanvasGroup")
59+
canvas.BackgroundTransparency = 1
60+
canvas.Size = UDim2.new(1, 0, 1, 0)
61+
canvas.Parent = surfaceGui
62+
guiObject.Parent = canvas
63+
64+
end
5665

5766
Selection:Set({ part })
5867

src/Signs/PluginGui/init.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ function PluginGui:newPluginGui(widgetGui)
209209
CustomTextLabel:UpdateLineHeight(newValue)
210210
end)
211211

212-
213212
-- Horizontal alignment choice
214213
local yChoice = LabeledMultiChoice.new(
215214
"YChoice", -- name suffix of gui object

src/Signs/PluginInfo/init.client.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ button.ClickableWhenViewportHidden = true
2929
local widget = plugin:CreateDockWidgetPluginGui("Signs", widgetInfo)
3030
widget.Title = "Signs 3.1.0"
3131
widget.Name = "Signs"
32+
widget.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
3233

3334
-- Initialize PluginGui or DevelopmentGui
3435
local AddOns = require(script.Parent.PluginGui)

src/Signs/StudioWidgets/CustomTextLabel.lua

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ function CustomTextLabelClass.new(nameSuffix, height)
2121
background.BackgroundTransparency = 1
2222
self._background = background
2323

24+
local canvas = Instance.new("CanvasGroup")
25+
canvas.Name = "CanvasGroup"
26+
canvas.Parent = background
27+
canvas.Size = UDim2.new(0, height, 0, height)
28+
canvas.AnchorPoint = Vector2.new(0.5, 0.5)
29+
canvas.Position = UDim2.new(0.5, 0, 0.5, 0)
30+
self._canvas = canvas
31+
2432
local frame = Instance.new("ImageLabel")
2533
frame.BorderSizePixel = 1
2634
frame.Image = "rbxasset://textures/9SliceEditor/GridPattern.png"
@@ -29,7 +37,7 @@ function CustomTextLabelClass.new(nameSuffix, height)
2937
frame.Size = UDim2.new(0, height, 0, height)
3038
frame.AnchorPoint = Vector2.new(0.5, 0.5)
3139
frame.Position = UDim2.new(0.5, 0, 0.5, 0)
32-
frame.Parent = background
40+
frame.Parent = canvas
3341
GuiUtilities.syncGuiElementShadowColor(frame)
3442
self._frame = frame
3543

@@ -195,4 +203,4 @@ end
195203

196204
return CustomTextLabelClass
197205

198-
-- To fix the above you can
206+
-- To fix the above you can

0 commit comments

Comments
 (0)