Skip to content
This repository has been archived by the owner on Jan 11, 2018. It is now read-only.

Commit

Permalink
berkelium: fix late positioning, correctly reposition graphics rectan…
Browse files Browse the repository at this point in the history
…gle (thanks akshayaurora). Closes #2
  • Loading branch information
tito committed Jun 27, 2011
1 parent 602bf90 commit 268dcaf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions berkelium/__init__.py
Expand Up @@ -375,6 +375,13 @@ def on_size(self, instance, value):
self._g_rect.texture = self._bk.texture
self._g_rect.tex_coords = (0, 1, 1, 1, 1, 0, 0, 0)
self._g_rect.size = w, h
self._g_rect.pos = self.pos

def on_pos(self, instance, value):
x, y = map(int, value)
if not hasattr(self, '_g_rect'):
return
self._g_rect.pos = self.pos

def on_transparency(self, instance, value):
self._bk.setTransparent(value)
Expand Down

0 comments on commit 268dcaf

Please sign in to comment.