From 368eeb2fb495d82fa7dc86940ba238f11f58b160 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Fri, 2 Feb 2024 21:24:34 -0800 Subject: [PATCH] add function reporting X endpoint of a text box uses the "print offscreen" trick --- vacation.p8 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vacation.p8 b/vacation.p8 index c3502dc..9352745 100644 --- a/vacation.p8 +++ b/vacation.p8 @@ -178,6 +178,10 @@ function txtbox:draw() print(self.text, self.x, self.y, self.col) end +function txtbox:xmax() + return print(self.text, self.x, -9999) +end + spring = { from = 128, to = 0,