Text-only widget button?

I’m creating the Pause menu for my game.

It should have “Resume” “Menu” and “Options” as buttons.

I tried doing them as widget buttons but I can’t seem to find a way of doing it without there being that rounded rectangle behind the text.

Is there a way to get rid of that rectangle?

Or should I just use display.newText() and give each an event listener? [import]uid: 123298 topic_id: 24708 reply_id: 324708[/import]

You can do something like this
[lua]widget.newButton
{
widget = 100,height = 50,
label = “BUTTON”,
defaultColor = {0,0,0,0},overColor = {0,0,0,0},
strokeColor = {0,0,0,0},
}[/lua]

[import]uid: 64174 topic_id: 24708 reply_id: 100168[/import]

Oh man thanks a lot!! I had to remove the height and width though because it was creating a larger invisible hitbox around the text.

This is my final code

[lua]local testButton = widget.newButton{
label = “Button”,
width = 0,
height = 0,
labelColor = {default = {250,250,0}, over = {250,300,0}},
font = “BradyBunch”,
fontSize = 40,
defaultColor = {0,0,0,0}, overColor = {0,0,0,0},
strokeColor = {0,0,0,0}
}[/lua]

This seems to be working out great, thanks Satheesh!

Another quick question.

Is this is less memory intensive than creating a dsiplay.newText() and also an event listener?

Edit: Changing the width and height seems to be working more accurate. [import]uid: 123298 topic_id: 24708 reply_id: 100173[/import]

I’m not sure but I don’t think it would make much difference memorywise.

Widgets would be much easier to use, so using them is better IMO. [import]uid: 64174 topic_id: 24708 reply_id: 100182[/import]

Ok cool, thanks again! I’ll use widgets for my buttons. [import]uid: 123298 topic_id: 24708 reply_id: 100184[/import]