Image of Problem:
[img]http://i.imgur.com/9p8Iaup.png[/img]
Code:
[code]Panel = vgui.Create("DPanelList")
Panel:SetSize(390, 540)
Panel:EnableHorizontal( true )
Panel:EnableVerticalScrollbar( true )
Panel:SetSkin(GAMEMODE.Config.DarkRPSkin)
Panel.Paint() = function()
render.SetScissorRect( 0, 0, Panel:GetWide(), 0, true )
end[/code]
Any help would be nice, thanks.
Taken from Pointshop:
[lua] local oldPaint = DModelPanel.Paint
ModelPanel.Paint = function( self )
local x, y = self:LocalToScreen( 0, 0 )
local w, h = self:GetSize()
local sl, st, sr, sb = x, y, x + w, y + h
local p = self
while p:GetParent() do
p = p:GetParent()
local pl, pt = p:LocalToScreen( 0, 0 )
local pr, pb = pl + p:GetWide(), pt + p:GetTall()
sl = sl < pl and pl or sl
st = st < pt and pt or st
sr = sr > pr and pr or sr
sb = sb > pb and pb or sb
end
render.SetScissorRect( sl, st, sr, sb, true )
oldPaint(self)
render.SetScissorRect( 0, 0, 0, 0, false )
end[/lua]
Tried that code, but still didn't seem to cut. :\
Still in a need of a fix, thanks. :)
[QUOTE=lerpasaur;43689714]Tried that code, but still didn't seem to cut. :\[/QUOTE]
You may have done it wrong, can we see your code?
Sorry, you need to Log In to post a reply to this thread.