From f40e0f786d3600abbb7730c7c801749dcc57db71 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 11 Mar 2023 16:05:45 +0100 Subject: [PATCH] txt.width() and txt.height() added for vm target --- compiler/res/prog8lib/virtual/textio.p8 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler/res/prog8lib/virtual/textio.p8 b/compiler/res/prog8lib/virtual/textio.p8 index dd6fcc810..3a5ec0d1b 100644 --- a/compiler/res/prog8lib/virtual/textio.p8 +++ b/compiler/res/prog8lib/virtual/textio.p8 @@ -4,6 +4,14 @@ txt { +sub width() -> ubyte { + return 80 ; just some chosen value for the 'width' of the console +} + +sub height() -> ubyte { + return 30 ; just some chosen value for the 'height' of the console +} + sub clear_screen() { str @shared sequence = "\x1b[2J\x1B[H" %ir {{