public void Setup(LibraryGameData newGameData) { gameData = newGameData; if (gameArt_C != null) { StopCoroutine(gameArt_C); } gameArt_C = StartCoroutine(LoadGameArt()); favToggle.SetValueWithoutNotify(gameData.isFavorite); if (gameData.gameType == LibraryGameType.Revive) { reviveLogo.gameObject.SetActive(true); //gameArt.texture = gameData.capsuleTexture; } else { reviveLogo.gameObject.SetActive(false); //gameArt.texture = gameData.capsuleTexture; } title.SetText(gameData.name); }
public void Init(LibraryGameData newData) { /*if (newData == null) return; * * gameData = newData; * * gameArt.texture = gameData.capsuleTexture; * * detailsGameDP.RequestRendering(true); * * * if (gameData.gameType == LibraryGameType.Revive) { * bg.gameObject.SetActive(false); * * reviveBG.gameObject.SetActive(true); * * reviveBG.texture = gameData.heroTexture; * } * else { * bg.gameObject.SetActive(true); * * reviveBG.gameObject.SetActive(false); * * bg.texture = gameData.heroTexture; * * } * * title.SetText(gameData.name); * * lastPlayed.SetText("Last Played: " + gameData.lastPlayedDate.ToShortDateString()); * * UpdateFavoriteText(); * * * * StartCoroutine(Show());*/ }
private void CompareCurrentSceneToDP() { if (OpenVR.Applications == null) { return; } uint newPID = OpenVR.Applications.GetCurrentSceneProcessId(); if (newPID == activePID) { return; } activePID = newPID; //if (isLaunchingGame) { // isLaunchingGame = false; // return; //} if (activePID == 0) { activeGame = null; gameIsRunning = false; activeProcess = null; //TODO: Fix returning focus: //we can switch back to the DDA if there's no game open that needs focus if (DPSettings.config.focusGameWhenNotInteracting && DPDesktopOverlay.primaryWindowDP != null && DPDesktopOverlay.primaryWindowDP.isTargetingWindow) { //DPRenderWindowOverlay.primaryWindowDP.ToggleWindowMonitorCapture(true); } UpdateVisuals(); return; } gameIsRunning = true; if (DPSettings.config.focusGameWhenNotInteracting) { if (DPDesktopOverlay.primaryWindowDP != null && DPDesktopOverlay.primaryWindowDP.isTargetingWindow) { //DPRenderWindowOverlay.primaryWindowDP.ToggleWindowMonitorCapture(false); FocusActiveGame(); } } else { StartCoroutine(ForcePrimaryOnTop()); } activeProcess = Process.GetProcessById((int)activePID); StringBuilder key = new StringBuilder((int)OpenVR.k_unMaxApplicationKeyLength); OpenVR.Applications.GetApplicationKeyByProcessId(activePID, key, OpenVR.k_unMaxApplicationKeyLength); LibraryGameData gameData = LibraryApp.I.config.opts.games.Find(x => x.appKey == key.ToString()); if (gameData == null) { return; } activeGame = gameData; UpdateVisuals(); }
public void LaunchGame(LibraryGameData gameData) { OpenVR.Applications.LaunchApplication(gameData.appKey); }