Compare commits
3 Commits
0ad907f74a
...
5c1b142630
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c1b142630 | |||
| ec00115216 | |||
| fd1428c749 |
2
REDME.md
2
REDME.md
@@ -33,4 +33,4 @@ You could use minecraft to run the programm or you could use [craftos pc](https:
|
||||
## Websconsole
|
||||
|
||||
Use `make webconsole` to run a http server that prints the log output of the programm to the terminal. Run `haxe` with the `-D webconsole` flag.
|
||||
|
||||
You may need to [allow connections](https://github.com/cc-tweaked/CC-Tweaked/wiki/Allowing-access-to-local-IPs) to any ip when using webconsole ingame.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package kernel;
|
||||
|
||||
import cc.OS;
|
||||
import util.Debug;
|
||||
import kernel.ui.WindowManager;
|
||||
import kernel.peripherals.Peripherals.Peripheral;
|
||||
@@ -13,9 +14,14 @@ class Init {
|
||||
|
||||
WindowManager.instance = new WindowManager();
|
||||
MainTerm.instance = new MainTerm();
|
||||
Log.init();
|
||||
Net.instance = new Net();
|
||||
|
||||
Log.init();
|
||||
|
||||
// Register default terminate handler
|
||||
KernelEvents.instance.onTerminate.handle(_->{
|
||||
OS.reboot();
|
||||
});
|
||||
|
||||
Debug.printBuildInfo();
|
||||
}
|
||||
|
||||
9
src/kernel/ui/Pixel.hx
Normal file
9
src/kernel/ui/Pixel.hx
Normal file
@@ -0,0 +1,9 @@
|
||||
package kernel.ui;
|
||||
|
||||
import util.Color;
|
||||
|
||||
@:structInit class Pixel {
|
||||
public var char:String;
|
||||
public var bg:Color;
|
||||
public var textColor:Color;
|
||||
}
|
||||
@@ -6,12 +6,6 @@ import util.Vec.Vec2;
|
||||
import util.Color;
|
||||
import lib.TermWriteable;
|
||||
|
||||
@:structInit class Pixel {
|
||||
public var char:String;
|
||||
public var bg:Color;
|
||||
public var textColor:Color;
|
||||
}
|
||||
|
||||
class TermBuffer implements TermWriteable {
|
||||
/**
|
||||
format [y][x]. First index is the line. Second index the char in the line.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package lib.ui;
|
||||
|
||||
import util.Vec.Vec2;
|
||||
import kernel.ui.TermBuffer.Pixel;
|
||||
import kernel.ui.Pixel;
|
||||
|
||||
abstract Canvas(Array<Array<Pixel>>) to Array<Array<Pixel>> {
|
||||
inline public function new() {
|
||||
|
||||
Reference in New Issue
Block a user