package org.pollux3d.app;
import org.pollux3d.tuio.TuioDeviceNetwork;
import org.pollux3d.tuio.TuioInput;
import org.pollux3d.tuio.win7.TuioDeviceWin7;
import com.jme3.app.SimpleApplication;
public abstract class TuioApplication extends SimpleApplication {
protected String windowName = "TuioGame";
protected TuioInput tuioInput;
public void simpleInitApp() {
// disable all inputs
//this.settings.setUseInput(false);
//this.setSettings(this.settings);
this.tuioInput = TuioInput.get();
this.tuioInput.setScreen(this.getCamera().getWidth(), this.getCamera().getHeight());
this.context.setTitle(windowName);
this.tuioInput.setWindowName(windowName);
if (System.getProperty("os.name").equals("Windows 7")) {
this.tuioInput.setTuioDevice(new TuioDeviceWin7());
//} else if (System.getProperty("os.name").equals("Mac OS X")) {
} else {
this.tuioInput.setTuioDevice(new TuioDeviceNetwork());
}
}
public void loadStatsView() {
}
protected void destroyInput(){
super.destroyInput();
if (this.tuioInput != null)
this.tuioInput.destroy();
}
public void simpleUpdate(float tpf) {
this.tuioInput.update();
}
}