Log In  

Cart #picoterm_v1-8 | 2022-05-01 | Code ▽ | Embed ▽ | No License
4

PicoTerm is a simple PICO-8 CLI template. It can be used as a basis for command-line games and programs.

To get commands, modify execute() with your command handling code. To print a line, use echo().

If you use this in a project please credit DivergentClouds and link back to this page. (I would also appreciate being notified, however, that is not mandatory)

Changelog:
1.8

  • Fixed bug where cpu usage would skyrocket with enough lines

1.7

  • Fixed bug where line wrapping wouldn't work if a previous line had been wrapped

1.6

  • Major line wrapping bug fixed
  • Fixed pressing ESC sometimes printing a dot

1.5

  • Fixed bug where the cursor would persist at the start of a line after pressing return

1.4

  • Added blinking cursor

1.3

  • Prohibited glyph characters in input to prevent doublewide characters from messing up the screen scrolling

1.2

  • Made it so that the prompt is mixed in with the log rather than being stuck at the bottom of the screen

1.1

  • Made it so pressing ESC won't print a character

1.0

  • Released

Known Issues:

  • Minor: Backspacing on an empty line moves the cursor backwards for a frame regardless

License:
BSD 3-Clause

P#93811 2021-06-21 17:28 ( Edited 2022-05-01 04:49)

1

May use this for a future project -- neat!

P#93833 2021-06-21 22:30

epicccc

P#99290 2021-10-28 23:10

Cursor ?

P#99298 2021-10-29 04:16

@dw817 unfortunately, a moveable cursor wouldn't be easy to implement into the existing codebase, however, you are free to modify this as long as you credit and link back here.

P#99460 2021-11-01 11:46
1

You are using some advanced programming in here that I'm not familiar with, @FlowingLily. The FOREACH for instance. I have your cursor, it's just kinna clumsy the way I did it.

Cart #pegeruweyi-0 | 2021-11-01 | Code ▽ | Embed ▽ | No License
1

Is there a way to have:

foreach(log,ycursor=ycursor+1)

?

P#99473 2021-11-01 18:02

@dw817, sorry, I just saw this, I misunderstood what you meant by "cursor", I thought you wanted to be able to move the cursor with the arrow keys, I'll try and implement one soon.

P#109875 2022-04-07 19:52

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-02-08 19:32:06 | 0.024s | Q:30