Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
:setTexture when using a texture packer graphics sheet — Gideros Forum

:setTexture when using a texture packer graphics sheet

FavflyFavfly Member
edited November 2016 in General questions
I'm trying to alter a bitmap's texture. The following would work, if were use images instead of a texture sheet. As I'd really like to use texture sheets, how do I get this working?
thisBitmap = Bitmap.new(self.g:getTextureRegion("firstTexture.png"))
 
newTexture = self.g:getTextureRegion("secondTexture.png")
 
thisBitmap:setTexture(newTexture)

(Also: how do I get the code examples in these discussions to appear in the fancy little boxes? :-))

Comments

Sign In or Register to comment.