# Path: glbackground.py
# class GLBackground(GLOrtho):
#     margin = 8
#     bg_color = (0.0, 0.0, 0.0, 0.6)
# 
#     #bg_color = (30/255.0,0,255/255.0, 100/255.0)
#     def gl_draw(self):
#         #if hasattr(self, 'highlight_bg_color') and self in self.get_root().find_widget(mouse.get_pos()).all_parents():
#         #    color = self.highlight_bg_color
#         #else:
#         color = tuple(self.bg_color) + (1.0,)
# 
#         glEnable(GL_BLEND)
#         glColor(color[0], color[1], color[2], color[3])
#         glVertexPointer(2, GL_FLOAT, 0, array([-1, -1, -1, 1, 1, 1, 1, -1], dtype='float32'))
#         glDrawArrays(GL_QUADS, 0, 4)
#         glDisable(GL_BLEND)


from numpy.core.umath import absolute
from pygame import key
from albow import Label
from pymclevel.box import Vector
from glbackground import GLBackground
import config

class NudgeButton(GLBackground):
    """ A button that captures movement keys while pressed and sends them to a listener as nudge events.
    Poorly planned. """

    is_gl_container = True

    def __init__(self):

# Path: glbackground.py
# class GLBackground(GLOrtho):
#     margin = 8
#     bg_color = (0.0, 0.0, 0.0, 0.6)
# 
#     #bg_color = (30/255.0,0,255/255.0, 100/255.0)
#     def gl_draw(self):
#         #if hasattr(self, 'highlight_bg_color') and self in self.get_root().find_widget(mouse.get_pos()).all_parents():
#         #    color = self.highlight_bg_color
#         #else:
#         color = tuple(self.bg_color) + (1.0,)
# 
#         glEnable(GL_BLEND)
#         glColor(color[0], color[1], color[2], color[3])
#         glVertexPointer(2, GL_FLOAT, 0, array([-1, -1, -1, 1, 1, 1, 1, -1], dtype='float32'))
#         glDrawArrays(GL_QUADS, 0, 4)
#         glDisable(GL_BLEND)


# Path: editortools/nudgebutton.py
from numpy.core.umath import absolute
from pygame import key
from albow import Label
from pymclevel.box import Vector
from glbackground import GLBackground
import config


class NudgeButton(GLBackground):
    """ A button that captures movement keys while pressed and sends them to a listener as nudge events.
    Poorly planned. """

    is_gl_container = True

    def __init__(self):

        GLBackground.__init__(self)