Changeset 611:7d49f698eff7


Ignore:
Timestamp:
04/11/11 06:57:24 (12 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Message:

Ensure that self.selected remaings with self.options in ButtonSet. Only wrap self.selected if it might have changed (for both ButtonSet and TextChoice).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/widgets/text.py

    r495 r611  
    145145                    callback(self.selected, self.options[self.selected][1])
    146146
    147         self.selected %= len(self.option_widgets)
     147            self.selected %= len(self.option_widgets)
    148148
    149149    def draw(self, surface):
     
    186186                    callback(self.selected, self.options[self.selected][1])
    187187
     188            self.selected %= len(self.options)
     189
    188190    def draw(self, surface):
    189191        for i, widget in enumerate(self.options):
Note: See TracChangeset for help on using the changeset viewer.