changed how we handle colors

This commit is contained in:
2022-03-12 21:48:09 +01:00
parent aee8c0fd3c
commit 35be02dbe2
8 changed files with 37 additions and 128 deletions

View File

@@ -158,8 +158,8 @@ class TermBuffer implements TermWriteable {
return currentTextColor;
}
public function setTextColor(colour:Color) {
currentTextColor = colour;
public function setTextColor(color:Color) {
currentTextColor = color;
}
public function getBackgroundColor():Color {

View File

@@ -31,12 +31,12 @@ interface TermWriteable {
public function clear():Void;
public function clearLine():Void;
public function getTextColor():Color;
public function setTextColor(colour:Color):Void;
public function setTextColor(color:Color):Void;
public function getBackgroundColor():Color;
public function setBackgroundColor(color:Color):Void;
public function isColor():Bool;
// public function setPaletteColor(...);
// public function getPaletteColor(colour);
// public function getPaletteColor(color);
/**
Clears the screen, resetes the courser to (0,0) and resetes the color to Black and White.

View File

@@ -150,12 +150,12 @@ class VirtualTermWriter implements TermWriteable extends TermBuffer {
return super.getTextColor();
}
public override function setTextColor(colour:Color) {
public override function setTextColor(color:Color) {
if (isEnabled()) {
target.setTextColor(colour);
target.setTextColor(color);
}
super.setTextColor(colour);
super.setTextColor(color);
}
public override function getBackgroundColor():Color {

View File

@@ -114,8 +114,8 @@ class WindowContext implements TermWriteable {
return writer.getTextColor();
}
public function setTextColor(colour:Color) {
writer.setTextColor(colour);
public function setTextColor(color:Color) {
writer.setTextColor(color);
}
public function getBackgroundColor():Color {