I just started Garry's Mod Lua programming and I am trying to create a basic DFrame. Except I cannot get the background to blur. Here is my code -
include("shared.lua")
function ENT:Draw()
self:DrawModel()
end
local function ComputerMenu()
--Put computer derma here
local ComputerDerma = vgui.Create( "DFrame" )
ComputerDerma:SetPos( 100, 100 )
ComputerDerma:SetSize( 1280, 720 )
ComputerDerma:SetTitle( "My new Derma frame" )
ComputerDerma:SetDraggable( false )
ComputerDerma:MakePopup()
ComputerDerma:Center()
ComputerDerma:SetBackgroundBlur( true )
ComputerDerma:SetTitle( "Windows 10" )
ComputerDerma.Paint = function(self, w, h )
draw.RoundedBox(0,0,0,w,h,Color(200,200,200,255))
end
end
usermessage.Hook("ComputerMenu",ComputerMenu)
Because you are overriding the default paint function.
use http://wiki.garrysmod.com/page/Global/Derma_DrawBackgroundBlur inside of your paint function.
Sorry, you need to Log In to post a reply to this thread.