Skip to content

Commit

Permalink
Merge branch 'issue_360' into pyglet-1.5-maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
benmoran56 committed Mar 26, 2021
2 parents fe1e221 + 03ea2ea commit 673cf7a
Show file tree
Hide file tree
Showing 3 changed files with 627 additions and 504 deletions.
4 changes: 2 additions & 2 deletions pyglet/sprite.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ def position(self):
return self._x, self._y

@position.setter
def position(self, pos):
self._x, self._y = pos
def position(self, position):
self._x, self._y = position
self._update_position()

@property
Expand Down
6 changes: 3 additions & 3 deletions pyglet/text/caret.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _set_visible(self, visible):
clock.unschedule(self._blink)
if visible and self._active and self.PERIOD:
clock.schedule_interval(self._blink, self.PERIOD)
self._blink_visible = False # flipped immediately by next blink
self._blink_visible = False # flipped immediately by next blink
self._blink(0)

def _get_visible(self):
Expand Down Expand Up @@ -388,8 +388,8 @@ def _update(self, line=None, update_ideal_x=True):
if update_ideal_x:
self._ideal_x = x

x -= self._layout.top_group.translate_x
y -= self._layout.top_group.translate_y
x -= self._layout.top_group.view_x
y -= self._layout.top_group.view_y
font = self._layout.document.get_font(max(0, self._position - 1))
self._list.vertices[:] = [x, y + font.descent, x, y + font.ascent]

Expand Down
Loading

0 comments on commit 673cf7a

Please sign in to comment.