From 79af9912508b31f35859f43bbebd073be8d37d8b Mon Sep 17 00:00:00 2001 From: AlmTech Date: Thu, 19 Sep 2019 18:21:14 +0200 Subject: [PATCH] Fixed menu loading system bugs --- gamemode/engine/derma/cl_menu.lua | 2 +- gamemode/engine/derma/menus/menu_character.lua | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gamemode/engine/derma/cl_menu.lua b/gamemode/engine/derma/cl_menu.lua index 1f5e2b8..6e95709 100644 --- a/gamemode/engine/derma/cl_menu.lua +++ b/gamemode/engine/derma/cl_menu.lua @@ -7,6 +7,6 @@ net.Receive( "quantum_menu_net", function( len, pl ) local dt = net.ReadTable() - local menu = include( "menus/menu_" .. dt.id .. ".lua" ) + local menu = include( GAMEMODE.FolderName .. "/gamemode/engine/derma/menus/menu_" .. dt.id .. ".lua" ) menu.open( dt ) end) \ No newline at end of file diff --git a/gamemode/engine/derma/menus/menu_character.lua b/gamemode/engine/derma/menus/menu_character.lua index e8c8335..a195c5c 100644 --- a/gamemode/engine/derma/menus/menu_character.lua +++ b/gamemode/engine/derma/menus/menu_character.lua @@ -13,13 +13,14 @@ function menu.open( dt ) local f = vgui.Create( "DFrame" ) f:SetTitle( "Character Menu" ) f:SetSize( sw, sh ) + f:MakePopup() - local txt = vgui.Create( "DTextEntry" ) + local txt = vgui.Create( "DTextEntry", f ) txt:SetText( "Enter name here" ) txt:SizeToContents() txt:SetPos( 100, 100 ) - local b = vgui.Create( "DButton" ) + local b = vgui.Create( "DButton", f ) b:SetText( "Create Char" ) b:SizeToContents() b.DoClick = function()