From d0670325f248a84e24a5ebaed3ff96a7f302d37d Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Mon, 20 Mar 2023 19:09:07 +0100 Subject: [PATCH] windowContext inlined the TermWriteable functions --- src/kernel/ui/WindowContext.hx | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/kernel/ui/WindowContext.hx b/src/kernel/ui/WindowContext.hx index 4895597..bc9a01e 100644 --- a/src/kernel/ui/WindowContext.hx +++ b/src/kernel/ui/WindowContext.hx @@ -62,82 +62,82 @@ class WindowContext implements TermWriteable { public var onResize(default, null):Signal>; @:allow(kernel.ui) - private function setTarget(target:TermWriteable) { + private inline function setTarget(target:TermWriteable) { writer.setTarget(target); } @:allow(kernel.ui) - private function enable() { + private inline function enable() { writer.enable(); } @:allow(kernel.ui) - private function disable() { + private inline function disable() { writer.disable(); } @:allow(kernel.ui) - private function isEnabled() { + private inline function isEnabled() { return writer.isEnabled(); } - public function write(text:String) { + public inline function write(text:String) { writer.write(text); } - public function scroll(y:Int) { + public inline function scroll(y:Int) { writer.scroll(y); } - public function getCursorPos():Pos { + public inline function getCursorPos():Pos { return writer.getCursorPos(); } - public function setCursorPos(x:Int, y:Int) { + public inline function setCursorPos(x:Int, y:Int) { writer.setCursorPos(x, y); } - public function getCursorBlink():Bool { + public inline function getCursorBlink():Bool { return writer.getCursorBlink(); } - public function setCursorBlink(blink:Bool) { + public inline function setCursorBlink(blink:Bool) { writer.setCursorBlink(blink); } - public function getSize():Vec2 { + public inline function getSize():Vec2 { return writer.getSize(); } - public function clear() { + public inline function clear() { writer.clear(); } - public function clearLine() { + public inline function clearLine() { writer.clearLine(); } - public function getTextColor():Color { + public inline function getTextColor():Color { return writer.getTextColor(); } - public function setTextColor(color:Color) { + public inline function setTextColor(color:Color) { writer.setTextColor(color); } - public function getBackgroundColor():Color { + public inline function getBackgroundColor():Color { return writer.getBackgroundColor(); } - public function setBackgroundColor(color:Color) { + public inline function setBackgroundColor(color:Color) { writer.setBackgroundColor(color); } - public function isColor():Bool { + public inline function isColor():Bool { return writer.isColor(); } - public function reset() { + public inline function reset() { writer.reset(); } @@ -145,7 +145,7 @@ class WindowContext implements TermWriteable { Delegate events to an UIEventDelegate. Set to null to stop delegating events. **/ - public function delegateEvents(delegate: Null){ + public inline function delegateEvents(delegate: Null){ this.eventDelegate = delegate; } }