Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to buttons using images from image sheets instead of just files #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

conanh
Copy link

@conanh conanh commented Feb 16, 2013

Use by adding an "imageSheet" and "defaultIndex" configuration, with optional "upIndex" and "downIndex"

Here's an example:

local sheetData = {
-- image sheet options go here
}
local imageSheet = graphics.newImageSheet("images/parts.png", sheetData)

local pushBtnParams = {
id="plusButton",
width=100,
height=62,
sheet=self.imageSheet,
defaultIndex=1,
downIndex=2,
}
local button = ButtonFactory.create( "push", pushBtnParams )

@ghost ghost assigned dmccuskey Dec 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants