def initialize(self): PyGameApplication.initialize(self) self.resize(DEMO_WINDOW_LENGTH, DEMO_WINDOW_HEIGHT) self.caption("Baller Demo") self.setCursor(PyGameCursor(self.camera.overlay, mouseVisible=False)) self.setEnvironment( BallingScene(self.timer, DEMO_WINDOW_LENGTH, DEMO_WINDOW_HEIGHT))
def initialize(self): PyGameApplication.initialize(self) self.resize(DEMO_WINDOW_LENGTH, DEMO_WINDOW_HEIGHT) self.caption("Base Demo") self.setCursor(PyGameCursor(self.camera.overlay, mouseVisible=False) ) # TODO: Fix the "invisible" mouse cursor... :( self.setEnvironment( BasingScene(self.timer, DEMO_WINDOW_LENGTH, DEMO_WINDOW_HEIGHT))
def initialize(self): PyGameApplication.initialize(self) self.resize(DEMO_WINDOW_LENGTH, DEMO_WINDOW_HEIGHT) self.setCursor(PyGameCursor(self.camera.overlay, mouseVisible=False)) self.algorithm = BubbleSort() self.data = list(range(DATA_SIZE)) self.setEnvironment( SortingScene(self.timer, DEMO_WINDOW_LENGTH, DEMO_WINDOW_HEIGHT, self.algorithm, self.data)) self.reset()
def resize(self, length, height): GraphicalApplication.resize(self, length, height) self.camera = PyGameCamera(self.timer, frameRate=60) self.setCursor(PyGameCursor(self.camera.overlay, mouseVisible=True)) self.camera.attach(self.display) # For now, we'll just configure the sensor to be the same dimensions as the viewer. self.camera.configureSensor(self.dimensions[0], self.dimensions[1], columns=1920, rows=1080) self.entities.append(self.camera) # TODO: Move the camera ...
def initialize(self): PyGameApplication.initialize(self) self.resize(DEMO_WINDOW_LENGTH, DEMO_WINDOW_HEIGHT) # Resize the camera sensor to match window dimensions. self.camera.configureSensor(DEMO_WINDOW_LENGTH, DEMO_WINDOW_HEIGHT, DEMO_WINDOW_LENGTH, DEMO_WINDOW_HEIGHT) self.caption("Enlightenment Testing") self.setCursor(PyGameCursor(self.camera.overlay, mouseVisible=False)) # Configure a camera mount and lens. self.camera.attach(ETMount(self.dimensions)) self.camera.attach(ETLens()) # Let the environment know about the lens, for now. self.setEnvironment( EnlighteningScene(self.timer, DEMO_WINDOW_LENGTH, DEMO_WINDOW_HEIGHT, self.camera.lens))
def update(self, **kwargs): PyGameCursor.update(self, **kwargs) if 0 < self.emitCoolDown: self.emitCoolDown -= 1
def __init__(self, cameraOverlay, radius=20, mouseVisible=True): PyGameCursor.__init__(self, cameraOverlay, radius=radius, mouseVisible=mouseVisible) self.emitCoolDown = 0