Advertisement
alestane

Reliable scale setting

Feb 19th, 2012
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. local header = {}
  2.  
  3. function header.Phase(event)
  4.     header.Text.text = event.character .. " Phase: " .. event.phase
  5.     header.Text:setReferencePoint(display.TopLeftReferencePoint)
  6.     header.Text.x, header.Text.y = 5, 1
  7. end
  8.  
  9. function header.New(level)
  10.     header.Self = display.newImage(level, "visuals/level_header.png", 0, 0)
  11.     header.Text = display.newRetinaText(level, "Resistance Phase: Waiting", 5, 1, "04b03", 18)
  12.     header.Text:setReferencePoint(display.TopLeftReferencePoint)
  13.     header.Text.x, header.Text.y = 5, 1
  14.     Runtime:addEventListener("Phase", header.Phase)
  15. end
  16.  
  17. return header
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement