Files
SantoscopeUI/athmos.py

30 lines
873 B
Python
Executable File

from .fonts import *
from .colors import *
from .item_selection import ItemSelection
import pygame
MAX_COUNT = 9
class Athmos(ItemSelection):
def __init__(self, screen):
self.screen = screen
self.show_list = True
self.surface = pygame.Surface((0,0), pygame.SRCALPHA)
self.max_name_width = 350
super().__init__(self.surface, self.max_name_width, MAX_COUNT)
def set_filenames(self,filenames):
super().set_items(filenames)
def get_name_by_index(self, index):
return self.items[index]
def get_count(self):
return len(self.items)
def update(self):
if self.show_list:
super().update()
self.screen.blit(self.surface, ((self.screen.get_width()-self.max_name_width)/2,
(self.screen.get_height() - self.surface.get_height())/2))