fork/m-overlay
git clone https://git.julia.blue/fork/m-overlay
a8034e9
v2.1.4
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 9self : super () 10 11self : SetFocusable ( true ) 12 13self : SetTextAlignmentX ( "center" ) 14self : SetText ( "Button" ) 15end 16 17function PANEL : Skin () 18self : super ( "Skin" ) 19gui . skinHook ( "Init" , "Button" , self ) 20end 21 22function PANEL : PrePaint ( w , h ) 23if self . m_bDrawButton then 24gui . skinHook ( "Paint" , "Button" , self , w , h ) 25end 26end 27 28function PANEL : Paint ( w , h ) 29self : PaintLabel ( w , h ) 30end 31 32function PANEL : PaintOverlay ( w , h ) 33gui . skinHook ( "PaintOverlay" , "Button" , self , w , h ) 34end