Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- surface.CreateFont("Title", {
- font = "Arial",
- extended = true,
- size = 20
- })
- local selected = Color(255,255,255)
- local Frame = vgui.Create("DFrame")
- Frame:SetSize(400,300) -- Good size for example
- Frame:Center()
- Frame:SetTitle("")
- Frame.title = "ChatBubbles color"
- Frame:MakePopup()
- Frame.Paint = function(self, w, h)
- cur = CurTime()
- for i=1,100 do
- draw.Box(w/2+math.cos(i*55+cur*i/305)*w/2,h/2+math.sin(i*55+cur*i/105)*h/2,10,10,selected )
- end
- draw.RoundedBox(2, 0, 0, w, h, Color(0, 0, 0, 200))
- draw.RoundedBox(2, 0, 0, w, 25, Color(0, 0, 0, 255))
- draw.SimpleText(self.title, "Title", w/2, 5, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP)
- end
- local Mixer = vgui.Create("DColorMixer", Frame)
- Mixer:Dock(FILL)
- Mixer:SetPalette(true)
- Mixer:SetAlphaBar(false)
- Mixer:SetWangs(false)
- Mixer:SetColor(selected)
- Mixer.ValueChanged = function (col)
- selected = Mixer:GetColor()
- chatbubbles["settings"]["colors"]["background"]["r"] = selected.r
- chatbubbles["settings"]["colors"]["background"]["g"] = selected.g
- chatbubbles["settings"]["colors"]["background"]["b"] = selected.b
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement