Guest User

Untitled

a guest
Jan 23rd, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. Index: plugins/pogplugin/pogplugin.py
  2. ===================================================================
  3. --- plugins/pogplugin/pogplugin.py (revision 500)
  4. +++ plugins/pogplugin/pogplugin.py (working copy)
  5. @@ -128,12 +128,16 @@
  6.  
  7. selection = rggSystem.showPopupMenuAtAbs([x, y], ['Center', hide, 'Resize', lock, 'Change Layer', 'Delete'])
  8. if selection == 0:
  9. + print rggSystem.cameraPosition()
  10. + print rggSystem.cameraSize()
  11. camsiz = rggSystem.cameraSize()
  12. pospog = specificItem.getPog().position
  13. pogw = specificItem.getPog()._tile.getW()
  14. pogh = specificItem.getPog()._tile.getH()
  15. - newpos = (pospog[0] - camsiz[0]/2 + pogw/2, pospog[1] - camsiz[1]/2 + pogh/2)
  16. + newpos = (-pospog[0] + camsiz[0]/2 - pogw/2, -pospog[1] + camsiz[1]/2 - pogh/2)
  17. rggSystem.setCameraPosition(newpos)
  18. + print rggSystem.cameraPosition()
  19. + print rggSystem.cameraSize()
  20. elif selection == 1:
  21. for item in items:
  22. pog = item.getPog()
Add Comment
Please, Sign In to add comment