cull(engine-cleanup): pass-9 cascade round 1 after DialogBase stub
This commit is contained in:
@@ -289,29 +289,6 @@ public class NetworkManager : MonoBehaviour, IManager
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator Retry()
|
||||
{
|
||||
if (lastRequestTask == null)
|
||||
{
|
||||
|
||||
yield break;
|
||||
}
|
||||
if (connectCoroutine != null)
|
||||
{
|
||||
StopConnectCoroutine();
|
||||
}
|
||||
connectCoroutine = Connect(showErrorDialog: true);
|
||||
yield return StartCoroutine(connectCoroutine);
|
||||
}
|
||||
|
||||
public void GoToStore()
|
||||
{
|
||||
lastRequestTask.GotoStore();
|
||||
|
||||
ClearLastRequestTask();
|
||||
|
||||
}
|
||||
|
||||
private void disposeUnityWebRequest(UnityWebRequest unityWebRequest)
|
||||
{
|
||||
unityWebRequest.Dispose();
|
||||
|
||||
@@ -25,6 +25,4 @@ public class Toolbox
|
||||
|
||||
|
||||
public static DebugManager DebugManager;
|
||||
|
||||
public static Mutex mute;
|
||||
}
|
||||
|
||||
@@ -110,15 +110,6 @@ public class WebViewManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanGoBack()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void GoBack()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetCallback(Action<string> cb)
|
||||
{
|
||||
Callback = cb;
|
||||
|
||||
@@ -10,23 +10,18 @@ using Wizard.UI.Dialog.ImageSelection;
|
||||
|
||||
public class DialogBase : MonoBehaviour
|
||||
{
|
||||
public enum DialogScene { OPEN, WAIT, CLOSE }
|
||||
public enum DialogScene { }
|
||||
|
||||
public enum Size { S, M, L, XL }
|
||||
|
||||
public enum ButtonLayout
|
||||
{
|
||||
NONE, OkBtn, DecisionBtn, CloseBtn, BackToTitleBtn, GrayBtn, RedBtn,
|
||||
YellowBtn, BlueBtn_CancelBtn, RedBtn_CancelBtn, BlueBtn_GrayBtn,
|
||||
BlueBtn_RedBtn, GrayBtn_GrayBtn, BlueBtn_RedBtn_GrayBtn,
|
||||
GrayBtn_CancelBtn_BlueBtn, GrayBtn_GrayBtn_BlueBtn, BattleEvolveConfirm,
|
||||
BlueButton, BlueButton_BlueButton, BlueButton_BlueButton_BlueButton
|
||||
}
|
||||
NONE, OkBtn, DecisionBtn, CloseBtn, GrayBtn, BlueBtn_CancelBtn, RedBtn_CancelBtn, BlueBtn_GrayBtn, BlueBtn_RedBtn_GrayBtn,
|
||||
GrayBtn_CancelBtn_BlueBtn, BlueButton }
|
||||
|
||||
public enum ButtonType
|
||||
{
|
||||
Blue, Gray, Red, Yellow, OK, Decision, Close, Cancel,
|
||||
Retry, BackToTitle, BackToHome, QuitApplication, VersionUp, RecommendedList
|
||||
OK, Close, Retry, BackToTitle, BackToHome, QuitApplication, VersionUp, RecommendedList
|
||||
}
|
||||
|
||||
// Callback fields
|
||||
@@ -66,27 +61,21 @@ public class DialogBase : MonoBehaviour
|
||||
public void AddButton(ButtonType type, Action callback = null) { }
|
||||
public void AddButton(ButtonType type, bool isReflect) { }
|
||||
public void SetScrollViewActive(bool b) { }
|
||||
public void SetReturnMsg(string msg) { }
|
||||
public void SetReturnMsg(string msg, string s) { }
|
||||
public void SetReturnMsg(GameObject go, string a, string b) { }
|
||||
public void SetReturnMsg(GameObject go, string a, string b, string c, string d) { }
|
||||
public void SetButtonText(string text) { }
|
||||
public void SetButtonText(string text1, string text2) { }
|
||||
public void SetButtonText(string text1, string text2, string text3) { }
|
||||
public void SetButtonText(ButtonType type, string text) { }
|
||||
public void SetButtonDelegate(Action callback) { }
|
||||
public void SetButtonDelegate(EventDelegate del) { }
|
||||
public void SetButtonDelegate(ButtonType type, Action callback = null) { }
|
||||
public void SetButtonDisable(bool isEnableOK, bool isEnableCancel = false) { }
|
||||
public void SetDialogNoClose() { }
|
||||
public void SetDialogNoClose(bool noClose) { }
|
||||
public void SetLayer(string layerName) { }
|
||||
public void SetLayer(int layer) { }
|
||||
public void SetObj(GameObject obj) { }
|
||||
public void SetBackViewLayer(int layer) { }
|
||||
public void SetBackViewToNotCloseDialog() { }
|
||||
public void SetPanelSortingOrder(int order) { }
|
||||
public void SetVisibleContactButton(bool isVisible) { }
|
||||
public void SetVisibleContactButton(bool isVisible, string errorId) { }
|
||||
public void AttachToScrollView(Transform t) { }
|
||||
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using Wizard;
|
||||
|
||||
public class DialogSupport : MonoBehaviour
|
||||
{
|
||||
private enum Info
|
||||
{
|
||||
AppVersion,
|
||||
OsVersion,
|
||||
Device
|
||||
}
|
||||
|
||||
private GameObject[] _items;
|
||||
|
||||
private const string DEVICE = "&device=";
|
||||
|
||||
public string ErrorCode { get; set; }
|
||||
|
||||
public static DialogBase Create(string errorCode = null)
|
||||
{
|
||||
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
|
||||
dialogBase.SetSize(DialogBase.Size.XL);
|
||||
SystemText systemText = Data.SystemText;
|
||||
dialogBase.SetTitleLabel(systemText.Get("Contact_Dialog_001_Header"));
|
||||
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
|
||||
dialogBase.SetButtonText(systemText.Get("Contact_Dialog_001_Button"));
|
||||
GameObject gameObject = Object.Instantiate(UIManager.GetInstance().SupportDialogPrefab);
|
||||
dialogBase.SetObj(gameObject);
|
||||
DialogSupport ds = gameObject.GetComponent<DialogSupport>();
|
||||
ds.ErrorCode = errorCode;
|
||||
dialogBase.onPushButton1 = delegate
|
||||
{
|
||||
string url = ds.GetUrl();
|
||||
UIManager.GetInstance().WebViewHelper.PrepareOpenUrl(delegate
|
||||
{
|
||||
LocalLog.SendAllClientTraceLog(delegate
|
||||
{
|
||||
BrowserURL.Open(url);
|
||||
});
|
||||
});
|
||||
};
|
||||
return dialogBase;
|
||||
}
|
||||
|
||||
private bool IsChecked(Info info)
|
||||
{
|
||||
if ((int)info >= _items.Length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return _items[(int)info].GetComponentInChildren<UIButton>().normalSprite == "btn_check_on";
|
||||
}
|
||||
|
||||
public string GetUrl()
|
||||
{
|
||||
string key = "URL_0013_steam";
|
||||
string text = Data.SystemText.Get(key);
|
||||
// PlayerStaticData.UserViewerID read stripped in Phase-1 UI cull. GetUrl runs from a
|
||||
// client-side report dialog; headless never invokes it.
|
||||
if (IsChecked(Info.AppVersion))
|
||||
{
|
||||
text = text + "&appver=" + Toolbox.DeviceManager.GetAppVersionName();
|
||||
}
|
||||
if (IsChecked(Info.OsVersion))
|
||||
{
|
||||
string osVersion = Toolbox.DeviceManager.GetOsVersion();
|
||||
text = text + "&osver=" + UnityWebRequest.EscapeURL(osVersion);
|
||||
}
|
||||
if (IsChecked(Info.Device))
|
||||
{
|
||||
text = text + "&device=" + UnityWebRequest.EscapeURL(Toolbox.DeviceManager.GetDeviceName());
|
||||
text += UnityWebRequest.EscapeURL("/" + Toolbox.DeviceManager.GetGraphicsDeviceName());
|
||||
}
|
||||
if (ErrorCode != null)
|
||||
{
|
||||
text = text + "&errorcode=" + ErrorCode;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,6 @@ public class NguiObjs : MonoBehaviour
|
||||
[SerializeField]
|
||||
public List<GameObject> objs;
|
||||
|
||||
[SerializeField]
|
||||
public UISprite[] sprites;
|
||||
|
||||
[SerializeField]
|
||||
public UITexture[] textures;
|
||||
|
||||
|
||||
@@ -155,19 +155,6 @@ public class UIScrollView : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool shouldMoveVertically
|
||||
{
|
||||
get
|
||||
{
|
||||
float num = bounds.size.y;
|
||||
if (mPanel.clipping == UIDrawCall.Clipping.SoftClip)
|
||||
{
|
||||
num += mPanel.clipSoftness.y * 2f;
|
||||
}
|
||||
return Mathf.RoundToInt(num - mPanel.height) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool shouldMove
|
||||
{
|
||||
get
|
||||
|
||||
@@ -918,36 +918,6 @@ public class FilteringImageSelection : MonoBehaviour
|
||||
return dataList.Any((ItemData data) => data.IsLoaded());
|
||||
}
|
||||
|
||||
public void DestroyDialogCloseButtonCopy()
|
||||
{
|
||||
if (_dialogCloseButtonCopy != null)
|
||||
{
|
||||
UnityEngine.Object.Destroy(_dialogCloseButtonCopy.gameObject);
|
||||
_dialogCloseButtonCopy = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void RegisterFavoriteChanges()
|
||||
{
|
||||
IEnumerable<long> enumerable = from x in _dataList
|
||||
where x.IsFavorite
|
||||
select long.Parse(x._key);
|
||||
IEnumerable<long> favorites = GetFavorites();
|
||||
IEnumerable<long> remove = favorites.Except(enumerable);
|
||||
IEnumerable<long> add = enumerable.Except(favorites);
|
||||
if (remove.IsNotNullOrEmpty() || add.IsNotNullOrEmpty())
|
||||
{
|
||||
string[] remove2 = remove.Select((long x) => x.ToString()).ToArray();
|
||||
string[] add2 = add.Select((long x) => x.ToString()).ToArray();
|
||||
FavoriteTask favoriteTask = new FavoriteTask(TaskKind);
|
||||
favoriteTask.SetParameter(add2, remove2);
|
||||
UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(favoriteTask, delegate
|
||||
{
|
||||
UpdateFavoriteFlag(add, remove);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void UpdateFavoriteFlag(IEnumerable<long> added, IEnumerable<long> removed)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -100,11 +100,6 @@ public class LocalLog
|
||||
}
|
||||
}
|
||||
|
||||
public static void SendAllClientTraceLog(Action onSended)
|
||||
{
|
||||
MakeTreceLogToSend(TRACELOG_TYPE.TRACE_ALL_LOG, onSended);
|
||||
}
|
||||
|
||||
public static void SendLastTraceLog(Action onSended)
|
||||
{
|
||||
MakeTreceLogToSend(TRACELOG_TYPE.TRACE_LAST_LOG, onSended);
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
internal class TransformBackup
|
||||
{
|
||||
public Transform backup_parent { get; private set; }
|
||||
|
||||
public Vector3 backup_pos { get; private set; }
|
||||
|
||||
public Vector3 backup_scale { get; private set; }
|
||||
|
||||
public int backup_layer { get; private set; }
|
||||
|
||||
public void Save(Transform trans)
|
||||
{
|
||||
backup_parent = trans.parent;
|
||||
backup_pos = trans.localPosition;
|
||||
backup_scale = trans.localScale;
|
||||
backup_layer = trans.gameObject.layer;
|
||||
}
|
||||
|
||||
public void Restore(Transform trans)
|
||||
{
|
||||
trans.parent = backup_parent;
|
||||
trans.localPosition = backup_pos;
|
||||
trans.localScale = backup_scale;
|
||||
trans.gameObject.layer = backup_layer;
|
||||
}
|
||||
}
|
||||
@@ -202,64 +202,6 @@ public class WebViewHelper
|
||||
return false;
|
||||
}
|
||||
|
||||
public DialogBase CreateOpenURLWindow(UrlType type)
|
||||
{
|
||||
string applicationServerURL = CustomPreference.GetApplicationServerURL();
|
||||
string text = "?lang=" + CustomPreference.GetTextLanguage();
|
||||
string openUrl = null;
|
||||
string key = null;
|
||||
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
|
||||
SystemText systemText = Data.SystemText;
|
||||
switch (type)
|
||||
{
|
||||
case UrlType.POLICY:
|
||||
dialogBase.SetPanelDepth(3000);
|
||||
openUrl = applicationServerURL + "information/policy" + text;
|
||||
key = "OtherTop_0009";
|
||||
break;
|
||||
case UrlType.FACEBOOK:
|
||||
key = "Account_0038";
|
||||
break;
|
||||
case UrlType.RECOMMENDED_DEVICE:
|
||||
key = "Common_0134";
|
||||
openUrl = "https://shadowverse.jp/device.php";
|
||||
break;
|
||||
case UrlType.GAME_GUIDE:
|
||||
openUrl = systemText.Get("URL_0012_steam");
|
||||
key = "OtherTop_0021";
|
||||
break;
|
||||
case UrlType.NICONICO:
|
||||
dialogBase.SetPanelDepth(3000);
|
||||
key = "VideoHosting_0034";
|
||||
openUrl = "https://account.nicovideo.jp/rules/account";
|
||||
break;
|
||||
case UrlType.NICONICO_PUBLISH:
|
||||
dialogBase.SetPanelDepth(3000);
|
||||
key = "VideoHosting_0035";
|
||||
openUrl = "http://live.nicovideo.jp/static/rule.html";
|
||||
break;
|
||||
}
|
||||
dialogBase.SetTitleLabel(systemText.Get(key));
|
||||
dialogBase.SetText(systemText.Get("Common_0208"));
|
||||
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn);
|
||||
dialogBase.SetButtonText(systemText.Get("Dia_Web_001_Button"));
|
||||
dialogBase.onPushButton1 = delegate
|
||||
{
|
||||
PrepareOpenUrl(delegate
|
||||
{
|
||||
if (type == UrlType.FACEBOOK)
|
||||
{
|
||||
UIManager.GetInstance().AccountTransferHelper.DataTransferByFaceBook();
|
||||
}
|
||||
else
|
||||
{
|
||||
BrowserURL.Open(openUrl);
|
||||
}
|
||||
});
|
||||
};
|
||||
return dialogBase;
|
||||
}
|
||||
|
||||
public void PrepareOpenUrl(Action onFinish)
|
||||
{
|
||||
onFinish();
|
||||
|
||||
Reference in New Issue
Block a user