Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // FONTS //
- surface.CreateFont( "Tohoma", {
- font = "Tohoma",
- size = 24
- })
- surface.CreateFont( "TohomaLarge", {
- font = "Tohoma",
- size = 40,
- weight = 600
- })
- surface.CreateFont( "TohomaMed", {
- font = "Tohoma",
- size = 26,
- weight = 600,
- antialias = true
- })
- surface.CreateFont( "TohomaBody", {
- font = "Tohoma",
- size = 16,
- weight = 400,
- antialias = true
- })
- surface.CreateFont( "MF4.ItemFont", {
- font = "Noasarck",
- size = 25,
- weight = 400,
- antialias = true
- })
- surface.CreateFont( "SubItemFont", {
- font = "Noasarck",
- size = 22,
- weight = 400,
- antialias = true
- })
- surface.CreateFont("BoldFont", {
- font = "Tahoma",
- size = 21,
- weight = 800,
- antialias = true
- })
- // TEXTURES //
- blank = surface.GetTextureID( "vgui/white" )
- gradleft = surface.GetTextureID( "vgui/gradient-r" )
- gradup = surface.GetTextureID( "vgui/gradient-d" )
- // CONFIG STUFF //
- Config = {} -- Main init.
- Config.Colors = {} -- Color list init.
- Config.Colors.White = Color(236, 240, 241)
- // CORNER POLY GEN FUNCTION //
- function DrawCorner( x, y, w, h, color )
- local ButtonCorner = {{ },{ },{ },{ }}
- -- First Vert. | Top Left --
- ButtonCorner[1]["x"] = x
- ButtonCorner[1]["y"] = y
- ButtonCorner[1]["u"] = 0
- ButtonCorner[1]["v"] = 0
- -- Sencond Vert. | Top Right --
- ButtonCorner[2]["x"] = x + w
- ButtonCorner[2]["y"] = y
- ButtonCorner[2]["u"] = 1
- ButtonCorner[2]["v"] = 0
- -- Third Vert. | Bottom Right --
- ButtonCorner[3]["x"] = x + w + w
- ButtonCorner[3]["y"] = y + h
- ButtonCorner[3]["u"] = 1
- ButtonCorner[3]["v"] = 0
- -- Fourth Vert. | Bottom Left --
- ButtonCorner[4]["x"] = x + w
- ButtonCorner[4]["y"] = y + h
- ButtonCorner[4]["u"] = 0
- ButtonCorner[4]["v"] = 1
- surface.SetTexture( blank )
- surface.SetDrawColor( color )
- surface.DrawPoly( ButtonCorner )
- end
- PANEL = {}
- function PANEL:Init()
- self.StartTime = SysTime()
- self.F4Down = true
- self:SetSize( 916, 600 - 42 )
- self:Center()
- self:SetVisible( true )
- self:MakePopup()
- self:SetDraggable( false )
- self:ShowCloseButton( false )
- TopBar = vgui.Create( "DPanel", self )
- TopBar:SetSize( self:GetWide(), 30 )
- TopBar.Paint = function()
- draw.RoundedBox( 0, 0, 0, TopBar:GetWide(), TopBar:GetTall(), Config.Colors.BarColor )
- end
- CloseButton = vgui.Create( "DButton", TopBar )
- CloseButton:SetSize( 40, 20 )
- CloseButton:SetText("")
- CloseButton:SetPos( TopBar:GetWide() - CloseButton:GetWide() - 12, 0 )
- CloseButton.DoClick = function()
- self:Close()
- end
- CloseButton.Paint = function(self, w, h)
- draw.RoundedBox( 0, 0, 0, w, h, Config.Colors.MainBackground )
- draw.SimpleText( "X", "BoldFont", w/2, h/2, Config.Colors.White, 1, 1 )
- if CloseButton:IsDown() then
- draw.RoundedBox( 0, 2, 0, w - 4, h, Config.Colors.Shadow )
- end
- end
- self.Tabs = vgui.Create( "DTabSheet", self )
- self.Tabs:SetPos( 0, 39 )
- self.Tabs:SetSize( self:GetWide(), self:GetTall() )
- local ActionsTab = vgui.Create( "DActionsPage" )
- self.Tabs:AddSheet( "Commands", ActionsTab )
- local JobsTab = vgui.Create( "DJobPanel" )
- JobsTab:SetSize( 700, 500 )
- self.Tabs:AddSheet( "Jobs", JobsTab )
- local EntTab = vgui.Create( "DHolder" )
- EntTab:SetSize( 700, 500 )
- local EntPage = vgui.Create( "F4MenuEntities" )
- EntTab:AddTab( "Entities", EntPage )
- local F4Page = vgui.Create( "F4MenuShipments" )
- EntTab:AddTab( "Shipments", F4Page )
- local AmmoPage = vgui.Create( "F4MenuAmmo" )
- EntTab:AddTab( "Ammo", AmmoPage )
- self.Tabs:AddSheet( "Entities", EntTab )
- self.Tabs:AddFiller() // Ignore these ;v
- self.Tabs:AddFiller()
- self.Tabs:AddFiller()
- self.Tabs:AddFiller()
- self.Tabs:AddFiller()
- self.Tabs:AddFiller()
- local ForumPage = vgui.Create( "DForumPage" )
- self.Tabs:AddSheet( "Forums", ForumPage )
- local DonationPage = vgui.Create( "DDonationPage" )
- self.Tabs:AddSheet( "Donate", DonationPage )
- end
- function PANEL:Close()
- self:Hide()
- end
- function PANEL:Paint()
- // Could be done more efficiently ;v
- Derma_DrawBackgroundBlur( self, self.StartTime )
- draw.RoundedBox( 0, 7, 30, 185, self:GetTall(), Config.Colors.BarColor )
- draw.RoundedBox( 0, 7, 30, 185, self:GetTall(), Color( 0, 0, 0, 100 ) )
- draw.RoundedBox( 0, 183, 30, self:GetWide(), self:GetTall(), Config.Colors.MainBackground )
- draw.RoundedBox( 0, 0, 30, self:GetWide(), 15, Config.Colors.MainBackground )
- DrawCorner( 172, 45 + (0 * 43), 11, 11, Config.Colors.MainBackground )
- draw.RoundedBox( 0, 0, 45 + (1 * 40) + (0 * 3), self:GetWide(), 3, Config.Colors.MainBackground )
- DrawCorner( 172, 45 + (1 * 43), 11, 11, Config.Colors.MainBackground )
- draw.RoundedBox( 0, 0, 45 + (2 * 40) + (1 * 3), self:GetWide(), 3, Config.Colors.MainBackground )
- DrawCorner( 172, 45 + (2 * 43), 11, 11, Config.Colors.MainBackground )
- draw.RoundedBox( 0, 0, 45 + (9 * 40) + (8 * 3), self:GetWide(), 3, Config.Colors.MainBackground )
- DrawCorner( 172, 45 + (9 * 43), 11, 11, Config.Colors.MainBackground )
- draw.RoundedBox( 0, 0, 45 + (10 * 40) + (9 * 3), self:GetWide(), 3, Config.Colors.MainBackground )
- DrawCorner( 172, 45 + (10 * 43), 11, 11, Config.Colors.MainBackground )
- draw.RoundedBox( 0, 0, 45 + (11 * 40) + (10 * 3), self:GetWide(), 1000, Config.Colors.MainBackground )
- draw.RoundedBox( 0, 0, 45 + (3 * 40) + (2 * 3), 193, 45 + (5 * 40) + (4 * 3) + 1, Config.Colors.MainBackground )
- draw.RoundedBox( 0, 193, 5, 2, self:GetTall(), Config.Colors.BarColor )
- draw.RoundedBox( 0, 0, 5, 193, self:GetTall(), Config.Colors.Shadow )
- end
- vgui.Register( "F4Frame", PANEL, "DFrame" )
Advertisement
Add Comment
Please, Sign In to add comment