@@ -646,7 +646,7 @@ local function addDTreeNode(parentNode, nodeData, specialType, isRoot, varType,
646
646
visualDataType = nodeValue .fakeVarType
647
647
end
648
648
649
- if isRoot && varType == " Globals" then
649
+ if isRoot && varType == " Lua. Globals" then
650
650
local dataType = type (nodeData .value )
651
651
local specialFolderPanel = blobsProfiler .Menu .TypeFolders [luaState ][visualDataType ]
652
652
if specialFolderPanel && type (specialFolderPanel ) == " Panel" then
@@ -705,7 +705,7 @@ local function addDTreeNode(parentNode, nodeData, specialType, isRoot, varType,
705
705
childNode .oldExpand (... )
706
706
end
707
707
708
- if varType == " Schema" then
708
+ if varType == " SQLite. Schema" then
709
709
if nodeValue [" ID" ] or nodeValue [" Default" ] or nodeValue [" Not NULL" ] then -- TODO: Gotta be a better way to determine if this is a SQL table entry
710
710
childNode .Label :SetText (nodeValue .Name )
711
711
end
@@ -715,7 +715,7 @@ local function addDTreeNode(parentNode, nodeData, specialType, isRoot, varType,
715
715
end
716
716
else
717
717
local nodeText = nodeKey
718
- if varType == " Schema" then
718
+ if varType == " SQLite. Schema" then
719
719
nodeText = nodeKey .. " : " .. tostring (nodeValue )
720
720
elseif varType == " Files" then
721
721
nodeText = nodeValue
@@ -749,7 +749,7 @@ local function addDTreeNode(parentNode, nodeData, specialType, isRoot, varType,
749
749
end
750
750
end
751
751
752
- varType = varType or " Globals"
752
+ varType = varType or " Lua. Globals"
753
753
754
754
if parentNode .Restrictions then
755
755
childNode .Restrictions = parentNode .Restrictions
@@ -861,9 +861,14 @@ local function addDTreeNode(parentNode, nodeData, specialType, isRoot, varType,
861
861
end
862
862
863
863
if visualDataType and visualDataType == " function" then
864
- childNode .FunctionRef = {name = nodeKey , func = nodeValue , path = " _G. " .. childNode .GlobalPath }
864
+ childNode .FunctionRef = {name = nodeKey , func = nodeValue , path = childNode .GlobalPath , fakeVarType = " function " }
865
865
childNode :SetForceShowExpander (true )
866
- childNode :IsFunc ()
866
+
867
+ if varType ~= " Profiling.Targets" then
868
+ childNode :IsFunc () -- This is what swaps the expander for a dcheckbox if it's a function
869
+ else
870
+ childNode :SetForceShowExpander (false ) -- No need to select already selected functions for profiling..
871
+ end
867
872
868
873
blobsProfiler [luaState ].Profile = blobsProfiler [luaState ].Profile or {}
869
874
@@ -922,6 +927,17 @@ local function addDTreeNode(parentNode, nodeData, specialType, isRoot, varType,
922
927
923
928
childNode .varType = varType
924
929
930
+ if varType == " Profiling.Targets" and isRoot then
931
+ local fullModuleName = nodeData .key
932
+ local splitModuleName = string .Explode (" ." , fullModuleName )
933
+
934
+ if # splitModuleName == 1 then
935
+ childNode .Icon :SetImage (blobsProfiler .Modules [splitModuleName [1 ]].Icon )
936
+ else
937
+ childNode .Icon :SetImage (blobsProfiler .Modules [splitModuleName [1 ]].SubModules [splitModuleName [2 ]].Icon )
938
+ end
939
+ end
940
+
925
941
return childNode
926
942
end
927
943
@@ -947,7 +963,7 @@ local function buildDTree(luaState, parentPanel, rvarType, dataTableOverride)
947
963
dataTable = blobsProfiler .GetDataTableForRealm (luaState , rvarType ) or {}
948
964
end
949
965
950
- if varType == " Globals" then -- TODO: make this shit modular
966
+ if rvarType == " Lua. Globals" then -- TODO: make this shit modular
951
967
for key , value in pairs (dataTable ) do
952
968
table.insert (rootNodes , {
953
969
key = key ,
@@ -967,7 +983,7 @@ local function buildDTree(luaState, parentPanel, rvarType, dataTableOverride)
967
983
968
984
for index , nodeData in ipairs (specialNodes ) do
969
985
if blobsProfiler .Menu .TypeFolders [luaState ][nodeData .special ] == true then
970
- blobsProfiler .Menu .TypeFolders [luaState ][nodeData .special ] = addDTreeNode (dTree , nodeData , true , true , varType , luaState )
986
+ blobsProfiler .Menu .TypeFolders [luaState ][nodeData .special ] = addDTreeNode (dTree , nodeData , true , true , rvarType , luaState )
971
987
blobsProfiler .Menu .TypeFolders [luaState ][nodeData .special ].nodeData = nodeData
972
988
end
973
989
end
@@ -999,7 +1015,7 @@ local function buildDTree(luaState, parentPanel, rvarType, dataTableOverride)
999
1015
local rootNodesLen = # rootNodes
1000
1016
1001
1017
for index , nodeData in ipairs (rootNodes ) do
1002
- addDTreeNode (dTree , nodeData , false , true , varType , luaState )
1018
+ addDTreeNode (dTree , nodeData , false , true , rvarType , luaState )
1003
1019
1004
1020
if index == rootNodesLen then
1005
1021
dTree :SetVisible (true )
@@ -1235,7 +1251,7 @@ concommand.Add("blobsprofiler", function(ply, cmd, args, argStr)
1235
1251
1236
1252
local dynamicH = (moduleTab .GetActiveTab and moduleTab :GetActiveTab () == s ) and h - 7 or h -- this is SO dumb
1237
1253
local startY = (moduleTab .GetActiveTab and moduleTab :GetActiveTab () == s ) and 0 or 1
1238
-
1254
+
1239
1255
draw .RoundedBoxEx (4 , 0 , startY , perc * w , dynamicH , Color (255 ,255 ,0 ,50 ), true , true )
1240
1256
elseif blobsProfiler .Modules [moduleName ].SubModules [subModuleName ].flashyUpdate then
1241
1257
if (moduleTab .GetActiveTab and moduleTab :GetActiveTab () == s ) then -- TODO: DPanel subModuleTabs will never stop flashing
0 commit comments