added UpdateFailedDialog
This commit is contained in:
@@ -6,6 +6,7 @@ using System;
|
||||
using Newtonsoft.Json;
|
||||
using RothenburgAR.Common;
|
||||
using System.IO;
|
||||
using TMPro;
|
||||
|
||||
namespace RothenburgAR.Updater
|
||||
{
|
||||
@@ -15,6 +16,7 @@ namespace RothenburgAR.Updater
|
||||
public GameObject UpdateDialog;
|
||||
public GameObject UpdateConfirmationDialog;
|
||||
public GameObject UpdateCompletedDialog;
|
||||
public GameObject UpdateFailedDialog;
|
||||
|
||||
private readonly float afterDownloadWaitTime = 10f;
|
||||
|
||||
@@ -51,6 +53,7 @@ namespace RothenburgAR.Updater
|
||||
UpdateDialog.SetActive(false);
|
||||
UpdateConfirmationDialog.SetActive(false);
|
||||
UpdateCompletedDialog.SetActive(false);
|
||||
UpdateFailedDialog.SetActive(false);
|
||||
ProgressBar.value = 0;
|
||||
}
|
||||
|
||||
@@ -149,6 +152,7 @@ namespace RothenburgAR.Updater
|
||||
*/
|
||||
|
||||
UpdateConfirmationDialog.SetActive(false);
|
||||
UpdateFailedDialog.SetActive(false);
|
||||
|
||||
//TODO write languages to file the app can read
|
||||
|
||||
@@ -253,6 +257,13 @@ namespace RothenburgAR.Updater
|
||||
http.Request.isHttpError,
|
||||
http.Request.responseCode));
|
||||
|
||||
UpdateDialog.SetActive(true);
|
||||
UpdateFailedDialog.SetActive(true);
|
||||
|
||||
//var all = UpdateFailedDialog.GetComponentsInChildren<TextMeshProUGUI>().ToList();
|
||||
//var errorText = all.First(c => c.name == "ErrorText");
|
||||
//errorText.text = string.Format("Fehlercode: {0}", http.Request.responseCode.ToString());
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user