CC: Tweaked

CC: Tweaked

42M Downloads

Improved help viewer for CraftOS

SquidDev opened this issue · 4 comments

commented

This is an old issue (dan200/ComputerCraft#212), but the in-game help viewer is ... somewhat lacklustre. I realise it doesn't get much use, but it'd be nice to have something with a few basic features:

  • Pagination/scrolling
  • Section support (for instance, see ghv).
  • Very basic markdown support (probably only for files with an .md extension). Ideally we'd just be able to style sections, bulleted lists (replace -/* with ) and style bold/italics/code slightly differently.
commented

GHV's source code seems to have been deleted from github (so the forum has a dead link) and is not in Admicos' archive sites.

commented

I'd definitely be happy to use ghv's code as a base - goodness knows UI code is a pain to write from scratch :). I think the flickering issues were fixed in more recent versions, but sadly the paste was never updated. If we could get in touch with Admicos and get permission (and the more recent version), that would be wonderful.

commented

Why not putting ghv into CraftOS? With permission fro Admicos of curse. It's a great program and I had already used it for a few helpfiles.

commented

@MCJack123 Has some done some wonderful work in the above PR. There's a couple of less important things it's probably worth doing:

  • Sections - like ghv, I imagine we can pick up lines starting with ^#+ and mark them as sections. Then left/right just move to the next/previous section.

  • As in the OP, might be nice to have some basic MD support. But not vital.

  • Optimise! It's not important for 90% of files, but help changelog is slow (~4s in copy-cat, though that's obviously much slower than in-game).

    Honestly not sure what to do here - only obvious solution I see is to make the word wrapping lazy. You'd only wrap up to the bottom of the screen, suspend it, and then resize the window and resume wrapping when people scrolled.