all repos — Legends-RPG @ 8d1f715d2aebeefc83f203f833ab8b86d0acec1b

A fantasy mini-RPG built with Python and Pygame.

Fixed crash when moving around sell menu in shops.
Justin Armstrong justinmeister@gmail.com
Thu, 19 Jun 2014 10:01:11 -0700
commit

8d1f715d2aebeefc83f203f833ab8b86d0acec1b

parent

ab397e926c7e59f522b1eada41f84bbf27bf1bdd

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M data/shopgui.pydata/shopgui.py

@@ -481,7 +481,7 @@ self.selection_box = self.make_selection_box(choices)

self.selection_arrow.rect.topleft = self.arrow_pos_list[self.arrow_index] if keys[pg.K_DOWN] and self.allow_input: - if self.arrow_index < (len(self.arrow_pos_list) - 1): + if self.arrow_index < (len(choices) - 1): self.arrow_index += 1 self.allow_input = False self.notify(c.CLICK)

@@ -544,7 +544,7 @@ elif len(choices) == 3:

self.selection_arrow.rect.topleft = self.arrow_pos_list[self.arrow_index] if keys[pg.K_DOWN] and self.allow_input: - if self.arrow_index < (len(self.arrow_pos_list) - 1): + if self.arrow_index < (len(choices) - 1): self.arrow_index += 1 self.allow_input = False self.notify(c.CLICK)