From d62058fcdea5fc6736a2a373f47dc6c14c70c319 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Mon, 30 May 2016 21:01:18 -0400 Subject: Removed exessive whitespace so future commits will be cleaner --- gamemode/vgui/vgui_sidebutton.lua | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'gamemode/vgui/vgui_sidebutton.lua') diff --git a/gamemode/vgui/vgui_sidebutton.lua b/gamemode/vgui/vgui_sidebutton.lua index f7de0e6..03d4332 100644 --- a/gamemode/vgui/vgui_sidebutton.lua +++ b/gamemode/vgui/vgui_sidebutton.lua @@ -7,21 +7,21 @@ function PANEL:Init() //self:SetTitle( "" ) //self:ShowCloseButton( false ) //self:SetDraggable( false ) - + self.Image = vgui.Create( "DImageButton", self ) self.Image:SetImage( "icon16/car.png" ) self.Image:SetStretchToFit( false ) self.Image.DoClick = function() - + self:DoClick() - + end - + self:SetCursor( "hand" ) self.Text = "" self.White = 255 self.ColorTime = 0 - + end function PANEL:SetImage( img ) @@ -43,7 +43,7 @@ function PANEL:DoClick() end -function PANEL:SetFunction( func ) +function PANEL:SetFunction( func ) self.Func = func @@ -52,9 +52,9 @@ end function PANEL:SetSelectedState( bool, ignore ) self.Selected = tobool( bool ) - + if ignore then return end - + self:DoSound( bool ) end @@ -82,7 +82,7 @@ function PANEL:PerformLayout() self.Image:SetSize( imgsize, imgsize ) self.Image:SetPos( self:GetWide() - imgsize - self:GetPadding(), self:GetPadding() ) - + //self:SizeToContents() end @@ -94,36 +94,36 @@ function PANEL:Paint() local imgsize = self:GetTall() - ( 2 * self:GetPadding() ) draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 180 ) ) - + if self.Hovered then - + draw.RoundedBox( 4, self:GetWide() - imgsize - self:GetPadding(), self:GetPadding(), imgsize, imgsize, Color( 100, 100, 100, 100 ) ) - + draw.SimpleText( self.Text, "CategoryButton", tx+1, ty+1, Color( 0, 0, 0, 150 ), TEXT_ALIGN_LEFT ) draw.SimpleText( self.Text, "CategoryButton", tx-1, ty-1, Color( 0, 0, 0, 150 ), TEXT_ALIGN_LEFT ) draw.SimpleText( self.Text, "CategoryButton", tx+1, ty-1, Color( 0, 0, 0, 150 ), TEXT_ALIGN_LEFT ) draw.SimpleText( self.Text, "CategoryButton", tx-1, ty+1, Color( 0, 0, 0, 150 ), TEXT_ALIGN_LEFT ) - + if self.ColorTime < CurTime() then - + self.ColorTime = CurTime() + math.Rand( 0, 0.3 ) self.White = math.random( 150, 255 ) - + end - + draw.SimpleText( self.Text, "CategoryButton", tx, ty, Color( self.White, self.White, self.White, 255 ), TEXT_ALIGN_LEFT ) - + else draw.RoundedBox( 4, self:GetWide() - imgsize - self:GetPadding(), self:GetPadding(), imgsize, imgsize, Color( 100, 100, 100, 100 ) ) - + draw.SimpleText( self.Text, "CategoryButton", tx+1, ty+1, Color( 0, 0, 0, 150 ), TEXT_ALIGN_LEFT ) draw.SimpleText( self.Text, "CategoryButton", tx-1, ty-1, Color( 0, 0, 0, 150 ), TEXT_ALIGN_LEFT ) draw.SimpleText( self.Text, "CategoryButton", tx+1, ty-1, Color( 0, 0, 0, 150 ), TEXT_ALIGN_LEFT ) draw.SimpleText( self.Text, "CategoryButton", tx-1, ty+1, Color( 0, 0, 0, 150 ), TEXT_ALIGN_LEFT ) - + draw.SimpleText( self.Text, "CategoryButton", tx, ty, Color( 100, 100, 100, 255 ), TEXT_ALIGN_LEFT ) - + end end -- cgit v1.2.3-70-g09d2