BIG FORMATING COMMIT

This commit is contained in:
2023-07-30 15:55:22 +02:00
parent 088fce0aaa
commit 91972107eb
103 changed files with 1610 additions and 1585 deletions

View File

@@ -10,7 +10,7 @@ class Printer implements IPeripheral {
private final native:cc.periphs.Printer.Printer;
private final addr:String;
public function new(addr: String) {
public function new(addr:String) {
this.native = Peripheral.wrap(addr);
this.addr = addr;
}
@@ -23,36 +23,34 @@ class Printer implements IPeripheral {
return TYPE_NAME;
}
public function write(text: String){
public function write(text:String) {}
}
public function getCurserPos(): Pos {
public function getCurserPos():Pos {
return new Pos({x: 0, y: 0});
}
public function setCurserPos(pos: Pos){
public function setCurserPos(pos:Pos) {
this.native.setCursorPos(pos.x, pos.y);
}
public function getPageSize(): Rect {
public function getPageSize():Rect {
var pos = this.native.getPageSize();
return new Rect({x: 0, y: 0}, {x: pos.x, y: pos.y});
}
public function newPage(): Bool{
public function newPage():Bool {
return this.native.newPage();
}
public function endPage(): Bool{
public function endPage():Bool {
return this.native.endPage();
}
public function setPageTitle(title: String){
public function setPageTitle(title:String) {
this.native.setPageTitle(title);
}
public function getInkLevel(): Float{
public function getInkLevel():Float {
return this.native.getInkLevel();
}