Fixed menu loading system bugs

master
AlmTech 5 years ago
parent e4bda2189b
commit 79af991250
  1. 2
      gamemode/engine/derma/cl_menu.lua
  2. 5
      gamemode/engine/derma/menus/menu_character.lua

@ -7,6 +7,6 @@
net.Receive( "quantum_menu_net", function( len, pl ) net.Receive( "quantum_menu_net", function( len, pl )
local dt = net.ReadTable() 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 ) menu.open( dt )
end) end)

@ -13,13 +13,14 @@ function menu.open( dt )
local f = vgui.Create( "DFrame" ) local f = vgui.Create( "DFrame" )
f:SetTitle( "Character Menu" ) f:SetTitle( "Character Menu" )
f:SetSize( sw, sh ) f:SetSize( sw, sh )
f:MakePopup()
local txt = vgui.Create( "DTextEntry" ) local txt = vgui.Create( "DTextEntry", f )
txt:SetText( "Enter name here" ) txt:SetText( "Enter name here" )
txt:SizeToContents() txt:SizeToContents()
txt:SetPos( 100, 100 ) txt:SetPos( 100, 100 )
local b = vgui.Create( "DButton" ) local b = vgui.Create( "DButton", f )
b:SetText( "Create Char" ) b:SetText( "Create Char" )
b:SizeToContents() b:SizeToContents()
b.DoClick = function() b.DoClick = function()

Loading…
Cancel
Save