• Restricting DFrame movement
    4 replies, posted
So basically i want to restrict the movement of a DFrame from left of right meaning i dont want players to be able to drag the DFrame left or right BUT i want them to be able to drag it up and down... Idk if this is possible but im drawing a blank.. Thanks!
Look into how DFrame handles dragging? Wiki is pretty bad for vgui documentation imo, /lua/vgui/ is waaaaaayyyy better
Well im looking [URL="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/vgui/dframe.lua#L136"]here[/URL] and then im working on an idea to do this so im doing this.. [code] PicText.Think = function() if PicText:IsDragging() then print("<M") end end [/code] Not only does this not work it makes it not draggable...
I'm sure Dragging is handled inside Think hook of a DFrame so ofc it wouldn't work
[QUOTE=Klaes4Zaugen;50971445]I'm sure Dragging is handled inside Think hook of a DFrame so ofc it wouldn't work[/QUOTE] So how would i do this... [editline]30th August 2016[/editline] Solved.. Just redid the dragging part on the think function and then added checks
Sorry, you need to Log In to post a reply to this thread.