• Panels Z Position
    2 replies, posted
How do I get it so my panel gets drawn under all the other panels? [code] function GM.AggressionTimerOverlay() local DermaPanel = vgui.Create( "DFrame" ) DermaPanel:SetPos( ScrW() - (ScrW() / 6), (ScrH() / 6) ) DermaPanel:SetSize( ScrW() / 6 , ScrW() / 6 ) DermaPanel:SetAlpha( 50 ) DermaPanel:SetZPos( 0 ) DermaPanel:SetTitle( "Testing Derma Stuff" ) DermaPanel:SetVisible( true ) DermaPanel:SetDraggable( false ) DermaPanel:ShowCloseButton( false ) DermaPanel:MakePopup() DermaPanel:SetKeyboardInputEnabled(false) DermaPanel:SetMouseInputEnabled(false) local DermaListView = vgui.Create("DListView") DermaListView:SetParent(DermaPanel) DermaListView:SetPos(25, 50) DermaListView:StretchToParent(5,5,5,5) DermaListView:SetAlpha( 50 ) DermaListView:SetMultiSelect(false) DermaListView:AddColumn("Name") -- Add column DermaListView:AddColumn("Amount of kills") for k,v in pairs(player.GetAll()) do DermaListView:AddLine(v:Nick(),v:Frags()) -- Add lines end DermaPanel:MoveToBack() end usermessage.Hook("gms_startaggressiontimer",GM.AggressionTimerOverlay) [/code]MoveToBack() doesn't seem to work. [editline]12:56AM[/editline] Well I found out that: DermaPanel:MakePopup() actually makes the panel stay ontop.
Yeah you just have an x and a y for the position of something 2d :P
You need to call move to back AFTER your other panels have been open, or call MoveToFront on newer panels.
Sorry, you need to Log In to post a reply to this thread.