Open
Description
I propose the following additions (and would be willing to implement them after christmas):
- Expose the terminal cursor as additional suffixes of
terminal
cursorcol
- get returns
ScreenBuffer.CursorColumn
- set calls
ScreenBuffer.MoveCursor(ScreenBuffer.CursorRow, arg)
- get returns
cursorrow
- get returns
ScreenBuffer.CursorRow
- set calls
ScreenBuffer.MoveCursor(arg, ScreenBuffer.CursorColumn)
- get returns
- Create a way to print a string at the current cursor, moving the cursor, but without the newline appended by
print
- How about
put
? Traditionally, that would only output a character, but kOS doesn't differentiate between the two anyway- Even if this becomes a suffix of terminal, I'm against calling it
print
to avoid confusion.
- Even if this becomes a suffix of terminal, I'm against calling it
- as a builtin or as a suffix for terminal?
- a builtin would fit with
print
andprint at
being builtins - a suffix for
terminal
would avoid increasing the number of builtins potentially colliding with user identifiers. I could createprintln
andprintat
suffixes as well to keep consistency (keeping theprint
builtins obviously, because we don't want to break everything)
- a builtin would fit with
- How about
This would enable user build prompts to play nice with regular print
output. Also, this would enable a user to work around problems like #1007. On a personal note, I want to get into kOS plugin development, and these additions would be useful for a kerboscript project of mine.
(Why not build a script-side screenbuffer using print at
for output? Because then any script that wants to print output needs to know and use that because regular print
would mangle it. And I'm trying to limit interdependencies like that.)
Metadata
Assignees
Labels
No labels