Compare commits
2 Commits
8318cc5c21
...
daff654867
| Author | SHA1 | Date | |
|---|---|---|---|
| daff654867 | |||
| 242db10083 |
@@ -28,8 +28,6 @@ class Init {
|
||||
|
||||
Debug.printBuildInfo();
|
||||
|
||||
Log.moveToOutput("main");
|
||||
|
||||
Routing.instance.init();
|
||||
|
||||
MainLoop.add(()->{
|
||||
|
||||
@@ -94,4 +94,11 @@ class MainTerm implements TermWriteable {
|
||||
public function isColor():Bool {
|
||||
return Term.isColor();
|
||||
}
|
||||
|
||||
public function reset() {
|
||||
this.setBackgroundColor(Black);
|
||||
this.setTextColor(White);
|
||||
this.clear();
|
||||
this.setCursorPos(0,0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ class Net {
|
||||
|
||||
pack.ttl--;
|
||||
|
||||
if (sendRaw(pack)){
|
||||
if (!sendRaw(pack)){
|
||||
// Cant forward
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,4 +108,11 @@ class Screen implements TermWriteable implements IPeripheral {
|
||||
public function isColor():Bool {
|
||||
return nativ.isColor();
|
||||
}
|
||||
|
||||
public function reset() {
|
||||
this.setBackgroundColor(Black);
|
||||
this.setTextColor(White);
|
||||
this.clear();
|
||||
this.setCursorPos(0,0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,4 +166,11 @@ class TermBuffer implements TermWriteable {
|
||||
public function isColor():Bool {
|
||||
throw new haxe.exceptions.NotImplementedException();
|
||||
}
|
||||
|
||||
public function reset() {
|
||||
this.setBackgroundColor(Black);
|
||||
this.setTextColor(White);
|
||||
this.clear();
|
||||
this.setCursorPos(0,0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,4 +124,8 @@ class WindowContext implements TermWriteable {
|
||||
public function isColor():Bool {
|
||||
return writer.isColor();
|
||||
}
|
||||
|
||||
public function reset() {
|
||||
writer.reset();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,4 +36,9 @@ interface TermWriteable {
|
||||
public function isColor():Bool;
|
||||
// setPaletteColor(...)
|
||||
// getPaletteColor(colour)
|
||||
|
||||
/**
|
||||
Clears the screen, resetes the courser to (0,0) and resetes the color to Black and White.
|
||||
**/
|
||||
public function reset():Void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user