예제 #1
0
        void OnGUI()
        {
            if (langPack == null)
            {
                langPack = LangSys.DATA;
            }

            if (styleBox == null)
            {
                InitStyles();
            }

            //Languages
            scrollPos = GUI.BeginScrollView(new Rect(0f, 0f, position.width, position.height), scrollPos, new Rect(8f, 8f, position.width - 32f, (langPack.keys.Count + 1) * 100f - 20f), false, true);
            Languages(new Rect(16f, 16f, position.width - 32f, position.height - 80f));
            GUI.EndScrollView();
        }
예제 #2
0
        void Update()
        {
            if (langPack == null)
            {
                langPack = LangSys.DATA;
            }

            ProceedTask();

            if (!langPack.languages.ContainsKey(langPack.mainLang) && langPack.keys.Count > 0)
            {
                langPack.mainLang = langPack.keys[0];
                SaveChanges();
            }

            if (!langPack.languages.ContainsKey(LangSys.activeLang) && langPack.keys.Count > 0)
            {
                LangSys.activeLang = langPack.keys[0];
            }
        }
예제 #3
0
 public static void Preload()
 {
     dataCache = DATA;
 }
예제 #4
0
 void OnEnable()
 {
     minSize      = new Vector2(400f, 200f);
     titleContent = new GUIContent("Language Settings");
     langPack     = LangSys.DATA;
 }