import omni.ui as ui


class SeparatorDelegate(ui.MenuDelegate):
    """Generic menu delegate with separator between menu items"""

    def __init__(self):
        super().__init__()

    def __del__(self):
        self.destroy()

    def destroy(self):
        pass

    def build_item(self, item):
        self.__frame = ui.Frame(style_type_name_override="Menu.Item")
        with self.__frame:
            ui.Line(width=2, alignment=ui.Alignment.V_CENTER, style_type_name_override="Menu.Item.Separator")
