I made a few Derma Menus - When they are opened the Q menu also opens How can I stop this?

I have been working on my Derma skills, and have created a few menus that I can open with F1-4 , whenever I open them it opens up every gui panel it can.

Usually the Q menu ( prop spawn menu ) opens, its getting annoying I have searched the wikis and I couldn’t find out how to stop this from happening.

posted my code

Post your code

Yeah, we can’t help if you don’t post the code :stuck_out_tongue_winking_eye:

Make the derive gamemode base?

My code is not a gamemode, it is just hooked.

here is an example.

the problem is the Q menu ( or other derma menus ) also get poped up when I press F1



function MyMenu( ply ) --Start the function
    umsg.Start( "MyMenu", ply ) --Send the contents of "MyMenu" to the client
    umsg.End()
end --End the function
hook.Add("ShowHelp", "MyHook", MyMenu) --Add the hook "ShowHelp" so it opens with F1




local function MyMenu()

local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 550,500 )
DermaPanel:SetSize( 350, 350 )
DermaPanel:SetTitle( "Weapons Supply" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
DermaPanel:MoveToFront()
 
DermaList = vgui.Create( "DPanelList", DermaPanel )
DermaList:SetPos( 25,25 )
DermaList:SetSize( 450, 450 )
DermaList:SetSpacing( 5 ) -- Spacing between items
DermaList:EnableHorizontal( false ) -- Only vertical items
DermaList:EnableVerticalScrollbar( true ) -- Allow scrollbar if you exceed the Y axis
 
 DermaList2 = vgui.Create( "DPanelList", DermaPanel )
DermaList2:SetPos( 25,25 )
DermaList2:SetSize( 450, 450 )
DermaList2:SetSpacing( 5 ) -- Spacing between items
DermaList2:EnableHorizontal( false ) -- Only vertical items
DermaList2:EnableVerticalScrollbar( true ) -- Allow scrollbar if you exceed the Y axis
 
 local PropertySheet = vgui.Create( "DPropertySheet", DermaPanel )
PropertySheet:SetPos( 5, 30 )
PropertySheet:SetSize( 340, 315 )
 
PropertySheet:AddSheet( "Weapons", DermaList, "gui/silkicons/user", 
false, false, "All weapons cost money." )
PropertySheet:AddSheet( "Armor and other Gear", DermaList2, "gui/silkicons/group", 
false, false, "Armor and other gear costs money as well." )
 
local itemtab = {}
itemtab[1] = "Tec9 Machine Gun $400"


for k, v in pairs(itemtab) do

	local CategoryContentSeven = vgui.Create( "DButton" )
    CategoryContentSeven:SetSize( 150, 50 ) -- Keep the second number at 50
    CategoryContentSeven:SetText(v)
	CategoryContentSeven.DoClick = function ()
    RunConsoleCommand( "buygear", v ) -- What happens when you press the button
	end
	DermaList:AddItem( CategoryContentSeven ) -- Add the item above

end

local itemtab2 = {}
itemtab2[1] = "Armor $300"


for k, v in pairs(itemtab2) do

	local CategoryContentEight = vgui.Create( "DButton" )
    CategoryContentEight:SetSize( 150, 50 ) -- Keep the second number at 50
    CategoryContentEight:SetText(v)
	CategoryContentEight.DoClick = function ()
    RunConsoleCommand( "regeararmor", v ) -- What happens when you press the button
	end
	DermaList2:AddItem( CategoryContentEight ) -- Add the item above

end

end
usermessage.Hook("MyMenu", MyMenu)


any ideas why the menus would all pop up?

If you add a return true too the function in the hook it should work.

The reason you get this problems is that in sandbox GM:ShowHelp() opens the search window in the spawn menu. ( try not opening the q menu before hitting f1 and you’ll notice that nothing happens, but when you have loaded the q menu it will open, move to browse and select the search bar.)