Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Cl apres Ent draw
- surface.CreateFont( "blackpearls_hardware_printermenu_font",{font = "Roboto",size = ScrH()*0.06,weight = 500,antialias = true})
- surface.CreateFont( "blackpearls_hardware_printermenu_font2",{font = "Roboto",size = ScrH()*0.035,weight = 500,antialias = true})
- -- DERMA --
- net.Receive("blackpearls:HardWare:PrinterMenu",function()
- local scrw, scrh, printer = ScrW(), ScrH(), net.ReadEntity()
- local hardWare_printer = vgui.Create( "DFrame" )
- hardWare_printer:SetSize( scrw*0.4, scrh*0.4 )
- hardWare_printer:Center()
- hardWare_printer:SetTitle( "" )
- hardWare_printer:SetDraggable( false )
- hardWare_printer:ShowCloseButton( false )
- hardWare_printer:MakePopup()
- hardWare_printer.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color(0, 0, 0, 200) )
- draw.RoundedBox( 0, 0, 0, w, scrh*0.07, Color(30, 30, 30, 245) )
- draw.SimpleText("Printer", "blackpearls_hardware_printermenu_font", w/2, scrh*0.032, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
- end
- local close = vgui.Create( "DButton", hardWare_printer )
- close:SetSize( scrw * 0.03, scrh * 0.03 )
- close:SetPos( scrw * 0.36, scrh * 0.01 )
- close:SetText("")
- close:SetTextColor(Color(255,255,255))
- close.Paint = function( self, w, h )
- draw.RoundedBox( 1, 0, 0, w, h, Color(60, 60, 60, 255) )
- draw.SimpleText("X", "blackpearls_hardware_printermenu_font2", w/2, h/2, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
- end
- function close:DoClick()
- hardWare_printer:Hide()
- end
- end )
- -- Init
- util.AddNetworkString("blackpearls:HardWare:PrinterMenu")
- function ENT:AcceptInput( _event, _a, _p )
- if (_event == "Use" && _p:IsPlayer()) then
- if not IsValid(_p) then return end
- net.Start("blackpearls:HardWare:PrinterMenu")
- net.WriteEntity(self)
- net.Send(_p)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement