Need Help on Stranded Tools Menu UI

I’m trying to modify Gmod Stranded for my server and I want to fix the ugly UI for the Q-Menu/spawn menu. The tool list is really deep black and the category names of the tools (construction, render, those things that you click to collapse and expand the tools) are the same color as the tools which makes it hard to browse the tool menu. How can I identify the category of the tools list and colour it differently? That’s my main top priority.



/*---------------------------------------------------------
  DTool Menu
---------------------------------------------------------*/
local PANEL = {}

function PANEL:Init()
    self.Label = vgui.Create( "DLabel", self )
    self.Label:SetText( "Tool Menu" )
    self.Label:SetTextColor( Color( 255, 255, 255, 255 ) )
    self.Label:SizeToContents( )
    
    CategoryList = vgui.Create( "DPanelList", self)
    CategoryList:SetPos( 25,25 )
    CategoryList:SetSize(ScrW() / 2 - 62, ScrH() - 104)
    CategoryList:SetSpacing( 5 )
    CategoryList:SetPadding( 0 )
    CategoryList:EnableHorizontal( true )
    CategoryList:EnableVerticalScrollbar( false )
    
    self.Tools = vgui.Create( "DPanelList" )
    CategoryList:AddItem( self.Tools )    
    self.Tools:EnableVerticalScrollbar( true )
    self.Tools:SetSize( CategoryList:GetWide()*.33, CategoryList:GetTall() )
    self.Tools:SetPos( 0, 0 )
    self.Tools:SetAutoSize( false )
    self.Tools:SetSpacing( 0 )
    self.Tools:SetPadding( 0 )

    self.ContextPanel = vgui.Create( "DPanelList" )
    CategoryList:AddItem( self.ContextPanel )    
    self.ContextPanel:SetSize( CategoryList:GetWide()*.66, CategoryList:GetTall() )
    self.ContextPanel:EnableVerticalScrollbar( false )
    self.ContextPanel:SetSpacing( 0 )
    self.ContextPanel:SetPadding( 5 )
  
    if ToolsLoad == false || ToolsLoad == nil || ToolsLoad == NULL || ToolsLoad == "" then
        AllTools = spawnmenu.GetTools()
        Msg("-==Tool Tables loaded successfully==-
")
        local ToolsLoad = true
    end

    local ToolTables = AllTools

    if ToolTables then
        for k, v in pairs( ToolTables[1].Items ) do 
            if ( type( v ) == "table" ) then      
                local Name = v.ItemName 
                local Label = v.Text 
                v.ItemName = nil 
                v.Text = nil 
                self:AddCategory( Name, Label, v ) 
            end
        end
    else
        LocalPlayer():ChatPrint( "ERROR: Tools List could not be loaded." )
    end

end

function PANEL:AddCategory( Name, Label, ToolItems )
    
    self.Category = vgui.Create( "DCollapsibleCategory" ) 
    self.Tools:AddItem( self.Category )
     self.Category:SetLabel( Label ) 
     self.Category:SetCookieName( "ToolMenu."..tostring(Name) ) 
      
     self.CategoryContent = vgui.Create( "DPanelList" ) 
     self.CategoryContent:SetAutoSize( true ) 
     self.CategoryContent:SetDrawBackground( false ) 
     self.CategoryContent:SetSpacing( 0 ) 
     self.CategoryContent:SetPadding( 0 ) 
     self.Category:SetContents( self.CategoryContent ) 
          
    local bAlt = true
     
     for k, v in pairs( ToolItems ) do 
        local prohibit = nil
        for p, q in pairs ( GMS.ProhibitedStools ) do
            if q == v.ItemName then
                prohibit = true
            end
        end
        
        if prohibit != true then
        
        local Item = vgui.Create( "ToolMenuButton", self ) 
        Item:SetText( v.Text ) 
        Item.OnSelect = function( button ) self:EnableControlPanel( button ) end 
        concommand.Add( Format( "tool_%s", v.ItemName ), function() Item:OnSelect() end ) 
        
        if ( v.SwitchConVar ) then 
            Item:AddCheckBox( v.SwitchConVar ) 
        end 

        Item.ControlPanelBuildFunction = v.CPanelFunction 
        Item.Command = v.Command 
        Item.Name = v.ItemName 
        Item.Controls = v.Controls 
        Item.Text = v.Text 

        Item:SetAlt( bAlt ) 
        bAlt = !bAlt 

        self.CategoryContent:AddItem( Item ) 
        end
     end
end


[editline]05:09PM[/editline]

Alright, how about spacing the CollapsibleCategories? How do I do that?

[editline]05:17PM[/editline]

Nvm, I managed to do this myself.