Skip to content
Snippets Groups Projects
Projector.cpp 769 B
Newer Older
#include "Projector.h"

void Projector::setup(){
Louis James's avatar
Louis James committed
    // fullscreen boolean
    bFullscreen	= 0;
}

void Projector::update(){
}

void Projector::draw(){
Louis James's avatar
Louis James committed
    ofDrawCircle(100, 100, 100, 100);
}

//--------------------------------------------------------------
void Projector::keyPressed(int key){
Louis James's avatar
Louis James committed
    if(key == 'f'){
        bFullscreen = !bFullscreen;
        if(!bFullscreen){
            ofSetWindowShape(1920,1080);
            ofSetFullscreen(false);
            // figure out how to put the window in the center:
            int screenW = ofGetScreenWidth();
            int screenH = ofGetScreenHeight();
            ofSetWindowPosition(screenW/2-300/2, screenH/2-300/2);
        } else if(bFullscreen == 1){
            ofSetFullscreen(true);
        }
    }