fork/m-overlay
git clone https://git.julia.blue/fork/m-overlay
be5d99b
settings-overhaul
1local PANEL =class . create ( "Panel" , "BasePanel" ) 2 3PANEL : ACCESSOR ( "Enabled" , "m_bEnabled" , true ) 4PANEL : ACCESSOR ( "BorderColor" , "m_cBorderColor" ) 5PANEL : ACCESSOR ( "BackgroundColor" , "m_cBackgroundColor" ) 6PANEL : ACCESSOR ( "BGColor" , "m_cBackgroundColor" ) 7PANEL : ACCESSOR ( "TooltipTitle" , "m_strTooltipTitle" ) 8PANEL : ACCESSOR ( "TooltipBody" , "m_strTooltipBody" ) 9PANEL : ACCESSOR ( "DrawPanel" , "m_bDrawPanel" , true ) 10 11function PANEL : Panel () 12self : super () -- Initialize our baseclass 13gui . skinHook ( "Init" , "Panel" , self ) 14end 15 16function PANEL : Paint ( w , h ) 17if self . m_bDrawPanel then 18gui . skinHook ( "Paint" , "Panel" , self , w , h ) 19end 20end 21 22function PANEL : PaintOverlay ( w , h ) 23if self . m_bDrawPanel then 24gui . skinHook ( "PaintOverlay" , "Panel" , self , w , h ) 25end 26end 27 28function PANEL : PostPaint ( w , h ) 29if not self : IsEnabled () then 30graphics . setColor ( color ( 0 , 0 , 0 , 100 )) 31graphics . rectangle ( "fill" , 0 , 0 , w , h ) 32end 33end 34 35function PANEL : OnQuertyTooltip () 36if self . m_strTooltipTitle and self . m_strTooltipBody then 37gui . setTooltip ( self . m_strTooltipTitle , self . m_strTooltipBody ) 38return true 39end 40end