Merge pull request #205 from arthurgeron/master
Fixed inventory only showing limited number of items
This commit is contained in:
commit
5457f44c16
1 changed files with 9 additions and 4 deletions
|
@ -352,13 +352,18 @@ function GM:OpenInventory()
|
||||||
topspace:AlignTop(8)
|
topspace:AlignTop(8)
|
||||||
topspace:CenterHorizontal()
|
topspace:CenterHorizontal()
|
||||||
|
|
||||||
local invgrid = vgui.Create("DGrid", frame)
|
local invListPanel = vgui.Create("DScrollPanel", frame)
|
||||||
invgrid:SetSize(wid - 16 * screenscale, frame:GetTall() - 8 - topspace:GetTall())
|
invListPanel:Dock( FILL )
|
||||||
invgrid:MoveBelow(topspace, 16)
|
local sbar = invListPanel:GetVBar()
|
||||||
|
sbar.Enabled = true
|
||||||
|
invListPanel:DockMargin(0, topspace:GetTall() + 8, 0, 0)
|
||||||
|
invListPanel:InvalidateParent(true)
|
||||||
|
|
||||||
|
local invgrid = vgui.Create("DGrid", invListPanel)
|
||||||
|
invgrid:SetSize(invListPanel:GetWide() - sbar:GetWide(), invListPanel:GetTall())
|
||||||
invgrid:SetCols(5)
|
invgrid:SetCols(5)
|
||||||
invgrid:SetColWide((70 + (invgrid:GetWide() - 70*5) / 4) * screenscale)
|
invgrid:SetColWide((70 + (invgrid:GetWide() - 70*5) / 4) * screenscale)
|
||||||
invgrid:SetRowHeight(70 * screenscale)
|
invgrid:SetRowHeight(70 * screenscale)
|
||||||
invgrid:CenterHorizontal()
|
|
||||||
frame.Grid = invgrid
|
frame.Grid = invgrid
|
||||||
|
|
||||||
for item, count in pairs(self.ZSInventory) do
|
for item, count in pairs(self.ZSInventory) do
|
||||||
|
|
Loading…
Reference in a new issue