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