how to make text clickable like a button

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
geemoddie
Prole
Posts: 7
Joined: Sat Dec 08, 2018 1:36 pm

how to make text clickable like a button

Post by geemoddie » Wed Oct 30, 2019 12:11 pm

like make a button

User avatar
raidho36
Party member
Posts: 1932
Joined: Mon Jun 17, 2013 12:00 pm

Re: how to make text clickable like a button

Post by raidho36 » Wed Oct 30, 2019 4:31 pm

The same way you make a button with a label, but skip the button part so it's just the label.

User avatar
Luke100000
Party member
Posts: 231
Joined: Mon Jul 22, 2013 9:17 am
Location: Austria
Contact:

Re: how to make text clickable like a button

Post by Luke100000 » Thu Oct 31, 2019 5:12 pm

and if you want the bounding box adapt to your text, use
width = Font:getWidth( text ) to get the texts width
height = Font:getHeight( ) to get its height
love.graphics.getFont() to get the current font

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests