Method | Description | |
---|---|---|
Awake ( ) : void | ||
ClearScreen ( ) : void | ||
Close ( ) : void | ||
DetachAllTelnets ( ) : void | ||
GetFocus ( ) : void | ||
GetRect ( ) : |
||
GetSoundMaker ( ) : kOS.Safe.Sound.ISoundMaker | ||
LoadTexture ( String relativePath, |
||
LoseFocus ( ) : void | ||
NumTelnets ( ) : int | ||
OnDestroy ( ) : void | ||
Open ( ) : void | ||
OpenPopupEditor ( kOS.Persistence.Volume v, GlobalPath path ) : void | ||
Print ( string str ) : void | ||
ProcessOneInputChar ( char ch, TelnetSingletonServer whichTelnet, bool doQueuing = true ) : void |
Respond to one single input character in Unicode, using the pretend virtual Unicode terminal keycodes described in the UnicodeCommand enum. To keep things simple, all key input is coerced into single Unicode chars even if the actual keypress takes multiple characters to express in its native form (i.e. ESC [ A means left-arrow on a VT100 terminal. If a telnet is talking via VT100 codes, that ESC [ A will get converted into a single UnicdeCommand.LEFTCURSORONE character before being sent here.)
|
|
TermWindow ( ) : System | ||
Toggle ( ) : void |
Method | Description | |
---|---|---|
AdjustColor ( Color baseColor, float brightness ) : Color | ||
CheckResizeDrag ( ) : void | ||
DrawTelnetStatus ( ) : void |
Draw a little status line at the bottom as a reminder that you are sharing the terminal with a telnet session:
|
Method | Description | |
---|---|---|
AttachTelnet ( TelnetSingletonServer server ) : void | ||
AttachTo ( SharedObjects sharedObj ) : void | ||
Beep ( ) : bool |
Attempts to make Unity start a playthrough of the beep audio clip. The playthrough will continue on its own in the background while the rest of the code continues on. It will do nothing if the previous beep is still being played. (We only gave ourselves one audio beep source per GUI terminal so we can't play beeps simultaneously.)
|
|
BuildPanelSkin ( ) : |
||
CalcualteTitle ( ) : string | ||
ChangeTitle ( string newTitle ) : void | ||
DetachTelnet ( TelnetSingletonServer server ) : void | ||
GetNewestBuffer ( ) : void |
Get the newest copy of the screen buffer once, for use in all calculations for a while. This was added when telnet clients were added. The execution cost of obtaining a buffer snapshot from the ScreenBuffer class is non-trivial, and therefore shouldn't be done over and over for each telnet client that needs it within the span of a short time. This gets it once for all of them to borrow. All calls will re-use this copy for a while, until the next terminal refresh (1/20th of a second, at the moment).
|
|
HowManyColumnsFit ( ) : int | ||
HowManyRowsFit ( ) : int | ||
LoadAudio ( ) : void | ||
LoadFontArray ( ) : void | ||
Lock ( ) : void | ||
NotifyOfScreenResize ( IScreenBuffer sb ) : int | ||
OnGUI ( ) : void | ||
OnHideUI ( ) : void | ||
OnShowUI ( ) : void | ||
ProcessKeyEvents ( ) : void |
Process the GUI event handler key events that are being seen the by GUI terminal, by translating them into values from the UnicodeCommand enum first if need be, and then passing them through to ProcessOneInputChar().
|
|
ProcessTelnetInput ( ) : void |
Read all pending input from all telnet clients attached and process it all. Hopefully this won't bog down anything, as we don't expect to get lots of chars at once from keyboard input in a single update. The amount of characters pending in the queues should be very small since this is flushing it out every update. It could potentially be large if someone does a big cut-n-paste into their terminal window and their telnet client therefore sends a wall of text within the span of one Update(). Premature optimization is bad, so we'll wait to see if that is a problem later.
|
|
ProcessUnconsumedInput ( ) : void |
When the input queue is not empty and the program or command is done such that the input cursor is now all the way back to the interpreter awaiting new input, send that queue out to the interpreter. This allows you to type the next command blindly while waiting for the previous one to finish. This is how people used to terminals would expect things to work.
|
|
RepaintTelnet ( TelnetSingletonServer telnet, bool fullSync ) : void |
Do the repaint of the telnet session.
|
|
RepaintTelnetFull ( TelnetSingletonServer telnet ) : void |
Cover the case where the whole screen needs to be repainted from scratch.
|
|
ResizeAndRepaintTelnet ( TelnetSingletonServer telnet, int width, int height, bool unconditional ) : void |
Tell the telnet session to resize itself
|
|
SendTitleToTelnet ( TelnetSingletonServer telnet ) : void | ||
ShowCharacterByAscii ( char ch, int x, int y, bool reversingScreen, int charWidth, int charHeight, float brightness ) : void | ||
SpecialKey ( char key, bool doQueuing = true ) : void | ||
TelnetOutputUpdate ( ) : void | ||
TerminalGui ( int windowId ) : void | ||
Type ( char ch, bool doQueuing = true ) : void | ||
Unlock ( ) : void | ||
Update ( ) : void | ||
UpdateGUIBeeps ( ) : void |
protected AdjustColor ( Color baseColor, float brightness ) : Color | ||
baseColor | Color | |
brightness | float | |
return | Color |
public GetSoundMaker ( ) : kOS.Safe.Sound.ISoundMaker | ||
return | kOS.Safe.Sound.ISoundMaker |
public LoadTexture ( String relativePath, |
||
relativePath | String | |
targetTexture | ||
return | void |
public OpenPopupEditor ( kOS.Persistence.Volume v, GlobalPath path ) : void | ||
v | kOS.Persistence.Volume | |
path | GlobalPath | |
return | void |
public ProcessOneInputChar ( char ch, TelnetSingletonServer whichTelnet, bool doQueuing = true ) : void | ||
ch | char | The character, which might be a UnicodeCommand char |
whichTelnet | TelnetSingletonServer | If this came from a telnet session, which one did it come from? /// Set to null in order to say it wasn't from a telnet but was from the interactive GUI |
doQueuing | bool | true if the keypress should get queued if we're not ready for it /// right now. If false, then the keypress will be ignored if we're not ready for it. |
return | void |