Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Mono Expand Sub Sections and Ignore Base Classes

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Jun 23, 2016 10:17 pm    Post subject: Mono Expand Sub Sections and Ignore Base Classes Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites