how to use sheet in newButton

Hello,

I need use the parameter sheet, defaultIndex, overIndex… Please how to use.
I have the data sheet and img sheet, only i need use parameters.

Thanks? [import]uid: 68140 topic_id: 34072 reply_id: 334072[/import]

This is a really good question, and I’m not sure all the answers are in the same place or in a simple example either.

The new widgets use sprite sheets for their graphics. Corona Labs has provided a default look which can be found in the widget_ios/ folder in the sample projects. If you look in that folder you will see the graphics for it.

There is a blog post that explains how to setup image sheets:

http://www.coronalabs.com/blog/2012/03/06/image-sheets-image-groups-and-sprites/

In the sample code there is an assets.lua file that has the bits the widget is going to use. Hopefully between looking there, the blog post and the documentation you should be able to address your needs. I’m going to put in a request to see if perhaps a blog post specific to widgets is on order for this.

[import]uid: 199310 topic_id: 34072 reply_id: 135522[/import]

@ alephart, I found this helpful:

http://www.coronalabs.com/blog/2012/05/22/adding-buttons-to-your-games-and-apps/

The very last part of the tutorial blog post explains how you may use imageSheets with the widget button.

Rob, you might want to ask the Corona Staff to link to this tutorial blog post from the widget button documentation/API page.

Naomi [import]uid: 67217 topic_id: 34072 reply_id: 135535[/import]

What a great catch Naomi. I remember that blog post, but it looks like it was updated. I’ll suggest it to the documentation folks.

[import]uid: 199310 topic_id: 34072 reply_id: 135538[/import]

Glad I could help.

Cheers,
Naomi [import]uid: 67217 topic_id: 34072 reply_id: 135546[/import]

Thanks,
Their suggestions helped me. The updated post that sent Naomi says clearly as used.

Before this, I went back to read the API documentation http://docs.coronalabs.com/api/library/widget/newButton.html#sheet-optional, and between lines that one can understand how to use well.

Thanks again,

Juan Carlos [import]uid: 68140 topic_id: 34072 reply_id: 135560[/import]

This is a really good question, and I’m not sure all the answers are in the same place or in a simple example either.

The new widgets use sprite sheets for their graphics. Corona Labs has provided a default look which can be found in the widget_ios/ folder in the sample projects. If you look in that folder you will see the graphics for it.

There is a blog post that explains how to setup image sheets:

http://www.coronalabs.com/blog/2012/03/06/image-sheets-image-groups-and-sprites/

In the sample code there is an assets.lua file that has the bits the widget is going to use. Hopefully between looking there, the blog post and the documentation you should be able to address your needs. I’m going to put in a request to see if perhaps a blog post specific to widgets is on order for this.

[import]uid: 199310 topic_id: 34072 reply_id: 135522[/import]

@ alephart, I found this helpful:

http://www.coronalabs.com/blog/2012/05/22/adding-buttons-to-your-games-and-apps/

The very last part of the tutorial blog post explains how you may use imageSheets with the widget button.

Rob, you might want to ask the Corona Staff to link to this tutorial blog post from the widget button documentation/API page.

Naomi [import]uid: 67217 topic_id: 34072 reply_id: 135535[/import]

What a great catch Naomi. I remember that blog post, but it looks like it was updated. I’ll suggest it to the documentation folks.

[import]uid: 199310 topic_id: 34072 reply_id: 135538[/import]

Glad I could help.

Cheers,
Naomi [import]uid: 67217 topic_id: 34072 reply_id: 135546[/import]

Thanks,
Their suggestions helped me. The updated post that sent Naomi says clearly as used.

Before this, I went back to read the API documentation http://docs.coronalabs.com/api/library/widget/newButton.html#sheet-optional, and between lines that one can understand how to use well.

Thanks again,

Juan Carlos [import]uid: 68140 topic_id: 34072 reply_id: 135560[/import]