fork/m-overlay

git clone https://git.julia.blue/fork/m-overlay

BkacjiosBugfixes + Dark Mode skina8034e9

v2.1.1b
724 B36 linesraw
1local PANEL = class.create("ButtonIcon", "Button")
2
3function PANEL:ButtonIcon()
4	-- Initialize our baseclass
5	self:super()
6
7	self:SetFocusable(true)
8
9	self.m_pIcon = self:Add("Image")
10	self.m_pIcon:Dock(DOCK_LEFT)
11	self.m_pIcon:SetSize(16, 16)
12	self.m_pIcon:SetFocusable(false)
13	self:InheritMethods(self.m_pIcon)
14
15	self:TextMargin(28, 0, 0, 0)
16	self:SetTextAlignmentX("left")
17end
18
19function PANEL:Skin()
20	self:super("Skin")
21	gui.skinHook("Init", "Button", self)
22end
23
24function PANEL:PrePaint(w, h)
25	if self.m_bDrawButton then
26		gui.skinHook("Paint", "Button", self, w, h)
27	end
28end
29
30function PANEL:Paint(w, h)
31	self:PaintLabel(w, h)
32end
33
34function PANEL:PaintOverlay(w, h)
35	gui.skinHook("PaintOverlay", "Button", self, w, h)
36end