//----------------------------------------------------------------//
int work_moai_vfs ( int argc, char** argv ) {

	glutInit ( &argc, argv );

	AKUCreateContext ();

	AKUSetInputConfigurationName ( "AKUGlut" );

	AKUReserveInputDevices			( GlutInputDeviceID::TOTAL );
	AKUSetInputDevice				( GlutInputDeviceID::DEVICE, "device" );
	
	AKUReserveInputDeviceSensors	( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::TOTAL );
	AKUSetInputDeviceKeyboard		( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::KEYBOARD,		"keyboard" );
	AKUSetInputDevicePointer		( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::POINTER,		"pointer" );
	AKUSetInputDeviceButton			( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::MOUSE_LEFT,	"mouseLeft" );
	AKUSetInputDeviceButton			( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::MOUSE_MIDDLE,	"mouseMiddle" );
	AKUSetInputDeviceButton			( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::MOUSE_RIGHT,	"mouseRight" );

	AKUSetFunc_EnterFullscreenMode ( _AKUEnterFullscreenModeFunc );
	AKUSetFunc_ExitFullscreenMode ( _AKUExitFullscreenModeFunc );
	AKUSetFunc_OpenWindow ( _AKUOpenWindowFunc );

	AKUMountVirtualDirectory ( "test", "anim-basic.zip" );
	AKUSetWorkingDirectory ( "test/anim-basic" );
	
	AKURunScript ( "main.lua" );

	return 0;
}
Beispiel #2
0
void MoaiWidget::setActiveDirectory(QString directory){
    mActiveDirectory = directory;
    if(mInitialized)
    {
        const char *path = directory.toAscii().data();
        printf("Setting active directory: %s \n", path);
        AKUSetWorkingDirectory ( path );
    }
    else
       mDocuments = true;
}