Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // MENU THUMBNAILS.Cs
- public void PrintButton(MagazineResourcesManager mrm)
- {
- var url = mrm.ReturnPDFUrl ();
- if (url.Equals (""))
- Debug.Log ("No se ha especificado la URL del pdf a imprimir");
- else
- Application.OpenURL(url); //URL DEL VIDEO
- }
- public void ToggleVideoPages(MagazineResourcesManager mrm)
- {
- int children = thumb.gameObject.transform.childCount;
- List<GameObject> videopages = mrm.ReturnVideoPages ();
- if (!_onlyvid) {
- //Desactivamos todos
- for (int i = 0; i < children; i++)
- {
- thumb.gameObject.transform.GetChild(i).gameObject.SetActive(false);
- }
- //Activamos los que tengamos el indice
- for(int vid = 0; vid < videopages.Count; vid++)
- {
- int index = int.Parse(videopages[vid].name.Substring(4));
- thumb.gameObject.transform.GetChild(index).gameObject.SetActive(true);
- }
- _onlyvid = true;
- videoImg.color = _on;
- // Mostrar solo las paginas con videos
- } else {
- for (int i = 0; i < children; i++)
- {
- thumb.gameObject.transform.GetChild(i).gameObject.SetActive(true);
- }
- _onlyvid = false;
- videoImg.color = _off;
- //Mostrar todas las paginas
- }
- }
- MAGAZINE RESOUCESMANAGER
- Line 220:
- videopages.Add(p.gameObject);
- // <summary>
- /// Devuelve la URL del PDF a Imprimir
- /// </summary>
- /// <returns>The PDF URL.</returns>
- public string ReturnPDFUrl()
- {
- return Application.persistentDataPath + issueName + "/Resources/" + issueName + ".pdf";
- }
- /// <summary>
- /// Devuelve una lista con las paginas 'hijo' que tiene el recurso video.
- /// </summary>
- /// <returns>The video pages.</returns>
- public List<GameObject> ReturnVideoPages()
- {
- return videopages;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement