Skip to content

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

Open
conanh wants to merge 3 commits intodmccuskey:masterfrom
conanh:master
Open

Added ability to buttons using images from image sheets instead of just files#9
conanh wants to merge 3 commits intodmccuskey:masterfrom
conanh:master

Conversation

@conanh
Copy link
Copy Markdown

@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