Transform InstantiateNewPrefab(Localize cmp, string mainTranslation)
        {
            GameObject NewPrefab = cmp.FindTranslatedObject <GameObject>(mainTranslation);

            if (NewPrefab == null)
            {
                return(null);
            }

            GameObject current = mTarget as GameObject;

            mTarget = Object.Instantiate(NewPrefab);
            if (mTarget == null)
            {
                return(null);
            }

            Transform locTr = cmp.transform;
            Transform mNew  = (mTarget as GameObject).transform;

            mNew.SetParent(locTr);

            Transform bBase = (current ? current.transform : locTr);

            //mNew.localScale = bBase.localScale;
            mNew.rotation = bBase.rotation;
            mNew.position = bBase.position;

            return(mNew);
        }
        public override void DoLocalize(Localize cmp, string mainTranslation, string secondaryTranslation)
        {
            var OldVectorG = mTarget.vectorGraphics;

            if (OldVectorG == null || OldVectorG.name != mainTranslation)
            {
                mTarget.vectorGraphics = cmp.FindTranslatedObject <SVGImporter.SVGAsset>(mainTranslation);
            }

            var OldMaterial = mTarget.opaqueMaterial;

            if (OldMaterial == null || OldMaterial.name != secondaryTranslation)
            {
                mTarget.opaqueMaterial = cmp.FindTranslatedObject <Material>(secondaryTranslation);
            }

            mTarget.SetAllDirty();
        }
        public override void DoLocalize(Localize cmp, string mainTranslation, string secondaryTranslation)
        {
            VideoClip Old = mTarget.clip;

            if (Old == null || Old.name != mainTranslation)
            {
                mTarget.clip = cmp.FindTranslatedObject <VideoClip>(mainTranslation);
            }
        }
        public override void DoLocalize(Localize cmp, string mainTranslation, string secondaryTranslation)
        {
            Texture Old = mTarget.mainTexture;

            if (Old == null || Old.name != mainTranslation)
            {
                mTarget.mainTexture = cmp.FindTranslatedObject <Texture>(mainTranslation);
                mTarget.MakePixelPerfect();
            }
        }
        public override void DoLocalize(Localize cmp, string mainTranslation, string secondaryTranslation)
        {
            Sprite Old = mTarget.sprite;

            if (Old == null || Old.name != mainTranslation)
            {
                mTarget.sprite = cmp.FindTranslatedObject <Sprite>(mainTranslation);
            }

            // If the old value is not in the translatedObjects, then unload it as it most likely was loaded from Resources
            //if (!HasTranslatedObject(Old))
            //	Resources.UnloadAsset(Old);
        }
Пример #6
0
        public override void DoLocalize(Localize cmp, string mainTranslation, string secondaryTranslation)
        {
            var     mTarget = GetTarget(cmp);
            Texture Old     = mTarget.texture;

            if (Old != null && Old.name != mainTranslation)
            {
                mTarget.texture = cmp.FindTranslatedObject <Texture>(mainTranslation);
            }

            // If the old value is not in the translatedObjects, then unload it as it most likely was loaded from Resources
            //if (!HasTranslatedObject(Old))
            //	Resources.UnloadAsset(Old);
        }
        public static T GetTranslatedObject <T>(string Term, Localize optionalLocComp = null) where T : Object
        {
            if (optionalLocComp != null)
            {
                return(optionalLocComp.FindTranslatedObject <T>(Term));
            }
            else
            {
                T obj = FindAsset(Term) as T;
                if (obj)
                {
                    return(obj);
                }

                obj = ResourceManager.pInstance.GetAsset <T>(Term);
                return(obj);
            }
        }
        public override void DoLocalize(Localize cmp, string mainTranslation, string secondaryTranslation)
        {
            //--[ Localize Material]----------
            Material newMat = cmp.GetSecondaryTranslatedObj <Material>(ref mainTranslation, ref secondaryTranslation);

            if (newMat != null && mTarget.sharedMaterial != newMat)
            {
                mTarget.material = newMat;
            }

            //--[ Localize Mesh ]----------
            Mesh       newMesh = cmp.FindTranslatedObject <Mesh>(mainTranslation);
            MeshFilter filter  = mTarget.GetComponent <MeshFilter>();

            if (newMesh != null && filter.sharedMesh != newMesh)
            {
                filter.mesh = newMesh;
            }
        }
        public override void DoLocalize(Localize cmp, string mainTranslation, string secondaryTranslation)
        {
            bool      bIsPlaying = (mTarget.isPlaying || mTarget.loop) && Application.isPlaying;
            AudioClip OldClip    = mTarget.clip;
            AudioClip NewClip    = cmp.FindTranslatedObject <AudioClip>(mainTranslation);

            if (OldClip != NewClip)
            {
                mTarget.clip = NewClip;
            }

            if (bIsPlaying && mTarget.clip)
            {
                mTarget.Play();
            }

            // If the old clip is not in the translatedObjects, then unload it as it most likely was loaded from Resources
            //if (!HasTranslatedObject(OldClip))
            //	Resources.UnloadAsset(OldClip);
        }
Пример #10
0
        public override void DoLocalize(Localize cmp, string mainTranslation, string secondaryTranslation)
        {
            Sprite Old = mTarget.sprite;

            if (Old == null || Old.name != mainTranslation)
            {
                mTarget.sprite = cmp.FindTranslatedObject <Sprite>(mainTranslation);
            }

            // If the old value is not in the translatedObjects, then unload it as it most likely was loaded from Resources
            //if (!HasTranslatedObject(Old))
            //	Resources.UnloadAsset(Old);

            // In the editor, sometimes unity "forgets" to show the changes
#if UNITY_EDITOR
            if (!Application.isPlaying)
            {
                UnityEditor.EditorUtility.SetDirty(mTarget);
            }
#endif
        }
Пример #11
0
        public override void DoLocalize(Localize cmp, string mainTranslation, string secondaryTranslation)
        {
            var mTarget = GetTarget(cmp);

            if (mTarget && mTarget.name == mainTranslation)
            {
                return;
            }

            GameObject current   = mTarget;
            GameObject NewPrefab = cmp.FindTranslatedObject <GameObject>(mainTranslation);

            if (NewPrefab)
            {
                cmp.mTarget = Object.Instantiate(NewPrefab);
                Transform mNew  = mTarget.transform;
                Transform bBase = (current ? current.transform : NewPrefab.transform);

                mNew.SetParent(cmp.transform);
                mNew.localScale    = bBase.localScale;
                mNew.localRotation = bBase.localRotation;
                mNew.localPosition = bBase.localPosition;
            }

            if (current)
            {
#if UNITY_EDITOR
                if (Application.isPlaying)
                {
                    Object.Destroy(current);
                }
                else
                {
                    Object.DestroyImmediate(current);
                }
#else
                Object.Destroy(current);
#endif
            }
        }
        static void OnGUI_Keys_LanguageTranslations(string Key, Localize localizeCmp, bool IsPrimaryKey, ref TermData termdata, LanguageSource source)
        {
            bool IsSelect = Event.current.type == EventType.MouseUp;

            for (int i = 0; i < source.mLanguages.Count; ++i)
            {
                bool forcePreview      = false;
                bool isEnabledLanguage = source.mLanguages[i].IsEnabled();

                if (!isEnabledLanguage)
                {
                    if (!GUI_ShowDisabledLanguagesTranslation)
                    {
                        continue;
                    }
                    GUI.color = new Color(GUI.color.r, GUI.color.g, GUI.color.b, 0.35f);
                }
                GUILayout.BeginHorizontal();

                if (GUILayout.Button(source.mLanguages[i].Name, EditorStyles.label, GUILayout.Width(100)))
                {
                    forcePreview = true;
                }


                string Translation = (GUI_SelectedInputType == 0 ? termdata.Languages[i] : termdata.Languages_Touch[i]) ?? string.Empty;
                if (string.IsNullOrEmpty(Translation))
                {
                    Translation = (GUI_SelectedInputType == 1 ? termdata.Languages[i] : termdata.Languages_Touch[i]) ?? string.Empty;
                }

                if (termdata.Languages[i] != termdata.Languages_Touch[i] && !string.IsNullOrEmpty(termdata.Languages[i]) && !string.IsNullOrEmpty(termdata.Languages_Touch[i]))
                {
                    GUI.contentColor = GUITools.LightYellow;
                }

                if (termdata.TermType == eTermType.Text || termdata.TermType == eTermType.Child)
                {
                    EditorGUI.BeginChangeCheck();
                    string CtrName = "TranslatedText" + i;
                    GUI.SetNextControlName(CtrName);

                    EditPluralTranslations(ref Translation, i, source.mLanguages[i].Code);
                    //Translation = EditorGUILayout.TextArea(Translation, Style_WrapTextField, GUILayout.Width(Screen.width - 260 - (autoTranslated ? 20 : 0)));
                    if (EditorGUI.EndChangeCheck())
                    {
                        if (GUI_SelectedInputType == 0)
                        {
                            termdata.Languages[i] = Translation;
                        }
                        else
                        {
                            termdata.Languages_Touch[i] = Translation;
                        }
                        EditorUtility.SetDirty(source);
                    }

                    if (localizeCmp != null &&
                        (forcePreview || GUI.changed || (GUI.GetNameOfFocusedControl() == CtrName && IsSelect)))
                    {
                        if (IsPrimaryKey && string.IsNullOrEmpty(localizeCmp.Term))
                        {
                            localizeCmp.mTerm = Key;
                        }

                        if (!IsPrimaryKey && string.IsNullOrEmpty(localizeCmp.SecondaryTerm))
                        {
                            localizeCmp.mTermSecondary = Key;
                        }

                        string PreviousLanguage = LocalizationManager.CurrentLanguage;
                        LocalizationManager.PreviewLanguage(source.mLanguages[i].Name);
                        if (forcePreview || IsSelect)
                        {
                            LocalizationManager.LocalizeAll();
                        }
                        else
                        {
                            localizeCmp.OnLocalize(true);
                        }
                        LocalizationManager.PreviewLanguage(PreviousLanguage);
                        EditorUtility.SetDirty(localizeCmp);
                    }
                    GUI.contentColor = Color.white;

                    //if (autoTranslated)
                    //{
                    //    if (GUILayout.Button(new GUIContent("\u2713"/*"A"*/,"Translated by Google Translator\nClick the button to approve the translation"), EditorStyles.toolbarButton, GUILayout.Width(autoTranslated ? 20 : 0)))
                    //    {
                    //        termdata.Flags[i] &= (byte)(byte.MaxValue ^ (byte)(GUI_SelectedInputType==0 ? TranslationFlag.AutoTranslated_Normal : TranslationFlag.AutoTranslated_Touch));
                    //    }
                    //}

                    if (termdata.TermType == eTermType.Text)
                    {
                        if (TestButtonArg(eTest_ActionType.Button_Term_Translate, i, new GUIContent("T", "Translate"), EditorStyles.toolbarButton, GUILayout.Width(20)))
                        {
                            string sourceText     = null;
                            string sourceLangCode = null;
                            FindTranslationSource(Key, termdata, source.mLanguages[i].Code, out sourceText, out sourceLangCode);

                            var languages = (GUI_SelectedInputType == 0 ? termdata.Languages : termdata.Languages_Touch);
                            var langIdx   = i;
                            Translate(sourceText, ref termdata, source.mLanguages[i].Code, (translation, error) => { languages[langIdx] = translation; });
                            GUI.FocusControl(string.Empty);
                        }
                    }
                }
                else
                {
                    string MultiSpriteName = string.Empty;

                    if (termdata.TermType == eTermType.Sprite && Translation.EndsWith("]", StringComparison.Ordinal))                   // Handle sprites of type (Multiple):   "SpritePath[SpriteName]"
                    {
                        int idx = Translation.LastIndexOf("[", StringComparison.Ordinal);
                        int len = Translation.Length - idx - 2;
                        MultiSpriteName = Translation.Substring(idx + 1, len);
                        Translation     = Translation.Substring(0, idx);
                    }

                    Object Obj = null;

                    // Try getting the asset from the References section
                    if (localizeCmp != null)
                    {
                        Obj = localizeCmp.FindTranslatedObject <Object>(Translation);
                    }
                    if (Obj == null && source != null)
                    {
                        Obj = source.FindAsset(Translation);
                    }

                    // If it wasn't in the references, Load it from Resources
                    if (Obj == null && localizeCmp == null)
                    {
                        Obj = ResourceManager.pInstance.LoadFromResources <Object>(Translation);
                    }

                    Type ObjType = typeof(Object);
                    switch (termdata.TermType)
                    {
                    case eTermType.Font: ObjType = typeof(Font); break;

                    case eTermType.Texture: ObjType = typeof(Texture); break;

                    case eTermType.AudioClip: ObjType = typeof(AudioClip); break;

                    case eTermType.GameObject: ObjType = typeof(GameObject); break;

                    case eTermType.Sprite: ObjType = typeof(Sprite); break;

                    case eTermType.Material: ObjType = typeof(Material); break;

#if NGUI
                    case eTermType.UIAtlas: ObjType = typeof(UIAtlas); break;

                    case eTermType.UIFont: ObjType = typeof(UIFont); break;
#endif
#if TK2D
                    case eTermType.TK2dFont: ObjType = typeof(tk2dFont); break;

                    case eTermType.TK2dCollection: ObjType = typeof(tk2dSpriteCollection); break;
#endif

#if TextMeshPro
                    case eTermType.TextMeshPFont: ObjType = typeof(TMPro.TMP_FontAsset); break;
#endif

#if SVG
                    case eTermType.SVGAsset: ObjType = typeof(SVGImporter.SVGAsset); break;
#endif

                    case eTermType.Object: ObjType = typeof(Object); break;
                    }

                    if (Obj != null && !string.IsNullOrEmpty(MultiSpriteName))
                    {
                        string   sPath = AssetDatabase.GetAssetPath(Obj);
                        Object[] objs  = AssetDatabase.LoadAllAssetRepresentationsAtPath(sPath);
                        Obj = null;
                        for (int j = 0, jmax = objs.Length; j < jmax; ++j)
                        {
                            if (objs[j].name.Equals(MultiSpriteName))
                            {
                                Obj = objs[j];
                                break;
                            }
                        }
                    }

                    bool bShowTranslationLabel = (Obj == null && !string.IsNullOrEmpty(Translation));
                    if (bShowTranslationLabel)
                    {
                        GUI.backgroundColor = GUITools.DarkGray;
                        GUILayout.BeginVertical(EditorStyles.textArea, GUILayout.Height(1));
                        GUILayout.Space(2);

                        GUI.backgroundColor = Color.white;
                    }

                    Object NewObj = EditorGUILayout.ObjectField(Obj, ObjType, true, GUILayout.ExpandWidth(true));
                    if (Obj != NewObj)
                    {
                        string sPath = null;
                        if (NewObj != null)
                        {
                            sPath = AssetDatabase.GetAssetPath(NewObj);
                            AddObjectPath(ref sPath, localizeCmp, NewObj);
                            if (HasObjectInReferences(NewObj, localizeCmp))
                            {
                                sPath = NewObj.name;
                            }
                            else
                            if (termdata.TermType == eTermType.Sprite)
                            {
                                sPath += "[" + NewObj.name + "]";
                            }
                        }

                        if (GUI_SelectedInputType == 0)
                        {
                            termdata.Languages[i] = sPath;
                        }
                        else
                        {
                            termdata.Languages_Touch[i] = sPath;
                        }
                        EditorUtility.SetDirty(source);
                    }

                    if (bShowTranslationLabel)
                    {
                        GUILayout.BeginHorizontal();
                        GUI.color = Color.red;
                        GUILayout.FlexibleSpace();
                        GUILayout.Label(Translation, EditorStyles.miniLabel);
                        GUILayout.FlexibleSpace();
                        GUI.color = Color.white;
                        GUILayout.EndHorizontal();
                        GUILayout.EndVertical();
                    }
                }

                GUILayout.EndHorizontal();
                GUI.color = Color.white;
            }
        }
        static void OnGUI_Keys_LanguageTranslations(string Key, Localize localizeCmp, bool IsPrimaryKey, ref TermData termdata, LanguageSource source)
        {
            bool IsSelect = Event.current.type == EventType.MouseUp;

            for (int i = 0; i < source.mLanguages.Count; ++i)
            {
                GUILayout.BeginHorizontal();
                GUILayout.Label(source.mLanguages[i].Name, GUILayout.Width(100));

                string Translation = (GUI_SelectedInputType == 0 ? termdata.Languages[i] : termdata.Languages_Touch[i]) ?? string.Empty;
                if (string.IsNullOrEmpty(Translation))
                {
                    Translation = (GUI_SelectedInputType == 1 ? termdata.Languages[i] : termdata.Languages_Touch[i]) ?? string.Empty;
                }

                if (termdata.Languages[i] != termdata.Languages_Touch[i] && !string.IsNullOrEmpty(termdata.Languages[i]) && !string.IsNullOrEmpty(termdata.Languages_Touch[i]))
                {
                    GUI.contentColor = GUITools.LightYellow;
                }

                if (termdata.TermType == eTermType.Text)
                {
                    GUI.changed = false;
                    string CtrName = "TranslatedText" + i;
                    GUI.SetNextControlName(CtrName);

                    bool autoTranslated = termdata.IsAutoTranslated(i, GUI_SelectedInputType == 1);

                    Translation = EditorGUILayout.TextArea(Translation, LocalizationEditor.Style_WrapTextField, GUILayout.Width(Screen.width - 260 - (autoTranslated ? 20 : 0)));
                    if (GUI.changed)
                    {
                        if (GUI_SelectedInputType == 0)
                        {
                            termdata.Languages[i] = Translation;
                            termdata.Flags[i]    &= byte.MaxValue ^ (byte)TranslationFlag.AutoTranslated_Normal;
                        }
                        else
                        {
                            termdata.Languages_Touch[i] = Translation;
                            termdata.Flags[i]          &= byte.MaxValue ^ (byte)TranslationFlag.AutoTranslated_Touch;
                        }
                        EditorUtility.SetDirty(source);
                    }

                    if (localizeCmp != null &&
                        (GUI.changed || (GUI.GetNameOfFocusedControl() == CtrName && IsSelect)))
                    {
                        if (IsPrimaryKey && string.IsNullOrEmpty(localizeCmp.Term))
                        {
                            localizeCmp.mTerm = Key;
                            EditorUtility.SetDirty(localizeCmp);
                        }

                        if (!IsPrimaryKey && string.IsNullOrEmpty(localizeCmp.SecondaryTerm))
                        {
                            localizeCmp.mTermSecondary = Key;
                            EditorUtility.SetDirty(localizeCmp);
                        }

                        string PreviousLanguage = LocalizationManager.CurrentLanguage;
                        LocalizationManager.PreviewLanguage(source.mLanguages[i].Name);
                        localizeCmp.OnLocalize(true);
                        LocalizationManager.PreviewLanguage(PreviousLanguage);
                    }
                    GUI.contentColor = Color.white;

                    if (autoTranslated)
                    {
                        if (GUILayout.Button(new GUIContent("\u2713" /*"A"*/, "Translated by Google Translator\nClick the button to approve the translation"), EditorStyles.toolbarButton, GUILayout.Width(autoTranslated ? 20 : 0)))
                        {
                            termdata.Flags[i] &= (byte)(byte.MaxValue ^ (byte)(GUI_SelectedInputType == 0 ? TranslationFlag.AutoTranslated_Normal : TranslationFlag.AutoTranslated_Touch));
                        }
                    }

                    if (GUILayout.Button("Translate", EditorStyles.toolbarButton, GUILayout.Width(80)))
                    {
                        string mainText = localizeCmp == null?LanguageSource.GetKeyFromFullTerm(Key) : localizeCmp.GetMainTargetsText();

                        if (GUI_SelectedInputType == 0)
                        {
                            Translate(mainText, ref termdata, ref termdata.Languages[i], source.mLanguages[i].Code);
                            termdata.Flags[i] |= (byte)TranslationFlag.AutoTranslated_Normal;
                        }
                        else
                        {
                            Translate(mainText, ref termdata, ref termdata.Languages_Touch[i], source.mLanguages[i].Code);
                            termdata.Flags[i] |= (byte)TranslationFlag.AutoTranslated_Touch;
                        }
                        GUI.FocusControl(string.Empty);
                    }
                }
                else
                {
                    string MultiSpriteName = string.Empty;

                    if (termdata.TermType == eTermType.Sprite && Translation.EndsWith("]"))                     // Handle sprites of type (Multiple):   "SpritePath[SpriteName]"
                    {
                        int idx = Translation.LastIndexOf("[");
                        int len = Translation.Length - idx - 2;
                        MultiSpriteName = Translation.Substring(idx + 1, len);
                        Translation     = Translation.Substring(0, idx);
                    }

                    Object Obj = null;

                    // Try getting the asset from the References section
                    if (localizeCmp != null)
                    {
                        Obj = localizeCmp.FindTranslatedObject <Object>(Translation);
                    }
                    if (Obj == null && source != null)
                    {
                        Obj = source.FindAsset(Translation);
                    }

                    // If it wasn't in the references, Load it from Resources
                    if (Obj == null && localizeCmp == null)
                    {
                        Obj = ResourceManager.pInstance.LoadFromResources <Object>(Translation);
                    }

                    System.Type ObjType = typeof(Object);
                    switch (termdata.TermType)
                    {
                    case eTermType.Font: ObjType = typeof(Font); break;

                    case eTermType.Texture: ObjType = typeof(Texture); break;

                    case eTermType.AudioClip: ObjType = typeof(AudioClip); break;

                    case eTermType.GameObject: ObjType = typeof(GameObject); break;

                    case eTermType.Sprite: ObjType = typeof(Sprite); break;

                    case eTermType.Material: ObjType = typeof(Material); break;

#if NGUI
                    case eTermType.UIAtlas: ObjType = typeof(UIAtlas); break;

                    case eTermType.UIFont: ObjType = typeof(UIFont); break;
#endif
#if DFGUI
                    case eTermType.dfFont: ObjType = typeof(dfFont); break;

                    case eTermType.dfAtlas: ObjType = typeof(dfAtlas); break;
#endif

#if TK2D
                    case eTermType.TK2dFont: ObjType = typeof(tk2dFont); break;

                    case eTermType.TK2dCollection: ObjType = typeof(tk2dSpriteCollection); break;
#endif

#if TextMeshPro_Pre53
                    case eTermType.TextMeshPFont: ObjType = typeof(TMPro.TextMeshProFont); break;
#elif TextMeshPro
                    case eTermType.TextMeshPFont: ObjType = typeof(TMPro.TMP_FontAsset); break;
#endif

#if SVG
                    case eTermType.SVGAsset: ObjType = typeof(SVGImporter.SVGAsset); break;
#endif

                    case eTermType.Object: ObjType = typeof(Object); break;
                    }

                    if (Obj != null && !string.IsNullOrEmpty(MultiSpriteName))
                    {
                        string   sPath = AssetDatabase.GetAssetPath(Obj);
                        Object[] objs  = AssetDatabase.LoadAllAssetRepresentationsAtPath(sPath);
                        Obj = null;
                        for (int j = 0, jmax = objs.Length; j < jmax; ++j)
                        {
                            if (objs[j].name.Equals(MultiSpriteName))
                            {
                                Obj = objs[j];
                                break;
                            }
                        }
                    }

                    bool bShowTranslationLabel = (Obj == null && !string.IsNullOrEmpty(Translation));
                    if (bShowTranslationLabel)
                    {
                        GUI.backgroundColor = GUITools.DarkGray;
                        GUILayout.BeginVertical("AS TextArea", GUILayout.Height(1));
                        GUILayout.Space(2);

                        GUI.backgroundColor = Color.white;
                    }

                    Object NewObj = EditorGUILayout.ObjectField(Obj, ObjType, true, GUILayout.ExpandWidth(true));
                    if (Obj != NewObj && NewObj != null)
                    {
                        string sPath = AssetDatabase.GetAssetPath(NewObj);
                        AddObjectPath(ref sPath, localizeCmp, NewObj);
                        if (HasObjectInReferences(NewObj, localizeCmp))
                        {
                            sPath = NewObj.name;
                        }
                        else
                        if (termdata.TermType == eTermType.Sprite)
                        {
                            sPath += "[" + NewObj.name + "]";
                        }

                        if (GUI_SelectedInputType == 0)
                        {
                            termdata.Languages[i] = sPath;
                        }
                        else
                        {
                            termdata.Languages_Touch[i] = sPath;
                        }
                        EditorUtility.SetDirty(source);
                    }

                    if (bShowTranslationLabel)
                    {
                        GUILayout.BeginHorizontal();
                        GUI.color = Color.red;
                        GUILayout.FlexibleSpace();
                        GUILayout.Label(Translation, EditorStyles.miniLabel);
                        GUILayout.FlexibleSpace();
                        GUI.color = Color.white;
                        GUILayout.EndHorizontal();
                        GUILayout.EndVertical();
                    }
                }

                GUILayout.EndHorizontal();
            }
        }