1610 posts
Posted 03 December 2015 - 12:59 AM
I got tired of using OpenPeripheral's built-in 'doc' program, so I wrote opdoc! It's a useful program that uses
Flare to give you a nice, clean GUI for browsing the peripheral documentation in-game.

When you run opdoc, you'll see a bar at the top of the screen containing all attached peripherals that are supported by OpenPeripheral. Selecting one from this list will give you a list of its methods, as seen in the screenshot. Selecting a method will give you the description, arguments, and return information for that method. Here's a quick gif of it in action:
Much better than the built-in program, eh? The scrollbars are particularly useful for reading the documentation for methods with a lot of arguments.
You can download the program like so:
pastebin get 3NPXAasm opdoc
When you run it, it will automatically detect all compatible peripherals, and from there on it's pretty easy to figure out.
Edited on 03 December 2015 - 12:09 AM
7083 posts
Location
Tasmania (AU)
Posted 03 December 2015 - 01:51 AM
Oh hey, that's pretty cool. Source's surprisingly short, too, which speaks well of Flare.
FWIW, these days running "/op_dump" in chat creates an HTML dump of all OpenP functionality "currently available" into your install folder. But I'm really liking the presentation you've got here; a bit of decent colouring and formatting goes a long way towards making information easy to sift through.
1610 posts
Posted 03 December 2015 - 02:26 AM
Oh hey, that's pretty cool. Source's surprisingly short, too, which speaks well of Flare.
FWIW, these days running "/op_dump" in chat creates an HTML dump of all OpenP functionality "currently available" into your install folder. But I'm really liking the presentation you've got here; a bit of decent colouring and formatting goes a long way towards making information easy to sift through.
Yeah, I could have probably reduced the source to 60 or so lines had I been more familiar with Flare, this is pretty much my first project with it. I didn't know about the op_dump command, but this could still be useful for people who prefer to stay within CC.
797 posts
Posted 04 December 2015 - 02:01 PM
Oooh, this looks really nice and slick. I love the colouration, and it's good to see Flare getting some use too. It might be worth setting `button.noAlign` to true for the buttons in the function list though, it looks a little weird with them all centre aligned.
1610 posts
Posted 04 December 2015 - 07:27 PM
Oooh, this looks really nice and slick. I love the colouration, and it's good to see Flare getting some use too. It might be worth setting `button.noAlign` to true for the buttons in the function list though, it looks a little weird with them all centre aligned.
Ah, I hadn't seen that.
Also, while trying to make the containers slide in/out with transitionInRight and the other functions, the containers would seem to stop 1 pixel early - they should have been at (1,1) but they would end up at (0,1) when sliding in from the left or (2,1) when sliding in from the right.
5 posts
Posted 25 December 2015 - 12:45 PM
This is amazing, very well done. I wish the built in way was something like this.
1610 posts
Posted 28 December 2015 - 07:40 PM
This is amazing, very well done. I wish the built in way was something like this.
Thanks! The built-in documentation is pretty basic, which is why I made this :)/>
2 posts
Posted 08 March 2016 - 04:35 AM
I absolutely <heart> this!
a table browser to call those functions and review results would be uber-fabulous.
779 posts
Location
Kerbin
Posted 25 March 2016 - 09:07 AM
What is the license for redistributing a modified version?
1610 posts
Posted 29 March 2016 - 03:09 AM
What is the license for redistributing a modified version?
You can do whatever you want as long as you don't hold me liable for anything and provide attribution.
Edited on 29 March 2016 - 01:10 AM