new post | browse code | authors | help | about

LuaBin 2.0

Viewing file root / lua / menu / logo.lua

  1.  
  2. local PANEL = {}
  3. local Logo = Material( "console/gmod_logo" )
  4.  
  5. /*---------------------------------------------------------
  6.  
  7. ---------------------------------------------------------*/
  8. function PANEL:Init()
  9.  
  10.         self:SetMouseInputEnabled( false )
  11.         self:SetKeyboardInputEnabled( false )
  12.        
  13. end
  14.  
  15.  
  16. /*---------------------------------------------------------
  17.  
  18. ---------------------------------------------------------*/
  19. function PANEL:GetImage()
  20.  
  21.         return self.ImageName
  22.        
  23. end
  24.  
  25. /*---------------------------------------------------------
  26.  
  27. ---------------------------------------------------------*/
  28. function PANEL:Paint()
  29.  
  30.         surface.SetMaterial( Logo )
  31.         surface.SetDrawColor( 255, 255, 255, 255 )
  32.         surface.DrawTexturedRect( 0, 0, self:GetWide(), self:GetTall() )
  33.  
  34.         return true
  35.  
  36. end
  37.  
  38. /*---------------------------------------------------------
  39.  
  40. ---------------------------------------------------------*/
  41. function PANEL:PerformLayout()
  42.  
  43.         local w = (ScrH() / 4.0)
  44.         local h = w
  45.        
  46.         self:SetPos( ScrW() * 0.1, ScrH() * 0.05 )
  47.         self:SetSize( w, h )
  48.        
  49. end
  50.  
  51.  
  52.  
  53. vgui.Register( "PoopImage", PANEL )
  54.  
  55. // THIS LOGO IS DISABLED ON PURPOSE
  56. //local logo = vgui.Create( "PoopImage" )