private void btn_click() { MgrAudio.PlaySound("s_click.mp3"); MgrPopup.Hide("Popup1", SceneAnimation.fade, 1f, null); // MgrPopup.Show ("Popup2", "55892", SceneAnimation.fade, 1f, () => { // Log.Debug ("Popup1 Done~"); // }); }
// Use this for initialization void Start() { Init(); MgrScene.SetViewRoot(ModUIUtils.GetChild <Transform> (transform, "SceneViewRoot")); MgrPopup.SetPopupRoot(ModUIUtils.GetChild <Transform> (transform, "PopupViewRoot")); MgrScene.GotoScene("Scene1", "main", SceneAnimation.none, 0.3f, () => { Log.Debug("main Scene1 Done~", ModUtils.documentsDirectory); }); }
private void btn_click() { MgrAudio.PlaySound("s_click.mp3"); // foreach (string s in MgrScene.GetAllScenes().Keys) { // Log.Debug (s); // } // MgrPopup.Hide ("Popup1", SceneAnimation.fade, null); MgrPopup.HideTop(); // MgrPopup.Show ("Popup1", "55892", SceneAnimation.fade, 1f, () => { // Log.Debug ("Popup1 Done~"); // }); }
/// <summary> /// Switchs the language.<para></para> /// this will call <code>Scenes or Popup 's UpdateLanguage()</code> /// </summary> /// <param name="lang">Language json filename (without extension) in Resources/Lang/ or xxxx.assetBundle 's Lang folder. </param> public static void SwitchLanguage(string lang) { currentLanguage = lang; MgrData.Set(MgrData.appSettingsName, "XLAF.language", lang); Load(); foreach (KeyValuePair <string, SceneObject> kv in MgrScene.GetAllScenes()) { kv.Value.script.UpdateLanguage(); } foreach (KeyValuePair <string, SceneObject> kv in MgrPopup.GetAllPopups()) { kv.Value.script.UpdateLanguage(); } }
public override void OnUIEvent(XLAF_UIEvent e) { if (e.phase == Phase.Click) { if (e.target.name == "btn_ok") { InvokeCallback(inputField.text.ToLower()); MgrPopup.Hide("XLAFBackdoor", SceneAnimation.none); } else if (e.target.name == "btn_cancel") { MgrPopup.Hide("XLAFBackdoor", SceneAnimation.none); } } }
private static void OnClick(GameObject go, PointerEventData e) { // XLAFInnerLog.Debug ("backdoor click!"); clickedTimes++; if (clickedTimes == 1) { instance.TimeOutBegan(); } if (clickedTimes >= BACKDOOR_CLICK_TIMES) { instance.TimeOutEnded(); //after backdoor shown, click 2 times will show backdoor again clickedTimes = BACKDOOR_CLICK_TIMES - 2; MgrPopup.Show("XLAFBackdoor", MgrBackdoor.callback, SceneAnimation.none); } }
public override void OnUIEvent(XLAF_UIEvent e) { Log.Debug("OnUIEvent", e); if (e.phase == Phase.Click) { if (e.target.name == "btn1") { // MgrAudio.PlaySound ("s_click"); MgrScene.GotoScene("Scene2", "0000123", Main.anim, 1f, () => { Log.Debug("Scene2 Done~"); }); // // MgrPopup.Show ("Popup1", "55892", SceneAnimation.fade, 1f, () => { // Log.Debug ("Popup1 Done~"); // }); #if UNITY_ANDROID && !UNITY_EDITOR AndroidJavaClass jc = new AndroidJavaClass("plugintest.albert.mylibrary.PhoneInfo"); string module = jc.CallStatic <string> ("getPhoneModule"); AndroidJavaObject telephonyManager = new AndroidJavaObject("android.telephony.TelephonyManager"); string did = telephonyManager.Call <string> ("getLine1Number"); // string did = jc.CallStatic<string> ("getDeviceId"); string totalMemory = jc.CallStatic <string> ("getTotalMemory"); // string phoneNumber = jc.CallStatic<string> ("getPhoneNumber"); string[] cpu = jc.CallStatic <string[]> ("getCpuInfo"); Log.Debug("~~~~~:", module, "|", did, "|", totalMemory, "|", cpu [0], "|", cpu [1]); #endif } else if (e.target.name == "btn2") { MgrPopup.Show("Popup2", "2222", SceneAnimation.fade, 1f, () => { Log.Debug("Popup2 Done~"); }); } } }
public override void EnterScene(object obj) { MgrPopup.Show("Popup2", "55892", SceneAnimation.fade, 1f, () => { Log.Debug("Popup2 Done~"); }); }