Summary
Methods
Init()client
Builds the salesman editor: the sells, buys, items and settings tabs, filled from
cw.salesman.PerformLayout(w, h)client
Stretches the property sheet to fill the frame.
Rebuild()client
Refills the sells, buys and items tabs from
cw.salesman.Refills one tab of the editor with item icons grouped by category and sorted by cost.
Think()client
Keeps the editor centred and copies the settings and response fields back into
cw.salesman.Methods
Builds the salesman editor: the sells, buys, items and settings tabs, filled from cw.salesman.
Closing the frame sends the edited salesman to the server with the SalesmanAdd Cable message.
PANEL:PerformLayout(w, h)
client gamemodes/catwork/plugins/salesmen/plugin/derma/cl_salesman.lua:393Stretches the property sheet to fill the frame.
Parameters
- w
- h
Refills the sells, buys and items tabs from cw.salesman.
PANEL:RebuildPanel(panelList, typeName, inventory)
client gamemodes/catwork/plugins/salesmen/plugin/derma/cl_salesman.lua:266Refills one tab of the editor with item icons grouped by category and sorted by cost.
Parameters
- panelList Panel The
cwPanelListof the tab - typeName String Which tab this is:
'Sells','Buys'or'Items' - inventory Map The items to show, keyed by item unique ID
Keeps the editor centred and copies the settings and response fields back into cw.salesman.