Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local PANEL = {}
- function PANEL:Init()
- self:SetTextColor(color_white)
- self:SetSortItems(false)
- end
- function PANEL:Paint(intW, intH)
- surface.SetDrawColor(ADDON.Colors.Primary)
- surface.DrawRect(0, 0, intW, intH)
- surface.SetDrawColor(ADDON.Colors.Outline)
- surface.DrawOutlinedRect(0, 0, intW, intH)
- end
- function PANEL:DoClick()
- if self:IsMenuOpen() then
- return self:CloseMenu()
- end
- self:OpenMenu()
- for k, v in pairs(self.Menu:GetCanvas():GetChildren()) do
- v:SetTextColor(color_white)
- v:SetFont("ADDON:R15")
- function v:Paint(w, h)
- surface.SetDrawColor(ADDON.Colors.Outline)
- surface.DrawOutlinedRect(0, -1, w, h + 1)
- if self:IsHovered() then
- surface.SetDrawColor(ADDON.Colors.Blue)
- surface.DrawRect(1, 1, w - 2, h - 2)
- end
- end
- end
- function self.Menu:Paint(intW, intH)
- surface.SetDrawColor(ADDON.Colors.Primary)
- surface.DrawRect(0, 0, intW, intH)
- surface.SetDrawColor(ADDON.Colors.Outline)
- surface.DrawRect(0, 0, intW, 1)
- end
- end
- vgui.Register("ADDON:DComboBox", PANEL, "DComboBox")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement