Questions on printf and love.thread [solved]
Posted: Thu May 10, 2012 1:12 pm
Question 1
I have a little info box in which various things print information. The height of the box is variable... the width is not, so I use love.graphics.printf's wrapping feature.
So, question: how can I figure out the total height of the box if I already know what text is going to be shown, but not how it's going to be wrapped? Is there a way to know how many lines printf decided (or will decide) to use when wrapping?
If not, how do people usually approach this problem?
Question 2
While using threads I noticed that I cannot call any love functions at all, besides a few from love.thread. The wiki says that love.graphics should not work, but that implies that other modules (love.timer, love filesystem, etc) should... yet nothing works. Is this just a linux bug, or a new feature of Love 0.8.0?
I have a little info box in which various things print information. The height of the box is variable... the width is not, so I use love.graphics.printf's wrapping feature.
So, question: how can I figure out the total height of the box if I already know what text is going to be shown, but not how it's going to be wrapped? Is there a way to know how many lines printf decided (or will decide) to use when wrapping?
If not, how do people usually approach this problem?
Question 2
While using threads I noticed that I cannot call any love functions at all, besides a few from love.thread. The wiki says that love.graphics should not work, but that implies that other modules (love.timer, love filesystem, etc) should... yet nothing works. Is this just a linux bug, or a new feature of Love 0.8.0?