Update: The current version of ENView contains work by pancelor, NuSan, and myself. I'll try to keep it up to date so that load #enview
will always give you the best version, but do scroll this thread for more info as I'm often late to keep things updated!
The largest part of this work is based on pancelor's api explorer
It has some improvements like sub-tables being sorted, and not printing text above/below the screen.
Also I made some style changes to try and get it to gel with the OS as a windowed app.
I'd like to have it so clicking on a function shows you what parameters it expects, but honestly I have no idea if that's a thing you can even query in lua.
I may hard-code stuff so it gives an authored explanation of each item and how to use it, but right now it just lists the stuff and nothing else.
anyway I'm still very much learning picotron (which is why I wanted a nice API list I can quickly check in the GUI) so things might not be ideal.
it looks super clean! I think it would be cool if the first table (_ENV) was already unfolded, one less click when starting it!
Another things that would be very useful is a text filter at the top of the window, so you type the name of the function you want and it only display matching results
I released earlier a little test cart to find the parameters of the functions (it only works on lua defined ones, so not everything, but it's a start) also it can show the source code
https://www.lexaloffle.com/bbs/?tid=140783
My interface is a lot less clean than yours and I don't think I will continue working on it, so feel free to check how it uses hooks to get the parameters if you want to integrate that
Thank you so much Sophie! Having this as a desktop app really helps.
Just a heads up for anyone having trouble loading the app: rename it from "enview-0.p64.png" to "enview0.p64.png". For some reason picotron fails to load carts with a "-"
Amazing application, thank you so much 🌟🌻
Update!
- Arguments listed for Lua functions
- clicking an item shows simple info about it
- slightly tidier UI
- _ENV starts opened
- no longer lists its own functions
I did start adding a search bar but then commented it out - I really don't want to have to code typing stuff rn lol
Being able to display the arguments is 100% thanks to NuSan, no way I'd have any idea how to have made that work myself!
as for what next:
- Search/filter if I can find the energy
- option to view source of lua functions/properties like in NuSan's function tool (maybe in a pop-out window, if possible)
It works really great!
Some functions takes a variable number of arguments, and you have the info in the variable "isvararg", so for example you can display the function "stop(txt, ...)"
I can't take full credits for the code to get the arguments, I mostly searched online for lua examples around this topic and messed around with it until it worked. I was super surprised to find the source code there, that was a nice bonus :D
Thanks for mentioning variable arguments, I hadn't even thought of that. I'm starting to think I'm missing the wood for the trees with that kind of oversight lol.
anyway, there's an update!
- Variable arguments are now listed (thx NuSan!)
- Added menu item to refresh tables
- Window has title and opens centered
- Mouse and scroll inputs ignored if window isn't focused
- List sorting ignores case (unless items are equivalent)
- Attempts to display source
it's a little embarrasing that after all this work I've still not got all the functionality of the apps I'm basing it off (and modifying the code of). I think I'm just way out of my comfort zone working on something like this.
As for what next, I think either I'll try to come up with a way to get info on the C functions (like pulling it from pico-8 docs somewhere) or... I'll just stop. I should be doing other things tbh!
Hello, I have a suggestion for a possible improvement: the argument workspace
allows you to determine in some way where to place the workspace. current
will make the window pop in the current workspace (the current screen
or fullscreen app).
For instance I edited your cart to add workspace="current",
in the window's arguments and placed it in the tooltray. Thus, if I need to check the API, I can just drop the tray, open ENView and it'll just pop over my code and not on the desktop!
For reference, the window creation looks now like that
window { x=flr(0.5*(480-enview.display_w)), y=flr(0.5*(270+20-enview.display_h)), width = enview.display_w, height = enview.display_h, workspace = "current", title = "ENView", resizeable = true } |
Quick update to add Eiyeron's suggestion, and fix broken fetch() stuff since I was using the wrong function for it.
I can't seem to get it to open in the tooltray/desktop2.
Not sure if this is a linux specific difference (or broken in the 0.1.0d version in general). I'm noticing several slight differences in functionality when switching between my windows computer and Steam Deck.
If only there was a way to see what functions do and whether or not they are deprecated...
very cool tool to have. :)
anyway i got an error, while browsing through the "string" list:
In Picotron 0.1.0f on Windows 10
and if it's relevant, i've set PicoPhone on desktop2 and a slightly altered version of pong set as wallpaper.
Hi! I made a GUI library, and it has a very simple text input box if you want to use it: https://www.lexaloffle.com/bbs/?tid=141913
This app is fantastic -- I'm so happy to see my initial sketch improved so much!
I've added a search bar and done a few bugfixes / speedups (including a refactor to mostly use picotron's gui system). Sophie, feel free to reupload this as enview-4 (if you want to)
edit: the web player looks like its running the wrong cart entirely, odd. but load #enview_search
works for me -- you should see a search bar at the top of the app, visible always
(the app always opens on the desktop, but you can easily make it open in the current workspace by editing the top of src/game.lua if you'd prefer that. just change open_in_current_workspace=false
to true)
Woa thanks! I've only skimmed it so far but it looks like you've done a bunch of really good (and necessary!) work. I have made your version the main #enview (with the change of making it open in the current workspace, thanks for making that easy!)
I'd like to add a couple more things myself once I get back to picotron devving (a scroll bar for one. The picotron one would lose the smooth scroll inertia, but usability trumps that IMO. maybe I could hack it to have both? Either way I'm too busy with other things rn).
Anyway, thanks again, this is absolutely the version staying in my second desktop for the forseeable! :)
A scroll bar is a great idea! I meant to add that but forgot. Here, I've updated it with a scrollbar:
So, not sure if this is still being worked on, but I thought I'd point out that the debug, coroutine, math, string, table, and utf8 modules are all based on the Lua 5.4 standard library (as mentioned in the picotron specs). There's also couple from the 5.4 "basic functions" section as well. If you want to know what the arguments for them are, the reference manual would be the best source.
[Please log in to post a comment]