There’s no changes in functionality. I didn’t touch your code at all.
Added type definitions everywhere I could. Some of the types might be inaccurate. This might invoke some more yellow squiggles in the code sheet, in cases where the uses of functions is inconsistent - maybe due to bugs, maybe due to mistakes on my part…
Updated a bunch of types in Types.lua. In vscode, if you highlight the name of a type and search find usages or go to definition in the command palette, the uses of the type should appear - this is useful if you want to double check that everything is accurate.
ImGui_Selectable takes three params instead of two, so I added the third param false. In practice, passing only two params shouldn’t be a problem (if third param is nil it can be evaluated as false) but I added the third one for consistency’s sake.
Added some commented TODOs wherever some stuff was unclear or required some attention. Typically for unused functions, duplicate code and whatnot. If you search for TODO in vscode, you should be able to see it as a list.
Very few formatting changes here and there.
The EQ functions.lua: I couldn’t figure out the types of the data. Maybe that would be something for you to do, if you’re interested. That would be valuable to make the code easier to understand - and re-use in other plugin scripts.
Side note: I updated the reascript vscode extension to fix some of the function definitions. So some of the annoying inaccurate warnings like «can’t assign number to ReaProject» will be taken care of from now on, and the ImGui function declarations should be a little more reliable.
What’s next:
I’ll be traveling and sparsely contributing through the month of October.
I’d like to add some documentation comments to the type hints. Might be tricky for me, since it requires a deeper understanding of the whole picture.
It would be cool to start thinking about how to fix the undeclared global variables. A lot of globals are getting assigned before being declared (particularly font names) - which makes it difficult to keep track of who does what in the code.
Hi Bryan,
Here’s some changes following my previous PR.
Types.lua
. In vscode, if you highlight the name of a type and searchfind usages
orgo to definition
in the command palette, the uses of the type should appear - this is useful if you want to double check that everything is accurate.ImGui_Selectable
takes three params instead of two, so I added the third paramfalse
. In practice, passing only two params shouldn’t be a problem (if third param isnil
it can be evaluated asfalse
) but I added the third one for consistency’s sake.TODO
in vscode, you should be able to see it as a list.EQ functions.lua
: I couldn’t figure out the types of the data. Maybe that would be something for you to do, if you’re interested. That would be valuable to make the code easier to understand - and re-use in other plugin scripts.Side note: I updated the reascript vscode extension to fix some of the function definitions. So some of the annoying inaccurate warnings like «can’t assign number to ReaProject» will be taken care of from now on, and the ImGui function declarations should be a little more reliable.
What’s next:
TTYS, enjoy!