I'm making a menu for a standalone RP door system. I have a base DFrame that i want to set the material to.
I've looked on the forums and only found how to blur rounded boxes in GM:HudPaint, not for any derma windows.
I don't know where to start or how to recreate it in derma. Also, i've searched on google and wasn't able to find a thing about blur'ing a DFrame.
If someone could lead me in the right direction, that would be awesome.
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/DFrame/SetBackgroundBlur]DFrame/SetBackgroundBlur[/url]?
[B]
EDIT:[/B] Oh, I guess you want the actual FRAME to be blurred, maybe try [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/Derma_DrawBackgroundBlur]Global.Derma_DrawBackgroundBlur[/url]?
[QUOTE=MPan1;49609293][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/DFrame/SetBackgroundBlur]DFrame/SetBackgroundBlur[/url]?[/QUOTE]
That just darkens and blurs the screen behind the DFrame. It doesn't do anything to the frame itself.
[editline]26th January 2016[/editline]
[CODE]local blur = Material("pp/blurscreen")
local function DrawBlur(panel, amount)
local x, y = panel:LocalToScreen(0, 0)
local scrW, scrH = ScrW(), ScrH()
surface.SetDrawColor(255, 255, 255)
surface.SetMaterial(blur)
for i = 1, 3 do
blur:SetFloat("$blur", (i / 3) * (amount or 6))
blur:Recompute()
render.UpdateScreenEffectTexture()
surface.DrawTexturedRect(x * -1, y * -1, scrW, scrH)
end
end[/CODE]
Dug deep and found this function on the forums. It allows you to call this
[CODE]DrawBlur(self, 3)[/CODE]
Call that in panel.Paint function and you will be able to set the amount of blur. I used 3 for the amount.
Sorry, you need to Log In to post a reply to this thread.