Hi all,
So on DarkRP 2.5 there is a demo module of a custom tab. I tried to make a new tab by making a new DPanel and it doesn't seem to show up.
I use
[CODE]
local DPanel1 = vgui.Create('DPanel')
[/CODE]
to make the panel then once I have parented and positioned all the other DLabels etc. I do this:
[CODE]
DarkRP.addF4MenuTab(tabName, DPanel1)
[/CODE]
This should add the f4 tab ( btw tabName is a local variable which I set in the beginning of the code )
Then at the end the hook is:
[CODE]
hook.Add("F4MenuTabs", "InventoryTab", InventoryTab)
[/CODE]
I have no idea why it is not adding it.
Also the default tab module when enabled works perfectly fine
Thanks,
Computer600
local DPanel1 = vgui.Create('DPanel')
to
local DPanel1 = vgui.Create('DermaPanel')
and if that don't work
local DPanel1 = vgui.Create('DFrame')
See if that works if not i'll dig into my code
[QUOTE=psvgerrad;43112164]local DPanel1 = vgui.Create('DPanel')
to
local DPanel1 = vgui.Create('DermaPanel')
and if that don't work
local DPanel1 = vgui.Create('DFrame')
See if that works if not i'll dig into my code[/QUOTE]
Thanks, but none of them work
Does the tab not show up at all or does its contents not show?
[CODE]local tabName = "Inventory"
local function Inventory()
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 80,50 )
DermaPanel:SetSize( 200, 130 )
DermaPanel:SetTitle( "Inventory" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( false )
DermaPanel:ShowCloseButton( false )
DarkRP.addF4MenuTab(tabName, DermaPanel)
end
hook.Add("F4MenuTabs", "F4", Inventory)[/CODE]
[QUOTE=Bo98;43112506]Does the tab not show up at all or does its contents not show?[/QUOTE]
I can't see the tab (meaning I can't see the content as well), if I enable the example tab it works fine and I can see everything but my custom one doesn't even appear.
[editline]8th December 2013[/editline]
[QUOTE=psvgerrad;43112550][CODE]local tabName = "Inventory"
local function Inventory()
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 80,50 )
DermaPanel:SetSize( 200, 130 )
DermaPanel:SetTitle( "Inventory" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( false )
DermaPanel:ShowCloseButton( false )
DarkRP.addF4MenuTab(tabName, DermaPanel)
end
hook.Add("F4MenuTabs", "F4", Inventory)[/CODE][/QUOTE]
Cheers this works fine :D
Sorry, you need to Log In to post a reply to this thread.