# Path: foos/ui/anim.py
# class Delegate:
#     def __init__(self, delegate):
#         self.delegate = delegate
# 
#     def __getattr__(self, name):
#         return getattr(self.delegate, name)


import pi3d
from .anim import Delegate
            self.setText()
            self.changed = False

        self.first = False

        self.select.draw()
        self.bg_t.draw()
        self.bg.draw()
        self.title_shape.draw()

        if self.offset > 0:
            self.up_i.draw()

        if len(self.options) > self.offset + self.n:
            self.down_i.draw()

        for s in self.shapes:
            s.draw()

    def selected(self):
        idx = self.offset + self.selectpos
        return (idx, self.options[idx])

    def setOptions(self, options):
        self.offset = 0
        self.selectpos = 0
        self.options = options
        self.changed = True



# Path: foos/ui/anim.py
# class Delegate:
#     def __init__(self, delegate):
#         self.delegate = delegate
# 
#     def __getattr__(self, name):
#         return getattr(self.delegate, name)


# Path: foos/ui/menu.py
import pi3d
from .anim import Delegate

            self.setText()
            self.changed = False

        self.first = False

        self.select.draw()
        self.bg_t.draw()
        self.bg.draw()
        self.title_shape.draw()

        if self.offset > 0:
            self.up_i.draw()

        if len(self.options) > self.offset + self.n:
            self.down_i.draw()

        for s in self.shapes:
            s.draw()

    def selected(self):
        idx = self.offset + self.selectpos
        return (idx, self.options[idx])

    def setOptions(self, options):
        self.offset = 0
        self.selectpos = 0
        self.options = options
        self.changed = True



class MenuTree(Delegate):