This commit is contained in:
Ander
2015-01-22 00:23:55 +01:00
parent 3bf0072fdf
commit 161b8381a2
12 changed files with 201 additions and 150 deletions

View File

@@ -20,10 +20,11 @@ class ListView():
self.list = []
self.scrollbar = False
self.selected = None
self.set_list([])
self.active = []
self.set_list([])
# Sets the list for the lisview. It should be an iterable of strings
# Sets the list for the lisview.
# It should be an iterable of strings
def set_list(self, item_list):
self.screen_objects.clear()
self.list = item_list
@@ -98,7 +99,6 @@ class ListView():
elif touch_event.direction == InputManager.down:
self.move_to(1)
# Scroll to direction
# direction == 1 will scroll down
# direction == -1 will scroll up
@@ -122,7 +122,6 @@ class ListView():
self.current_item)
self.set_active(self.active)
# Set active items
def set_active(self, active):
for number in self.active: