mirror of
https://github.com/FPtje/FProfiler.git
synced 2025-03-04 03:03:14 -05:00
Print to file in case it doesn't fit in console
This commit is contained in:
parent
257fd127c1
commit
97fed941e1
@ -20,8 +20,8 @@ local color_name = Color(260, 150, 30)
|
||||
local color_reference = Color(150, 230, 50)
|
||||
local color_comment = Color( 30, 210, 30)
|
||||
|
||||
-- Global 'nil' value
|
||||
NIL = {}
|
||||
-- 'nil' value
|
||||
local NIL = {}
|
||||
|
||||
-- Localise for faster access
|
||||
local pcall = pcall
|
||||
@ -570,13 +570,13 @@ local toStringMsgC = function(_, txt)
|
||||
end
|
||||
|
||||
function showStr(...)
|
||||
local oldF, oldN, oldMsgC = gMsgF, gMsgN, MsgC
|
||||
gMsgF, gMsgN, MsgC = toStringMsgF, toStringMsgN, toStringMsgC
|
||||
local oldF, oldN, oldMsgC, oldMsgN = gMsgF, gMsgN, MsgC, MsgN
|
||||
gMsgF, gMsgN, MsgC, MsgN = toStringMsgF, toStringMsgN, toStringMsgC, toStringMsgN
|
||||
|
||||
strResult = {}
|
||||
show(...)
|
||||
|
||||
gMsgF, gMsgN, MsgC = oldF, oldN, oldMsgC
|
||||
gMsgF, gMsgN, MsgC, MsgN = oldF, oldN, oldMsgC, oldMsgN
|
||||
|
||||
return table.concat(strResult, "")
|
||||
end
|
||||
|
@ -344,7 +344,12 @@ function FUNCDETAILS:Init()
|
||||
self.toConsole:Dock(BOTTOM)
|
||||
|
||||
function self.toConsole:DoClick()
|
||||
show(FProfiler.UI.getCurrentRealmValue("currentSelected"))
|
||||
local data = FProfiler.UI.getCurrentRealmValue("currentSelected")
|
||||
show(data)
|
||||
file.CreateDir("fprofiler")
|
||||
file.Write("fprofiler/profiledata.txt", showStr(data))
|
||||
MsgC(Color(200, 200, 200), "-----", Color(120, 120, 255), "NOTE", Color(200, 200, 200), "---------------\n")
|
||||
MsgC(Color(200, 200, 200), "If the above function does not fit in console, you can find it in data/fprofiler/profiledata.txt\n\n")
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user