Extended the clientsided menu API support

master
AlmTech 5 years ago
parent d3e49ad8e0
commit 483580c00a
  1. 6
      gamemode/engine/derma/cl_menu.lua
  2. 2
      gamemode/engine/derma/menus/menu_character.lua

@ -5,6 +5,12 @@
-- \ \ / ____ \| | | | | | | | __/ (__| | | | / /
-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/
Quantum.Client.Menu = {}
local libs = {
["net"] = GAMEMODE.FolderName .. "/gamemode/engine/derma/lib/cl_network.lua"
}
Quantum.Client.Menu.GetAPI = function( lib ) return include( libs[lib] ) end
net.Receive( "quantum_menu_net", function( len, pl )
local dt = net.ReadTable()
local menu = include( GAMEMODE.FolderName .. "/gamemode/engine/derma/menus/menu_" .. dt.id .. ".lua" )

@ -7,7 +7,7 @@
local menu = {}
local net = include( "../lib/cl_network.lua" )
local net = Quantum.Client.Menu.GetAPI( "net" )
function menu.open( dt )
local sw, sh = ScrW(), ScrH()

Loading…
Cancel
Save