fork/m-overlay

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

BkacjiosBugfixes + Dark Mode skina8034e9

v2.1.1
700 B34 linesraw
1local PANEL = class.create("Button", "Label")
2
3PANEL:ACCESSOR("PressedColor", "m_cPressedColor")
4PANEL:ACCESSOR("HoveredColor", "m_cHoveredColor")
5PANEL:ACCESSOR("DrawButton", "m_bDrawButton", true)
6
7function PANEL:Button()
8	-- Initialize our baseclass
9	self:super()
10
11	self:SetFocusable(true)
12
13	self:SetTextAlignmentX("center")
14	self:SetText("Button")
15end
16
17function PANEL:Skin()
18	self:super("Skin")
19	gui.skinHook("Init", "Button", self)
20end
21
22function PANEL:PrePaint(w, h)
23	if self.m_bDrawButton then
24		gui.skinHook("Paint", "Button", self, w, h)
25	end
26end
27
28function PANEL:Paint(w, h)
29	self:PaintLabel(w, h)
30end
31
32function PANEL:PaintOverlay(w, h)
33	gui.skinHook("PaintOverlay", "Button", self, w, h)
34end