Open Devinish opened 1 year ago
Thanks for posting, these are really good ideas. I havent looked at this area of the api in a while so maybe there is something that can be done now on this
In the meantime, you can maybe use TAB to show/hide the inventory
So after searching I was able to find a function that is equivalent to the down button which appears after you have focused on a folder level: Editor.EditorInterface.Childs["FrameMain"].Childs["FrameInventories"].Childs["ButtonInventoryDown"].OnAction()
.
How to focus the folder level is still eluding me, though.
Ok, so this is the action to go one folder level down? could you loop through it until there's no more folder levels to go through?
Sorry that was poorly phrased. I mean that method is what you get when you click this button
Im still trying to find out if openplanet has hooks in the right places to be able to focus the inventory on a level
Clicking (selecting) inventory items can be done like so: https://github.com/XertroV/tm-editor-plus-plus/blob/1a70468071775e0cae91d5adcef40a9d1dbf66ab/src/Components/Inventory/List.as#L63-L68
FYI I will probs expose this in E++ (via exports).
Yeah, we do already have something like that implemented. Curious to see what you do with it tho!
@skybaks here's how to set the number of hidden folders:
// 0 = show all. 1 = hide 1 level. 2 = hide 2 levels. If set to more than the available number of levels it will reset to 0;
void SetInventoryHiddenFolderDepth(CGameEditorGenericInventory@ inventory, uint8 v) {
Dev::SetOffset(inventory, 0x1E8, v);
}
I havent had a chance to play with this yet but it certainly is intriguing. I'm not sure I want to introduce the Dev api into this plugin, though, for the dual reasons that I dont really have the expertise to maintain it and I am uncomfortable with the instability it could introduce if not maintained.
This is a combination of 2 related problem statements, which can potentially be solved in several different ways.
Problem 1 When I go to change my editing tool at the bottom bar (or any time I move my mouse around and accidentally hover over a folder), the folders I move past automatically open, cluttering up my vision in the editor.
Problem 2 When picking a block using the Picker tool, picking it automatically expands the folder tree to that object, cluttering my vision in the editor.
Some potential, non-mutually exclusive solutions to these problems, in no particular order:
I'm sure there are plenty of other solutions to these problems. Thanks for your consideration.