add function reporting X endpoint of a text box

uses the "print offscreen" trick
This commit is contained in:
Kistaro Windrider 2024-02-02 21:24:34 -08:00
parent c60b07183b
commit 368eeb2fb4
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -178,6 +178,10 @@ function txtbox:draw()
print(self.text, self.x, self.y, self.col) print(self.text, self.x, self.y, self.col)
end end
function txtbox:xmax()
return print(self.text, self.x, -9999)
end
spring = { spring = {
from = 128, from = 128,
to = 0, to = 0,