renamed Pos and Pos3

This commit is contained in:
2024-10-14 21:40:26 +02:00
parent 08f41ccb0b
commit e0f8d274e7
25 changed files with 236 additions and 131 deletions

View File

@@ -1,6 +1,6 @@
package kernel.ui;
import lib.Pos;
import lib.ScreenPos;
import lib.Vec.Vec2;
import lib.Color;
import kernel.ui.ITermWriteable;
@@ -18,7 +18,7 @@ class TermBuffer implements ITermWriteable {
**/
private var screenBuffer:Array<Array<Pixel>>;
private var cursorPos:Pos = {x: 0, y: 0};
private var cursorPos:ScreenPos = {x: 0, y: 0};
private var currentTextColor:Color = White;
private var currentBgColor:Color = Black;
private var cursorBlink:Bool = false;
@@ -91,7 +91,7 @@ class TermBuffer implements ITermWriteable {
target.setCursorBlink(cursorBlink);
}
private function safeWriteScreenBuffer(pos:Pos, char:String) {
private function safeWriteScreenBuffer(pos:ScreenPos, char:String) {
if (screenBuffer.length > pos.y && screenBuffer[pos.y].length > pos.x) {
screenBuffer[pos.y][pos.x].char = char;
screenBuffer[pos.y][pos.x].bg = currentBgColor;
@@ -121,7 +121,7 @@ class TermBuffer implements ITermWriteable {
]);
}
public function getCursorPos():Pos {
public function getCursorPos():ScreenPos {
return cursorPos;
}