Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local iFadeSpeed=10
- btn_easy.Paint = function(self, w, h)
- self.lCol=self.lCol or Color(255, 255, 255, 255)
- draw.RoundedBox( 0, 0, 0, 100, 100, Color( 10, 10, 10, 255 ) )
- surface.SetMaterial( Material("droo/white.png") )
- surface.SetDrawColor( Color( 150, 255, 150, 255 ) )
- surface.DrawPoly( easyverts )
- draw.SimpleText( "Easy", "font4", 46, 30, self.lCol, TEXT_ALIGN_CENTER )
- if isHovering1 == true then
- self.lCol.r=Lerp(FrameTime()*iFadeSpeed, self.lCol.r, 150)
- //self.lCol.g=Lerp(FrameTime()*iFadeSpeed, self.lCol.g, 255) // Uncomment this if you want to change the G value
- self.lCol.b=self.lCol.r // optimization - no point calculating it twice if they're the same
- draw.SimpleText( "Easy", "font4", 46, 30, self.lCol, TEXT_ALIGN_CENTER )
- else
- self.lCol.r=Lerp(FrameTime()*iFadeSpeed, self.lCol.r, 255)
- //self.lCol.g=Lerp(FrameTime()*iFadeSpeed, self.lCol.g, 255) // Uncomment this if you want to change the G value
- self.lCol.b=self.lCol.r
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment