def draw(self): Layer.draw(self) game = State.model() world = game.world cell_width = self.width / world.columns cell_height = self.height / world.rows depth = 0 x = self.x for col in xrange(world.columns): y = self.y for row in xrange(world.rows): floor = world.get_floor(col, row, depth) color = (1.0, 1.0, 1.0) if game.current_floor_coords == (col, row, depth): color = (0.7, 0.7, 1.0) if floor is None: opacity = 0 elif floor.known: opacity = 0.5 elif floor.explored: opacity = 1.0 else: opacity = 0 if opacity > 0: self.set_color(*color, opacity=opacity) gl.glRectf(x, y, x + cell_width, y + cell_height) y += cell_height x += cell_width
def draw(self): Layer.draw(self) '''
def draw(self): Layer.draw(self); if self.show_cursor: self.cursor.draw()