Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Thu Jun 23, 2016 10:17 pm Post subject: Mono Expand Sub Sections and Ignore Base Classes |
|
|
I don't know if anyone else does this, but I like to expand just the Assembly-CSharp tree in Mono games.
I then save those results to a text file so I can scan through it more easily.
I also prefer to leave the base classes collapsed so they do not add unnecessary duplicates to search through.
So, I modified the default File > Expand All behavior.
Now I need only select the Assembly-CSharp tree item and use expand all.
Installation:
Inside your Cheat Engine directory, open the "autorun" folder.
Edit the "monoscript.lua" file in NotePad or your favorite text editor.
Find the line containing the following: function monoform_miExpandAllClick(sender)
Replace that function and its content up until the line containing the left-aligned "end" statement.
Code: | function monoform_miExpandAllClick(sender)
if messageDialog("Are you sure you wish to expand the whole tree? This can take a while and Cheat Engine may look like it has crashed (It has not)", mtConfirmation, mbYes, mbNo)==mrYes then
monoForm.TV.beginUpdate()
--monoForm.autoExpanding=true --special feature where a base object can contain extra lua variables
--monoForm.TV.fullExpand()
local tv = monoForm.TV
local level = 0
local index = 0
if tv.Selected ~= nil then
index = tv.Selected.AbsoluteIndex + 2
level = tv.Selected.Level
tv.Selected.Expand(false)
end
while index < tv.Items.Count do
local node = tv.Items[index]
if node.Level <= level then
break
end
if node.HasChildren and node.Level <= 3 then
node.Expand(false)
end
index = index + 1
end
--monoForm.autoExpanding=false
monoForm.TV.endUpdate()
end
end |
|
|