Can someone tell me if its possible to add derma panels to a PS tab? if so would it go in the __category.lua? or would i make the panel in an item.lua?
What do you want to add the panels for ?
Just [url="https://github.com/adamdburton/pointshop/blob/master/lua/sh_pointshop.lua#L65"]added a callback function[/url] for categories to modify their tab.
Here's a quick example that would go in a __category.lua file:
[lua]
function CATEGORY:ModifyTab(tab)
local button = vgui.Create('DButton', tab)
button:SetText('Click me!')
button:Dock(BOTTOM)
button.DoClick = function()
Derma_Message('You clicked the button!', 'CLICKED', 'OK')
end
end
[/lua]
[QUOTE=adamdburton;43485031]Just [url="https://github.com/adamdburton/pointshop/blob/master/lua/sh_pointshop.lua#L65"]added a callback function[/url] for categories to modify their tab.
Here's a quick example that would go in a __category.lua file:
[lua]
function CATEGORY:ModifyTab(tab)
local button = vgui.Create('DButton', tab)
button:SetText('Click me!')
button:Dock(BOTTOM)
button.DoClick = function()
Derma_Message('You clicked the button!', 'CLICKED', 'OK')
end
end
[/lua][/QUOTE]
I added the little bit to my sh_pointshop.lua and copied what you posted and stuck it in a new __category.lua, and nothing happened. I should probably say that i am using a custom ps skin from CH but whether that matters or not im not sure
Ok so as it turn out its not immediately compatible with my skin, but thanks anyway :)
[QUOTE=_Jacob;43492668]I added the little bit to my sh_pointshop.lua and copied what you posted and stuck it in a new __category.lua, and nothing happened. I should probably say that i am using a custom ps skin from CH but whether that matters or not im not sure
Ok so as it turn out its not immediately compatible with my skin, but thanks anyway :)[/QUOTE]
Update your PointShop.
Sorry, you need to Log In to post a reply to this thread.