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 »

like make a button
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: how to make text clickable like a button

Post by raidho36 »

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: 232
Joined: Mon Jul 22, 2013 9:17 am
Location: Austria
Contact:

Re: how to make text clickable like a button

Post by Luke100000 »

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: Bing [Bot], Google [Bot] and 0 guests