Derma Lua issue

First off no errors were given so this isn’t an error problem and the menu works fine.
I’m trying to achieve this to be somewhat of a close able window which doesn’t affect the game play.
One issue I’m having is allowing the player to freely move around while the menu is up.
Here is the code I’m using in my client side file. <---- Basically what I’m attempting to make

function xRes(num)
local SCREEN_W = 1600

return num * (ScrW() / SCREEN_W)

function yRes(num)
local SCREEN_H = 900

return num * (ScrH() / SCREEN_H)

surface.CreateFont(“PRO_TEXT”, {
font = “Arial”,
size = 13,
weight = 500,
blursize = 0,
scanlines = 0,
antialias = true,
underline = false,
italic = false,
strikeout = false,
symbol = false,
rotary = false,
shadow = false,
additive = false,
outline = false,

– Net Library Receive
net.Receive(“NetServer”, function ()
local base = vgui.Create(“DFrame”)
base:SetSize (xRes(1600), yRes(45))
base:SetTitle(" ")
base:SetMouseInputEnabled(false) <— I’m attempting to use this to allow players to move around while the menu is up, however it seems like this code is doing nothing at all.

	base.Paint = function()
		draw.RoundedBox(0, 0, 0, base:GetWide(), base:GetTall(), Color(0, 192, 255))
    	draw.SimpleText("Herro", "Trebuchet24", xRes(800), yRes(22.5), Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)

local button = vgui.Create("DButton")
	button:SetParent( base )
	button:SetPos(xRes(1550), yRes(6))
	button:SetSize(xRes(20), yRes(25))
	button:SetTextColor(Color(0, 192, 255))
	button.DoClick = function() 
	button.Paint = function()
		draw.RoundedBox(0, 0, 0, button:GetWide(), button:GetTall(), Color(255, 255, 255))


also if anyone knows how I can do any of the following that would be great!

  1. What function I would need for ( button.DoClick ) to open another frame while closing the previous frame. Example: I have local base = vgui.Create(“DFrame”) when I click a button it will close this Dframe and open another Dframe Example: local New = vgui.Create(“DFrame”).

  2. Make a blur effect as an overlay behind my Dframe. I have some concept art on kind of what I’m going for.

  3. Where to put FastDL. <---- Big One I want to use a custom font but I’m not sure where to put FastDL info.


For future reference, please wrap your code in

 tags. Just cleans things up a little bit.

To make the windows be on screen with mouse movement, just remove the MakePopup function.

1. Just make a new derma when you use the DoClick

2. you will need to ask someone else about rhe blue, but if you want transparent, you can turn the alpha down a bit (fourth number)

3. Depends on how you are using fastdl. is it tcadmin or separatley hosted?

I mean as a addon reference, I want to make it so if people run this addon that I’m making it will auto donwload it so no extra FastDL is required.

[editline]25th February 2015[/editline]

Also by removing the MakePopup() It removes my ability to close it using a button.

Remove base:MakePopup() as it forces the menu on the user which makes the mouse pop up.

by removing the MakePopup() It removes my ability to close it using a button.

Same thing with my QuInt team pick screen. And that time I tried to enable keyboard interaction. So I haven’t put any argument in “SetKeyboardInputEnabled” and all gonna work (strange, yeah?).
Try to do not put argument to “SetMouseInputEnabled”.

You can press tab or if you’re still in sandbox press C to enable your pointer and click on the cross. You can’t use MakePopup() without it setting SetMouseInputEnabled and SetKeyboardEnabled by default (at least I don’t think you can).

Ik, but I mean pressing the button does nothing.