-
What do you want to achieve? I want my frame’s background color and border to show up on my dockwidget gui.
-
What is the issue? all of the borders and background colors disappear when i parent it to the dock widget plugin
-
What solutions have you tried so far? I’ve looked around the devforum and google for answers
Here is how the Gui looks when i have the widget open
Here is how the Gui is supposed to look (In StarterGUI)
as you can see the frames for some reason do not want to show their background color and borders
I looped through all descendants of the dockwidget and it says they are visible and the background transparency is at 0
It may be something with the way i am parenting the object so here is the code i have running in the modulescript
function module:Init(plugin, button) -- run when plugin is there
self.plugin = plugin
-- Create new "DockWidgetPluginGuiInfo" object
local widgetInfo = DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Float, -- Widget will be initialized in floating panel
false, -- Widget will be initially enabled
false, -- Don't override the previous enabled state
600, -- Default width of the floating window
300, -- Default height of the floating window
300, -- Minimum width of the floating window
150 -- Minimum height of the floating window
)
-- Create new widget GUI
module.Widget = plugin:CreateDockWidgetPluginGui("TestWidget", widgetInfo)
module.Widget.Title = "Remind Me Settings" -- Optional widget title
local UIClone = script.Parent.UI.WidgetUI:Clone()
UIClone:Clone().Background.Parent = module.Widget
button.Click:Connect(function()
module.Widget.Enabled = not module.Widget.Enabled
end)
module.Widget:GetPropertyChangedSignal("Enabled"):Connect(function()
if module.Widget.Enabled == false then
button:SetActive(false)
end
end)
for i, v in pairs(UIClone.Background:GetDescendants()) do -- to find properties inside dockwidget
print(v)
if v:IsA("Frame") or v:IsA("TextBox") or v:IsA("TextLabel") or v:IsA("TextButton") then
if v.BackgroundTransparency then
print(v.BackgroundTransparency)
print(v.BorderSizePixel)
end
end
print("----------------")
end
end
Note: There are NO errors in the output and the code runs perfectly fine
anyway thank you for reading and trying to help out