TITANIUM_FUNCTION(Properties, _loadAppProperties)
{
    const auto js_context = this_object.get_context();
    const auto object_ptr = GetStaticObject(js_context).GetPrivate<Properties>();

    object_ptr->loadAppProperties();

    return get_context().CreateUndefined();
}
Пример #2
0
	Context::Context(GraphicsConfiguration *gConfig) {
		this->gConfig = gConfig;
		appUpdater = NULL;
		appRenderer = NULL;
		appProperties = NULL;
		assetFindFunction = ASSET_FIND_FUNCTION_INTERNAL;
		loadAppProperties();
		if (!appProperties) {
			return;
		}
		glResourceManager = new GLResourceManager(this);
		menuRenderer = new MenuRenderer(this);
		// create videoManager before audioManager because it may immediately start being used
		videoManager = new VideoManager(this);
		audioManager = new AudioManager(this);
		networkManager = new NetworkManager(this);
		vibrationManager = new VibrationManager(this);
		uiManager = new UIManager(this);
		renderContext = new RenderContext();
		quadRenderer = new QuadRenderer(this);
		tickDelta = 0;
		isUIConsumingPointers = FALSE;
		isUIConsumingKeys = FALSE;
		keyPressed = 0;
		specialKeyPressed = SKEY_NULL;
		showFPS = FALSE;
		newGraphicsContext = FALSE;
		accelerometerState.x = 0;
		accelerometerState.y = 0;
		accelerometerState.z = 0;
		pointerState = new PointerState[MAX_POINTERS];
		for (S32 i = 0; i < MAX_POINTERS; i++) {
			pointerState[i].isDown = FALSE;
			pointerState[i].x = 0;
			pointerState[i].y = 0;
		}
		keyState = new KeyState[MAX_KEYSTATES];
		for (S32 i = 0; i < MAX_POINTERS; i++) {
			keyState[i].isDown = FALSE;
			keyState[i].keyCode = 0;
		}
		callbackData[0] = '\0';
		callbackDataReady = FALSE;
	}