Summary
Methods
Init()client
Builds the trade menu with a sells tab and a buys tab for whichever lists the salesman has.
PerformLayout(w, h)client
Stretches the property sheet to fill the frame.
Rebuild()client
Refills the sells and buys tabs from
cw.salesmenu.Refills one tab of the trade menu with item icons grouped by category.
Think()client
Keeps the trade menu centred at half the screen width and three quarters of its height.
Methods
Builds the trade menu with a sells tab and a buys tab for whichever lists the salesman has.
Closing the frame sends SalesmanDone to the server and clears cw.salesmenu.
PANEL:PerformLayout(w, h)
client gamemodes/catwork/plugins/salesmen/plugin/derma/cl_salesmenu.lua:232Stretches the property sheet to fill the frame.
Parameters
- w
- h
Refills the sells and buys tabs from cw.salesmenu.
PANEL:RebuildPanel(typeName, panelList, inventory)
client gamemodes/catwork/plugins/salesmen/plugin/derma/cl_salesmenu.lua:89Refills one tab of the trade menu with item icons grouped by category.
The sells tab lists the salesman's items; the buys tab lists the matching items in the local player's inventory. Both are sorted by cost, most expensive first, and the salesman's cash is shown when it is limited.
Parameters
- typeName String Which tab this is:
'Sells'or'Buys' - panelList Panel The
cwPanelListof the tab - inventory Map The salesman's sells or buys list, keyed by item unique ID
Keeps the trade menu centred at half the screen width and three quarters of its height.