@@ -839,7 +839,11 @@ do -- list
839839 if prop .udata and prop .udata .editor_panel then
840840 T = prop .udata .editor_panel or T
841841 elseif pace .PanelExists (" properties_" .. prop .key :lower ()) then
842- T = prop .key :lower ()
842+ -- is it code bloat to fix weird edge cases like bodygroups on specific models???
843+ -- idk but it's more egregious to allow errors just because of what bodygroups the model has
844+ if prop .key :lower () ~= " container" then
845+ T = prop .key :lower ()
846+ end
843847 elseif not pace .PanelExists (" properties_" .. T ) then
844848 T = " string"
845849 end
@@ -2072,6 +2076,7 @@ do -- base editable
20722076 local hookID = tostring ({})
20732077 local textEntry = pnl
20742078 local delay = os.clock () + 0.1
2079+ local inset_x = self :GetTextInset ()
20752080
20762081 pac .AddHook (' Think' , hookID , function (code )
20772082 if not IsValid (self ) or not IsValid (textEntry ) then return pac .RemoveHook (' Think' , hookID ) end
@@ -2090,7 +2095,6 @@ do -- base editable
20902095 -- pnl:SetPos(x+3,y-4)
20912096 -- pnl:Dock(FILL)
20922097 local x , y = self :LocalToScreen ()
2093- local inset_x = self :GetTextInset ()
20942098 pnl :SetPos (x + 5 + inset_x , y )
20952099 pnl :SetSize (self :GetSize ())
20962100 pnl :SetWide (ScrW ())
@@ -2109,6 +2113,11 @@ do -- base editable
21092113 local old = pnl .Paint
21102114 pnl .Paint = function (...)
21112115 if not self :IsValid () then pnl :Remove () return end
2116+ local x , y = self :LocalToScreen ()
2117+ local _ ,prop_y = pace .properties :LocalToScreen (0 ,0 )
2118+ y = math .Clamp (y ,prop_y ,ScrH () - self :GetTall ())
2119+
2120+ pnl :SetPos (x + 5 + inset_x , y )
21122121
21132122 surface .SetFont (pnl :GetFont ())
21142123 local w = surface .GetTextSize (pnl :GetText ()) + 6
@@ -2122,6 +2131,35 @@ do -- base editable
21222131 old (... )
21232132 end
21242133
2134+ local skincolor = self :GetSkin ().Colours .Category .Line .Button
2135+ local col = Color (skincolor .r ,skincolor .g ,skincolor .b , 255 )
2136+
2137+ -- draw a rectangle with property key's name and arrows to show where the line is scrolling out of bounds
2138+ pac .AddHook (' PostRenderVGUI' , hookID .. " 2" , function (code )
2139+ if not IsValid (self ) or not IsValid (pnl ) then pac .RemoveHook (' Think' , hookID .. " 2" ) return end
2140+ local _ ,prop_y = pace .properties :LocalToScreen (0 ,0 )
2141+ local x , y = self :LocalToScreen ()
2142+ local overflow = y < prop_y or y > ScrH () - self :GetTall ()
2143+ if overflow then
2144+ local str = " "
2145+ if y > ScrH () then
2146+ " ↓↓ " .. self .CurrentKey .. " ↓↓"
2147+ else
2148+ " ↑↑ " .. self .CurrentKey .. " ↑↑"
2149+ end
2150+ local container = self :GetParent ()
2151+ y = math .Clamp (y ,prop_y ,ScrH () - self :GetTall ())
2152+ surface .SetFont (pnl :GetFont ())
2153+ local w2 = surface .GetTextSize (str )
2154+
2155+ surface .SetDrawColor (col )
2156+ surface .DrawRect (x - w2 , y , w2 , pnl :GetTall ())
2157+ surface .SetTextColor (self :GetSkin ().Colours .Category .Line .Text )
2158+ surface .SetTextPos (x - w2 , y )
2159+ surface .DrawText (str )
2160+ end
2161+ end )
2162+
21252163 pace .BusyWithProperties = pnl
21262164 end
21272165
@@ -2197,6 +2235,13 @@ do -- vector
21972235 local left = pace .CreatePanel (" properties_number" , self )
21982236 local middle = pace .CreatePanel (" properties_number" , self )
21992237 local right = pace .CreatePanel (" properties_number" , self )
2238+ -- a hack so that the scrolling out-of-bounds indicator rectangle with arrows has the key
2239+ timer .Simple (0 , function ()
2240+ if not IsValid (left ) then return end
2241+ left .CurrentKey = self .CurrentKey
2242+ middle .CurrentKey = self .CurrentKey
2243+ right .CurrentKey = self .CurrentKey
2244+ end )
22002245
22012246 left .PopulateContextMenu = function (_ , menu ) self :PopulateContextMenu (menu ) end
22022247 middle .PopulateContextMenu = function (_ , menu ) self :PopulateContextMenu (menu ) end
0 commit comments