Skip to content

Instantly share code, notes, and snippets.

@shawngrimes
Created October 20, 2012 17:54
Show Gist options
  • Save shawngrimes/3924204 to your computer and use it in GitHub Desktop.
Save shawngrimes/3924204 to your computer and use it in GitHub Desktop.
Align Bottom Right
--Change the reference point of the object
myObject:setReferencePoint(display.BottomRightReferencePoint)
--This will add a buffer of half the objects width, if you want it flush with the
--right, change it to myObject.x=display.contentWidth
myObject.x=display.contentWidth - myObject.contentWidth/2
--This will add a vertical buffer of half the object's height, if you want it flush with the
--bottom, change it to myobject.y=display.contentHeight
myObject.y=display.contentHeight - myObject.contentHeight/2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment