Download
(29 Kb)
Download
Updated: 01/09/16 08:03 PM
Pictures
File Info
Compatibility:
Orsinium (2.2.4)
Updated:01/09/16 08:03 PM
Created:07/29/15 03:16 PM
Monthly downloads:38
Total downloads:5,131
Favorites:10
MD5:
Categories:Discontinued & Outdated, Utility Mods
Mer Torchbug  Popular! (More than 5000 hits)
Version: 1.2
by: merlight [More]
This ambitious Torchbug wants to become a more capable and less sticky alternative to Zgoo. But beware: it's not quite there yet, and has more bugs than the one in its name.
/tbug expr
If expr is omitted or evaluates to _G, Global inspector will be opened.
If expr evaluates to a table, Table inspector will be opened for the table.
If expr evaluates to a control (userdata with function IsControlHidden), Control inspector will be opened for the control.

The most recently opened object inspector window will have the Torchbug icon at the top-left corner desaturated (grayscale). Such window is subject to recycling whenever you a) click on a table or control row in Global inspector, or b) enter a /tbug command that evaluates to a table or control. You can force opening a new window by shift-click (in Global inspector) or shift-enter (/tbug command).


Global inspector
  • Classes - global tables with an __index member
  • Objects - global tables without an __index member, and userdata that are neither controls nor fonts
  • Controls - global userdata with function IsControlHidden
  • Fonts - global userdata with function GetFontInfo
  • Functions - global functions
  • Constants - all other globals
  • Strings - EsoStrings - with SI constant names as well as integer values displayed
  • Sounds - SOUNDS - click to play
  • Dialogs - ESO_Dialogs
  • Libs - LibStub.libs - with minor versions displayed next to names

Next to the magnifier icon is a filter mode switch (the three-letter button) and a string/expression filter field.
  • str - plain string search. Case-sensitive if there is at least one upper-case letter in the string.
  • pat - string pattern search. Case-sensitive.
  • val - value search. The expression is evaluated once. Items whose value compares equal to the result pass the filter.
  • con - condition search. The expression is evaluated for each list item, with environment containing 'k' and 'v' as the list item key and value. Items for which the result is truthy pass the filter.
    For example, this is how you can search the Constants tab for items whose key starts with "B" and whose value is an even number:
    k:find("^B") and v % 2 == 0

Left-click on a row with a table or control opens a new inspector for that object.
Right-click on a value - same as in Table inspector.


Table inspector

Metatable members are listed before actual table contents. Metamethods are differentiated by having yellow keys, despite them being strings.

Left-click on a row with a table or control opens a new tab in the same inspector window. Shift-Left-click to open a new window.
Right-click on a value (the right half of the row) switches to edit mode. Whatever you type will be evaluated after you hit Enter, and unless that fails, the result will be assigned to the corresponding key in the table. Use with care.

Right-click on a tab to close it.


Control inspector

In v1.1 there are many more control properties listed, including anchors, children and properties specific to certain control types. Some are editable, but there's currently no visual cue, you'll need to right-click and see.



TODO
  • String search uses tostring(value), which leads to stupid matches with table/userdata address (which may not even be displayed if it has a global name).
  • Windows don't close after their last tab has been closed.
  • Add color box to color properties, open color picker on click.
  • Implement inserting a new key/value pair to inspected table. Also add "self" to the environment to facilitate copying another value from the same table.
  • Control properties hidden/controlHidden, alpha/controlAlpha and scale have confusing set/get semantics when inheritance is involved; needs discussion.
  • Toggle boolean properties with a doubleclick.
version 1.1
- facilitate dragging windows with middle mouse button
- make /tbug expr recycle last window unless IsShiftKeyDown()
- recycle last window for inspecting a table or control from the global inspector or /tbug command
- recycling can be prevented by holding shift
- make control properties editable
- allow both table and control inspector tabs in one window
- improve control inspector (anchors, children, etc.)
- list table's metamethods before its contents
- add configurable typeColors and interfaceColors
Optional Files (1)
File Name
Version
Size
Author
Date
Type
1.66
139kB
01/13/24 03:26 PM
Patch


Archived Files (2)
File Name
Version
Size
Uploader
Date
1.1
26kB
merlight
10/06/15 03:00 PM
1.0
20kB
07/29/15 03:16 PM


Post A Reply Comment Options
Unread 10/03/19, 03:06 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5988
Uploads: 78
Updated, fixed and improved version of this wonderful addon:
https://www.esoui.com/downloads/info...rmuchmore.html
Last edited by Baertram : 12/09/22 at 03:20 AM.
Report comment to moderator  
Reply With Quote
Unread 08/21/16, 03:57 PM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 671
File comments: 213
Uploads: 12
Re: Feature Request

Hi @manavortex

ad 1) Dunno how that works, and how other UI deal with that. Maybe you can set scale on "tbugTabWindow" template (controls/templates.xml), but that will likely enlarge text as well.

ad 2) That's on TODO list (which is really WONTDO list since I can't run the game, haven't even updated since Thieves Guild). Hint: valueEditStart

ad 3) Those are created on the fly and should be named "tbugTabWindow"..INDEX
You can do for example:
/tbug GuiRoot -- <ENTER> creates tbugTabWindow1
/tbug tbugTabWindow1 -- <SHIFT+ENTER> creates tbugTabWindow2, inspecting the first one

ad 4) If you really want ALL visible controls, you'll have to walk the tree from GuiRoot down its children, because some controls don't have a name (and thus don't appear in _G).
If you want only named visible controls, that should be doable with tbug: on Controls tab use "con" filter: "not v:IsHidden()" (but it's going to be slow).

If you only want visible top-level controls, then it's easy*:
Lua Code:
  1. function vic()
  2.     res = {}
  3.     for i = 1, GuiRoot:GetNumChildren() do
  4.         local c = GuiRoot:GetChild(i)
  5.         if c and not c:IsHidden() then
  6.             res[i] = c
  7.         end
  8.     end
  9.     return res
  10. end
/tbug vic()

* edit: or with a "con" filter: "not v:IsHidden() and v:GetParent() == GuiRoot"
Last edited by merlight : 08/21/16 at 04:02 PM.
Report comment to moderator  
Reply With Quote
Unread 08/19/16, 04:35 AM  
manavortex
 
manavortex's Avatar
AddOn Author - Click to view AddOns

Forum posts: 138
File comments: 511
Uploads: 46
Feature Request

Hey merlight,

First of all, I love your Add-on (and your handle), hence me bothering you with feature requests.

I've changed my font globally, unfortunately, that screws up tbug a little:

Fully aware that it's my problem and not yours, but a fix would be appreciated.

Fetaure 2 (every time it doesn't work I wish it would): Could you make boolean values toggle-able in the inspector window instead of letting me edit them? If the value is true/false, I don't really profit from being able to enter wasd.

Feature 3: Would you mind to make the popup inspector window controll accessible somehow? I mean, I bet it is, but I can't find it, so it's hidden very well. Background: I'm working on something that lets me re-vamp my interface for idling/chatting/developing, and it requires me to toy around with drawLayers a bit.

Feature 4: I would love a list of all controls that are currently visible. It's probably as simple as iterating over the list and only selecting those who are visible, but I haven't taken the time yet.

Please let me know what you think of those, I'd appreciate it a ton if you'd implement some of them!

regards,
manavortex
Report comment to moderator  
Reply With Quote
Unread 02/14/16, 08:30 PM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 671
File comments: 213
Uploads: 12
Originally Posted by Baertram
Is there any chat command like "/tb moc", or a keybinding, to show the actual control below the mouse cursor inside the inspector?
No special command, /tbug moc() works simply because it calls the global function moc.

Originally I considered adding a few keybinds configurable to execute any script, but it's probably not going to happen.
Report comment to moderator  
Reply With Quote
Unread 02/14/16, 11:20 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5988
Uploads: 78
Very cool addon! It's a real helping hand during development and error searching

Is there any chat command like "/tb moc", or a keybinding, to show the actual control below the mouse cursor inside the inspector?
This would be really great!
Report comment to moderator  
Reply With Quote
Unread 01/09/16, 07:51 PM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 671
File comments: 213
Uploads: 12
Wow, thanks! And it's not even finished I've just checked and found some improvements I made in November, packaging it now
Report comment to moderator  
Reply With Quote
Unread 01/09/16, 02:50 PM  
Arterion

Forum posts: 10
File comments: 39
Uploads: 0
I just wanted to say thank you for this. It's extremely functional, yet still very elegant.

I use several of your addons, but this one in particular just seems to be very under-appreciated. It's not just that it's a useful addon, it's delightful example of software design in general.
Report comment to moderator  
Reply With Quote
Unread 07/29/15, 05:24 PM  
circonian
AddOn Author - Click to view AddOns

Forum posts: 613
File comments: 804
Uploads: 27
It looks awesome, nice work! Seriously it looks so nice I hate to ask for anything, but I'm going to
Report comment to moderator  
Reply With Quote
Unread 07/29/15, 04:49 PM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 671
File comments: 213
Uploads: 12
Sorry, not my call. I only work on add-ons I use, or have other special interest in. MM is out of that scope.
Report comment to moderator  
Reply With Quote
Unread 07/29/15, 04:24 PM  
QuadroTony
Banned
 
QuadroTony's Avatar
AddOn Author - Click to view AddOns

Forum posts: 828
File comments: 3866
Uploads: 3
okay
any plans to add MM compatibility to do what i told?

it will be very usefull for all MM users
its the most popular addon for trading with 142k downloads and community will thank you very much
Last edited by QuadroTony : 07/29/15 at 04:27 PM.
Report comment to moderator  
Reply With Quote
Unread 07/29/15, 04:14 PM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 671
File comments: 213
Uploads: 12
Originally Posted by QuadroTony
it will be very nice if you pointing me out how with this addon delete choose item's date from Master Merchants database

right now i need to edit saved variables by hands =(
I already told you in Zgoo comments that I don't use MM. And if you can't delete it with Zgoo or the trick Garkin posted there, you won't be able to delete it with this add-on, either.
Report comment to moderator  
Reply With Quote
Unread 07/29/15, 03:25 PM  
QuadroTony
Banned
 
QuadroTony's Avatar
AddOn Author - Click to view AddOns

Forum posts: 828
File comments: 3866
Uploads: 3
it will be very nice if you pointing me out how with this addon delete choose item's date from Master Merchants database

right now i need to edit saved variables by hands =(
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: