from sdl2uipy import EventType
__author__ = 'TriD'


class UIManager(object):

    def __init__(self, view):
        self.items = []
        self.view = view
        view.application.event_manager.add_listener(EventType.
            MOUSEBUTTON_UP, self.get_mouse_message)

    def add_item(self, item):
        self.items.append(item)

    def remove_item(self, item):
        self.items.remove(item)

    def draw(self):
        for item in self.items:
            if item.visible:
                item.draw()

    def get_mouse_message(self, button, x, y):
        for item in self.items:
            item.click(button, x, y)

fc2791e71e367001e60fc0da0ef7648ce1cd5a7c
<mask token>


class UIManager(object):

    def __init__(self, view):
        self.items = []
        self.view = view
        view.application.event_manager.add_listener(EventType.
            MOUSEBUTTON_UP, self.get_mouse_message)
    <mask token>
    <mask token>

    def draw(self):
        for item in self.items:
            if item.visible:
                item.draw()
    <mask token>

<mask token>


class UIManager(object):

    def __init__(self, view):
        self.items = []
        self.view = view
        view.application.event_manager.add_listener(EventType.
            MOUSEBUTTON_UP, self.get_mouse_message)

    def add_item(self, item):
        self.items.append(item)

    def remove_item(self, item):
        self.items.remove(item)

    def draw(self):
        for item in self.items:
            if item.visible:
                item.draw()

    def get_mouse_message(self, button, x, y):
        for item in self.items:
            item.click(button, x, y)

<mask token>
__author__ = 'TriD'


class UIManager(object):

    def __init__(self, view):
        self.items = []
        self.view = view
        view.application.event_manager.add_listener(EventType.
            MOUSEBUTTON_UP, self.get_mouse_message)

    def add_item(self, item):
        self.items.append(item)

    def remove_item(self, item):
        self.items.remove(item)

    def draw(self):
        for item in self.items:
            if item.visible:
                item.draw()

    def get_mouse_message(self, button, x, y):
        for item in self.items:
            item.click(button, x, y)

from sdl2uipy import EventType
__author__ = 'TriD'


class UIManager(object):

    def __init__(self, view):
        self.items = []
        self.view = view
        view.application.event_manager.add_listener(EventType.
            MOUSEBUTTON_UP, self.get_mouse_message)

    def add_item(self, item):
        self.items.append(item)

    def remove_item(self, item):
        self.items.remove(item)

    def draw(self):
        for item in self.items:
            if item.visible:
                item.draw()

    def get_mouse_message(self, button, x, y):
        for item in self.items:
            item.click(button, x, y)
