From fd1428c749d1de6d4025b226a021e3bf38cd6179 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Mon, 21 Feb 2022 17:04:36 +0100 Subject: [PATCH] moved pixel --- src/kernel/ui/Pixel.hx | 9 +++++++++ src/kernel/ui/TermBuffer.hx | 6 ------ src/lib/ui/Canvas.hx | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 src/kernel/ui/Pixel.hx diff --git a/src/kernel/ui/Pixel.hx b/src/kernel/ui/Pixel.hx new file mode 100644 index 0000000..1e5e78c --- /dev/null +++ b/src/kernel/ui/Pixel.hx @@ -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; +} diff --git a/src/kernel/ui/TermBuffer.hx b/src/kernel/ui/TermBuffer.hx index 1ad7dfa..098eea2 100644 --- a/src/kernel/ui/TermBuffer.hx +++ b/src/kernel/ui/TermBuffer.hx @@ -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. diff --git a/src/lib/ui/Canvas.hx b/src/lib/ui/Canvas.hx index df9c074..18500b4 100644 --- a/src/lib/ui/Canvas.hx +++ b/src/lib/ui/Canvas.hx @@ -1,7 +1,7 @@ package lib.ui; import util.Vec.Vec2; -import kernel.ui.TermBuffer.Pixel; +import kernel.ui.Pixel; abstract Canvas(Array>) to Array> { inline public function new() {