Ejemplo n.º 1
0
    def createBackground(self):
        if self.bgRect is not None:
            self.bgRect.delete()
            self.bgRect = None
        if self.border is not None:
            self.border.delete()
            self.border = None

        self.bgRect = createRect(self.x, self.y, self.width, self.height,
                                 self.bgColor, self.parentFrame.batch, mgGroup)

        self.border = createRect(self.x, self.y + self.height, self.width, 2,
                                 (0, 0, 0, 255), self.parentFrame.batch,
                                 highlightGroup)
Ejemplo n.º 2
0
    def setToolCursor(self, newCursor):
        '''

        '''
        if (self.toolCursor is None and
                self.toolCursor == newCursor):
            return

        self.deleteToolCursor()
        self.toolCursor = newCursor

        if self.toolCursor is not None:
            x, y, x2, y2 = self.expandMapCoords(self.toolCursor.rect)
            width = x2 - x
            height = y2 - y
            self.toolCursor.vl = createRect(x, y, width, height,
                                            self.toolCursor.fillColor,
                                            self.parentFrame.batch,
                                            self.toolCursorGroup)
            self.toolCursor.borderVL = createHollowRect(
                x,
                y,
                width,
                height,
                self.toolCursor.borderColor,
                self.parentFrame.batch,
                self.toolCursorGroup)
Ejemplo n.º 3
0
    def createBg(self):

        self.border = createRect(self.x, self.y,
                                 2, self.height,
                                 (0, 0, 0, 255),
                                 self.parentFrame.batch,
                                 highlightGroup)
Ejemplo n.º 4
0
    def createBackground(self):
        if self.bgRect is not None:
            self.bgRect.delete()
            self.bgRect = None
        if self.border is not None:
            self.border.delete()
            self.border = None

        self.bgRect = createRect(self.x, self.y,
                                 self.width, self.height,
                                 self.bgColor,
                                 self.parentFrame.batch,
                                 mgGroup)

        self.border = createRect(self.x, self.y + self.height,
                                 self.width, 2,
                                 (0, 0, 0, 255),
                                 self.parentFrame.batch,
                                 highlightGroup)
Ejemplo n.º 5
0
 def createRect(self, x, y, width, height, color, batch=None, group=None):
     if batch is None:
         batch = self.parentFrame.batch
     return createRect(self.x + x, self.y + y, width, height, color, batch, group)
Ejemplo n.º 6
0
 def createRect(self, x, y, width, height, color, batch=None, group=None):
     if batch is None:
         batch = self.parentFrame.batch
     return createRect(self.x + x, self.y + y, width, height, color, batch,
                       group)
Ejemplo n.º 7
0
    def createBg(self):

        self.border = createRect(self.x, self.y, 2, self.height,
                                 (0, 0, 0, 255), self.parentFrame.batch,
                                 highlightGroup)