I was wondering how to get a blurred screen behind my menus.
I'm not using Derma at the moment so currently I can't use the Derma_BlurBackground function.
Any ideas?
-snip-
One idea I have is (Probably not a good one) to make an invisible derma panel and use SetBackgroundBlur( true ) on it and make it pop up when your menus show up, and close it when they close.
Is it me or did he just snip a non edited post?
I snipped my own post seconds after I posted it. :P
Oh! I was actually looking for this function, thanks!
[QUOTE=InfernalCookie;34716182]-snip-
One idea I have is (Probably not a good one) to make an invisible derma panel and use SetBackgroundBlur( true ) on it and make it pop up when your menus show up, and close it when they close.[/QUOTE]
Thanks, I should've thought of that.
[lua]
local blurTex = Material( "pp/blurscreen" )
surface.SetMaterial( blurTex )
surface.SetDrawColor( 255, 255, 255, 255 )
blurTex:SetMaterialFloat( "$blur", 3 )
render.UpdateScreenEffectTexture()
surface.SetMaterial(blurTex)
surface.DrawTexturedRect( 0, 0, ScrW(), ScrH() )
[/lua]
Then just draw your menu over it. I think this should work, didn't fully test it though.
EDIT: Actually never mind. You can just use self:SetBackgroundBlur(true)
EDIT2: Didnt fully read your post so I didnt see you werent using derma. So then my bit of code should work.
[QUOTE=S W;34719467]
EDIT2: Didnt fully read your post so I didnt see you werent using derma. So then my bit of code should work.[/QUOTE]
Or, you could do it my way and you don't have to use any of that... :P
[QUOTE=InfernalCookie;34719677]Or, you could do it my way and you don't have to use any of that... :P[/QUOTE]
But that is a horrible way of doing it.
[QUOTE=Thermadyle;34726895]But that is a horrible way of doing it.[/QUOTE]
They're basically the same exact thing.. What I said earlier was after I made a glance at his post, so don't mind what I said
[QUOTE=InfernalCookie;34731447]They're basically the same exact thing.. What I said earlier was after I made a glance at his post, so don't mind what I said[/QUOTE]
He's rights, you are wrong.
Honestly when it comes to using rendering operation for EVERY panel you need to stay efficient.
[QUOTE=S W;34719467][lua]
local blurTex = Material( "pp/blurscreen" )
surface.SetMaterial( blurTex )
surface.SetDrawColor( 255, 255, 255, 255 )
blurTex:SetMaterialFloat( "$blur", 3 )
render.UpdateScreenEffectTexture()
surface.SetMaterial(blurTex)
surface.DrawTexturedRect( 0, 0, ScrW(), ScrH() )
[/lua]
Then just draw your menu over it. I think this should work, didn't fully test it though.
EDIT: Actually never mind. You can just use self:SetBackgroundBlur(true)
EDIT2: Didnt fully read your post so I didnt see you werent using derma. So then my bit of code should work.[/QUOTE]
I ended up using this way. then I added my own little blur in effect to it. Thanks :3
no problem. Glad it worked well for you.
Sorry, you need to Log In to post a reply to this thread.