So, whole day i was trying to add the closebutton in my menu.
When i was doing it, it was showing no errors but it didnt pop up, i have no idea what to do with that so i ask u, dear coders, help me.
Here is the code: https://pastebin.com/5QK9H2vD ( thats only the part where all gui is based etc. )
I'll do it, but it'll cost you.
function PANEL:Init()
self:SetSize(50, 50)
local close = self:Add("DButton")
self.btnClose = close
close.DoClick = function()
close:SetEnabled(false)
self:AlphaTo(0, 0.2, 0, function()
self:Close()
end)
end
function close:Paint(w, h)
surface.SetDrawColor(color_black)
surface.DrawRect(0, 0, w, h)
surface.DrawOutlinedRect(2, 2, w - 4, h - 4)
end
end
I told you in your last thread to create it in PANEL:Init.
i doesnt pop up man))
Are you creating the panel you define with vgui.Create?
module( "apple_loadout", package.seeall ) local Font2 = _NAME..
check line 62.
Once it got showed in the left corner, but after it disappeared
I just skimmed.. but are you setting the button's parent to the frame?
Browse 2451 Jobs · gmodstore
yes
Line 68:
self:ShowCloseButton(false)
??????
Sorry, you need to Log In to post a reply to this thread.