예제 #1
0
    def draw(self, dt=0):
        if self.inspector.batch:
            self.inspector.batch.draw()

        self.editor.scene.camera.apply()
        wp = self.scene.walkpath
        wp.draw()
        if self.selected_item:
            point = wp.points[self.selected_item]
            draw.set_color(1, 1, 0, 1)
            draw.rect(point[0] - 2, point[1] - 2, point[0] + 2, point[1] + 2)
        self.editor.scene.camera.unapply()
예제 #2
0
 def draw(self, dt=0):
     if self.inspector.batch:
         self.inspector.batch.draw()
     
     self.editor.scene.camera.apply()
     wp = self.scene.walkpath
     wp.draw()
     if self.selected_item:
         point = wp.points[self.selected_item]
         draw.set_color(1,1,0,1)
         draw.rect(point[0]-2, point[1]-2, point[0]+2, point[1]+2)
     self.editor.scene.camera.unapply()
예제 #3
0
 def draw(self, dt=0):
     if self.edge_pallet.batch:
         self.edge_pallet.batch.draw()
     if self.inspector.batch:
         self.inspector.batch.draw()
     
     if self.selected_item:
         self.editor.scene.camera.apply()
         p = self.editor.mouse
         cp = self.scene.walkpath.closest_edge_point_to_point(self.selected_item, p)
         draw.set_color(1,1,0,1)
         draw.rect(cp[0]-3, cp[1]-3, cp[0]+3, cp[1]+3)
         self.editor.scene.camera.unapply()
예제 #4
0
    def draw(self, dt=0):
        if self.edge_pallet.batch:
            self.edge_pallet.batch.draw()
        if self.inspector.batch:
            self.inspector.batch.draw()

        if self.selected_item:
            self.editor.scene.camera.apply()
            p = self.editor.mouse
            cp = self.scene.walkpath.closest_edge_point_to_point(
                self.selected_item, p)
            draw.set_color(1, 1, 0, 1)
            draw.rect(cp[0] - 3, cp[1] - 3, cp[0] + 3, cp[1] + 3)
            self.editor.scene.camera.unapply()
예제 #5
0
 def draw(self, dt=0):
     if self.camera_pallet.batch:
         self.camera_pallet.batch.draw()
     if self.inspector.batch:
         self.inspector.batch.draw()
     
     self.editor.scene.camera.apply()
     draw.set_color(1,0,1,1)
     for point in self.scene.camera.points.viewvalues():
         p = point.position
         draw.rect(p[0]-5, p[1]-5, p[0]+5, p[1]+5)
     p = self.dragging_item or self.selected_item
     if p:
         draw.rect_outline(p.position[0]-hw, p.position[1]-hh, 
                           p.position[0]+hw, p.position[1]+hh)
     self.editor.scene.camera.unapply()