Is it possible to add little buttons to collapse/expand macro groups, so that when you don't need a group you can keep it closed and it won't occupy the space of all the macros it contains?
Basically like a spoiler button... you click it to expand the contents, or re-click to hide them.
Possibly also memorizing the state of the groups in the settings, just as it memorizes windows' positions and sizes, so that you won't have to close (or open) every group each time, if there are some groups that you mostly keep open and others that are mostly kept closed.
Also, having subgroups (at least one level, if it's problematic to add a dynamic number of levels), and the ability to open/close them too. Just like a directory-tree visualization in the library resources windows.
Collapsible macro groups and macro subgroups
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
-
- Cave Troll
- Posts: 34
- Joined: Sat May 11, 2019 8:41 am
Re: Collapsible macro groups and macro subgroups
Someone made Minmize Macro Groups in the MT Discord which could help you.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
-
- Cave Troll
- Posts: 34
- Joined: Sat May 11, 2019 8:41 am
Re: Collapsible macro groups and macro subgroups
Is some permission needed?
I'm only seeing this (the rest of Discord works normally):
I'm only seeing this (the rest of Discord works normally):
Re: Collapsible macro groups and macro subgroups
I assume you added the server to your Discord and followed the directions for the server? That screen looks like a Discord caching thing rather than being permission based. I know we have a lot of channels there and you can select which groups you want to join, but they all should be accessible.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
-
- Cave Troll
- Posts: 34
- Joined: Sat May 11, 2019 8:41 am
Re: Collapsible macro groups and macro subgroups
Ok, I hadn't joined the server proper... although not sure why it does that thing, if it's public.
Anyway, I tested it and it's nice, but:
1) Minor error: the labels collapse/expand are inverted when the group is expanded/collapsed; it can be fixed by simply swapping [h: expand = 0] and [h: expand = 1] between each other.
2) The biggest issue: it doesn't work on the Campaign panel, only on tokens, but the Campaign panel is where I have the biggest number of macros and groups, where I'd need collapse/expand most. Any way to make it work there? With my level of understanding, I don't see anything in the code itself that limits it to tokens, so I guess it's something inherent to one or more of the functions used and thus nothing can be done?
3) The more macros there are in a group, the slower it gets, I presume due to retrieving all the properties of all the macros and then running the foreach().
If it could be implemented as a built-in feature for MapTool, I guess it could run smoother with no issues.
Anyway, I tested it and it's nice, but:
1) Minor error: the labels collapse/expand are inverted when the group is expanded/collapsed; it can be fixed by simply swapping [h: expand = 0] and [h: expand = 1] between each other.
2) The biggest issue: it doesn't work on the Campaign panel, only on tokens, but the Campaign panel is where I have the biggest number of macros and groups, where I'd need collapse/expand most. Any way to make it work there? With my level of understanding, I don't see anything in the code itself that limits it to tokens, so I guess it's something inherent to one or more of the functions used and thus nothing can be done?
3) The more macros there are in a group, the slower it gets, I presume due to retrieving all the properties of all the macros and then running the foreach().
If it could be implemented as a built-in feature for MapTool, I guess it could run smoother with no issues.
Re: Collapsible macro groups and macro subgroups
Campaign Window does have a GM tab which I find help splits off things players don't need to see. The BoT by wolph42 also has a pseudo button frame that can create and display just a group of buttons. I imagine that could be used to create a menu of groups to traverse your group macros.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools