diff options
Diffstat (limited to 'gamemode/client')
| -rw-r--r-- | gamemode/client/cl_inventory.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua index 30dd74c..815d0d9 100644 --- a/gamemode/client/cl_inventory.lua +++ b/gamemode/client/cl_inventory.lua @@ -21,6 +21,14 @@ local function createMenuFor(menu, tbl) end end +local function createTooltipTextFor(tbl) + local string = "" + for k,v in pairs(tbl) do + string = string .. (k .. " x" .. v .. "\n") + end + return string +end + local function createPanel() local frame = vgui.Create( "DFrame" ) frame:SetSize( invxsize, invysize ) @@ -59,10 +67,11 @@ local function createPanel() layout:Dock( FILL ) layout:MakeDroppable( "unique_name" ) -- Allows us to rearrange children for k,v in pairs(GMS.Combinations["Combinations"]) do - print("Combinator a " .. v.Name) + PrintTable(v) local combipanel = vgui.Create("DButton", layout) combipanel:SetSize(64,64) combipanel:SetText(v.Name) + combipanel:SetTooltip(createTooltipTextFor(v.Req)) combipanel.DoClick = function() print("I want to combine a " .. v.Name) LocalPlayer():ConCommand("gms_MakeCombination Combinations " .. v.Name) |
