Advertisement
Guest User

Untitled

a guest
Apr 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. --------------------
  2. // Buttons
  3. --------------------
  4.  
  5. --{ Close Button }--
  6.  
  7. local MapCloseButton = vgui.Create( "DButton", MapFrame )
  8. MapCloseButton:SetText( "" )
  9. MapCloseButton:SetSize( 100, 30 )
  10. MapCloseButton:SetPos( 1, 1 )
  11. MapCloseButton.Paint = function( self )
  12.  
  13. --{ Hover }--
  14.  
  15. if self:IsHovered() then
  16. surface.SetDrawColor( 255, 255, 255, 255 )
  17. surface.DrawRect( 0, 0, 100, 30 )
  18. else
  19. surface.SetDrawColor( 255, 0, 0, 255 )
  20. surface.DrawRect( 0, 0, 100, 30 )
  21. end
  22.  
  23. end
  24. MapCloseButton.DoClick = function()
  25. MapFrame:Close()
  26. surface.PlaySound( "exit.mp3" )
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement