I need help with my DProptertySheet VGui. I can add all the stuff i want into there but how do i change the posission of my checkboxes and sliders ?!?
Heres my code -:I
-----------------------------------------------------------------------------------------------------------------------------
-- /¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\
-- | *|* CinemaHelper V.2 *|* |
-- | By BummieHead |
-- \______________________________________________/
function CinemaHelper()
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 50, 50 )
DermaPanel:SetSize( 350, 400 )
DermaPanel:SetTitle( "CinemaHelper" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
-- /¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\
-- | Hding Stuff panel |
-- \______________________________________________/
local PropertySheet = vgui.Create( "DPropertySheet" )
PropertySheet:SetParent( DermaPanel )
PropertySheet:SetPos( 5, 30 )
PropertySheet:SetSize( 350, 400 )
CinemaHide = vgui.Create( "DPanel" )
CinemaHide:SetPos( 0, 0 )
CinemaHide:SetSize( 20, 20 )
CinemaHide:SetParent(PropertySheet)
local CinemaHidetwo = vgui.Create( "DCheckBoxLabel", PropertySheet )
CinemaHidetwo:SetText( "Hide Hud" )
CinemaHidetwo:SetParent(CinemaHide.Panel)
CinemaHidetwo:SetConVar( "cl_drawhud" )
CinemaHidetwo:SetValue( 1 )
CinemaHidetwo:SizeToContents()
local CinemaHidethree = vgui.Create( "DCheckBoxLabel", PropertySheet )
CinemaHidethree:SetText( "Hide Weapon" )
CinemaHidethree:SetConVar( "r_drawviewmodel" )
CinemaHidethree:SetValue( 1 )
CinemaHidethree:SizeToContents()
local CinemaHidefour = vgui.Create( "DNumSlider", PropertySheet )
CinemaHidefour:SetSize( 150, 50 ) -- Keep the second number at 50
CinemaHidefour:SetText( "Messages" )
CinemaHidefour:SetMin( 0 )
CinemaHidefour:SetMax( 12 )
CinemaHidefour:SetDecimals( 0 )
CinemaHidefour:SetConVar( "hud_saytext_time" )
CinemaHidefour:SizeToContents()
-- /¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\
-- | UseFull Commands |
-- \______________________________________________/
PropertySheet:AddSheet( "Hide Stuff", CinemaHide, "gui/silkicons/wrench", false, false, "Here you can hide stuff !" )
end
concommand.Add( "CinemaHelptwo", CinemaHelper )
---------------------------------------------------------------------------------------------------------------------------
How can i change the possison of my checkboxes and sliders ? :S
Pic - [url]http://img138.imageshack.us/img138/7681/gmconstruct0005.jpg[/url]
Thanks
Change the SetPos(x,y) part.
[QUOTE=sintwins;19729857]Change the SetPos(x,y) part.[/QUOTE]
On The checboxes and sliders ?
If i try SetPos:( 5, 30 ) -- Example
Only one of them works, the ther ones gets disabled :S
You SHOULD just be able to do CinemaHideFour:SetPos(x,y) do note, the x,y position is relative to the position of the parent.
Also, in CinemaHideTwo, why are you parenting it twice..... the second arg is the parent.
[QUOTE=decyg;19740885]You SHOULD just be able to do CinemaHideFour:SetPos(x,y) do note, the x,y position is relative to the position of the parent.
Also, in CinemaHideTwo, why are you parenting it twice..... the second arg is the parent.[/QUOTE]
Wtf, Now its working xS Dnt know what i have done wrong, but Thank you very much !!! :D
Welcome, i guess.
Sorry, you need to Log In to post a reply to this thread.