Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------------------------------
- -------------------- Fonts --------------------
- -----------------------------------------------
- surface.CreateFont( "NexaLightList", {
- font = "NexaLight",
- extended = false,
- size = 30,
- weight = 500,
- } )
- surface.CreateFont( "NexaBoldList", {
- font = "NexaBold",
- extended = false,
- size = 40,
- weight = 500,
- } )
- surface.CreateFont( "NexaLight123456789", {
- font = "NexaLight",
- extended = false,
- size = 40,
- weight = 500,
- } )
- surface.CreateFont( "NexaBold123456789", {
- font = "NexaBold",
- extended = false,
- size = 60,
- weight = 500,
- } )
- surface.CreateFont( "NexaBold1234567890", {
- font = "NexaBold",
- extended = false,
- size = 60,
- weight = 500,
- } )
- ---------------------------------------------------------
- -------------------- Local functions --------------------
- ---------------------------------------------------------
- local screenwide = ScrW()
- local screenheight = ScrH()
- --Images category
- local image_logoutbutton = Material( "adminpanel/images/logout.png" )
- local image_ticketicon = Material( "adminpanel/images/ticket-icon.png" )
- local image_adminpanelicon = Material( "adminpanel/images/adminpanel-icon.png" )
- local image_settingsicon = Material( "adminpanel/images/settings-icon.png" )
- ---------------------------------------------------
- -------------------- Base menu --------------------
- ---------------------------------------------------
- local MainPanel = vgui.Create("DFrame")
- MainPanel:SetTitle("")
- MainPanel:SetSize(screenwide,screenheight)
- MainPanel:Center()
- MainPanel:MakePopup()
- MainPanel:ShowCloseButton(false)
- MainPanel:IsDraggable(false)
- function MainPanel:Paint( w, h )
- draw.RoundedBox(0,0,0,screenwide,screenheight,Color(236,240,245)) --font blanc/gris
- draw.RoundedBox(0,0,0,screenwide - 1600,screenheight,Color(34,45,50)) --sidebar
- draw.RoundedBox(0,0,0,screenwide,screenheight - 1020,Color(64,142,186)) --bar du haut
- draw.RoundedBox(0,0,0,screenwide - 1600,screenheight - 1020,Color(58,128,167)) --bar du haut foncé
- draw.SimpleText("ORIGINE","NexaBold123456789",160,30,Color(255,255,255,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
- end
- local buttonclose = vgui.Create("DButton", MainPanel)
- buttonclose:SetSize(35,35)
- buttonclose:SetText("")
- buttonclose:SetPos(screenwide - 47.5, 12.5)
- function buttonclose:Paint( w, h )
- --draw.RoundedBox(0,0,0,w,h,Color(255,0,0,255))
- if buttonclose:IsHovered() then
- surface.SetDrawColor( 0, 0, 0, 255 )
- else
- surface.SetDrawColor( 255, 255, 255, 255 )
- end
- surface.SetMaterial( image_logoutbutton )
- surface.DrawTexturedRect( 0, 0, 35, 35 )
- end
- function buttonclose:DoClick()
- MainPanel:Close()
- end
- --------------------------------------------------------
- -------------------- Testing button --------------------
- --------------------------------------------------------
- local function functiontickets()
- surface.SetDrawColor( 255, 255, 255, 255 )
- surface.SetMaterial( image_ticketicon )
- surface.DrawTexturedRect( 37, 35, 30, 30 )
- draw.SimpleText("Tickets","NexaLight123456789",90,50,Color(255,255,255,255),TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER)
- end
- local paneltickets = vgui.Create("DPanel", MainPanel )
- paneltickets:SetSize(1520,940)
- paneltickets:SetPos(360,100)
- function paneltickets:Paint( w, h )
- draw.RoundedBox(0,0,0,w,h,Color(255,255,255,255)) --font blanc/gris
- end
- local buttontickets = vgui.Create("DButton", MainPanel)
- buttontickets:SetSize(320,100)
- buttontickets:SetText("")
- buttontickets:SetPos(0, 100)
- buttontickets:SetEnabled( true )
- function buttontickets:Paint( w, h )
- if paneltickets:IsVisible() then
- draw.RoundedBox(0,0,0,w,h,Color(30,40,44,255))
- draw.RoundedBox(0,0,0,4,h,Color(64,142,186,255))
- functiontickets()
- else
- draw.RoundedBox(0,0,0,w,h,Color(0,0,0,0))
- functiontickets()
- end
- end
- function buttontickets:DoClick()
- if paneltickets._panelViewState then
- --paneltickets:Hide()
- else
- paneltickets:Show()
- paneladminpanel:Hide()
- panelsettings:Hide()
- end
- paneltickets._panelViewState = not paneltickets._panelViewState
- end
- ----------------------------------------------------------
- -------------------- Testing button 2 --------------------
- ----------------------------------------------------------
- local function functionadminpanel()
- surface.SetDrawColor( 255, 255, 255, 255 )
- surface.SetMaterial( image_adminpanelicon )
- surface.DrawTexturedRect( 37, 35, 30, 30 )
- draw.SimpleText("Admin Panel","NexaLight123456789",90,50,Color(255,255,255,255),TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER)
- end
- local buttonadminpanel = vgui.Create("DButton", MainPanel)
- buttonadminpanel:SetSize(320,100)
- buttonadminpanel:SetText("")
- buttonadminpanel:SetPos(0, 100 + 100)
- buttonadminpanel:SetEnabled( true )
- function buttonadminpanel:Paint( w, h )
- if paneladminpanel:IsVisible() then
- draw.RoundedBox(0,0,0,w,h,Color(30,40,44,255))
- draw.RoundedBox(0,0,0,4,h,Color(64,142,186,255))
- functionadminpanel()
- else
- draw.RoundedBox(0,0,0,w,h,Color(0,0,0,0))
- functionadminpanel()
- end
- end
- function buttonadminpanel:DoClick()
- if paneladminpanel._panelViewState then
- --paneladminpanel:Hide()
- else
- paneladminpanel:Show()
- paneltickets:Hide()
- panelsettings:Hide()
- end
- paneladminpanel._panelViewState = not paneladminpanel._panelViewState
- end
- local function testpanel1( Parent )
- local TestPanel2 = vgui.Create("DPanel", Parent)
- TestPanel2:SetSize(1000,1000)
- TestPanel2:SetPos(100,100)
- end
- local paneladminpanel = vgui.Create("DPanel", MainPanel )
- paneladminpanel:SetSize(1520,940)
- paneladminpanel:SetPos(360,100)
- function paneladminpanel:Paint( w, h )
- draw.RoundedBox(0,0,0,w,h,Color(255,255,255,255)) --font blanc/gris
- draw.RoundedBox(0,0,48,w - 15,2,Color(58,128,167,255)) --Ligne bleu haut
- draw.SimpleText("Name:","NexaBoldList",5,50 / 2,Color(0,0,0,255),TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER)
- draw.SimpleText("SteamID:","NexaBoldList",w / 2,50 / 2,Color(0,0,0,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
- draw.SimpleText("Rank:","NexaBoldList",w - 20,50 / 2,Color(0,0,0,255),TEXT_ALIGN_RIGHT,TEXT_ALIGN_CENTER)
- local PlayerList = nil
- local PlayerScrollPanel = vgui.Create("DScrollPanel", paneladminpanel)
- PlayerScrollPanel:SetSize(w,h - 50)
- PlayerScrollPanel:SetPos(0,50)
- PlayerList = vgui.Create("DListLayout", PlayerScrollPanel)
- PlayerList:SetSize(PlayerScrollPanel:GetWide(),PlayerScrollPanel:GetTall())
- PlayerList:SetPos(0,0)
- PlayerList:Clear()
- for _, v in pairs(player.GetAll()) do
- local PlayerButton = vgui.Create("DButton", PlayerList)
- PlayerButton:SetSize(PlayerList:GetWide(), 50)
- PlayerButton:SetPos(0,0)
- PlayerButton:SetText("")
- PlayerButton.DoClick = function()
- testpanel1(MainPanel)
- end
- function PlayerButton:Paint( w, h )
- draw.RoundedBox(0,0,0,w - 15,h,Color(34,45,50,255))
- draw.RoundedBox(0,0,h-2,w - 15,4,Color(64,142,186,255))
- draw.SimpleText(LocalPlayer():Name(),"NexaLightList",5,h / 2 - 2,Color(255,255,255,255),TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER)
- draw.SimpleText(LocalPlayer():SteamID(),"NexaLightList",w / 2,h / 2 - 2,Color(255,255,255,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
- draw.SimpleText(LocalPlayer():SteamID(),"NexaLightList",w - 20,h / 2 - 2,Color(255,255,255,255),TEXT_ALIGN_RIGHT,TEXT_ALIGN_CENTER)
- end
- end
- end
- ----------------------------------------------------------
- -------------------- Testing button 3 --------------------
- ----------------------------------------------------------
- local function functionsettings()
- surface.SetDrawColor( 255, 255, 255, 255 )
- surface.SetMaterial( image_settingsicon )
- surface.DrawTexturedRect( 37, 35, 30, 30 )
- draw.SimpleText("Settings","NexaLight123456789",90,50,Color(255,255,255,255),TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER)
- end
- buttonsettings = vgui.Create("DButton", MainPanel)
- buttonsettings:SetSize(320,100)
- buttonsettings:SetText("")
- buttonsettings:SetPos(0, 100 + 200)
- buttonsettings:SetEnabled( true )
- function buttonsettings:Paint( w, h )
- if panelsettings:IsVisible() then
- draw.RoundedBox(0,0,0,w,h,Color(30,40,44,255))
- draw.RoundedBox(0,0,0,4,h,Color(64,142,186,255))
- functionsettings()
- else
- draw.RoundedBox(0,0,0,w,h,Color(0,0,0,0))
- functionsettings()
- end
- end
- function buttonsettings:DoClick()
- if panelsettings._panelViewState then
- --panelsettings:Hide()
- else
- panelsettings:Show()
- paneltickets:Hide()
- paneladminpanel:Hide()
- end
- panelsettings._panelViewState = not panelsettings._panelViewState
- end
- panelsettings = vgui.Create("DPanel", MainPanel )
- panelsettings:SetSize(1520,940)
- panelsettings:SetPos(360,100)
- function panelsettings:Paint( w, h )
- draw.RoundedBox(0,0,0,w,h,Color(255,255,255,255)) --font blanc/gris
- draw.SimpleText("Cette page est actuellement indisponible!","NexaBold1234567890",w / 2,h / 3,Color(0,0,0,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement